Core-specific residue of the call-free bridge #
The generic call-free bridge between extended (CmdExt P) and base (Cmd P)
Imperative syntax, and all of its command-generic properties, live in
Strata.DL.Imperative.StmtExtendCallBridge(Props). Core specializes that bridge
at its expression type Expression (so CmdExt Expression = Command) simply by
using the generic embed* / project* API.
This module keeps only what is genuinely Core-specific — the facts that mention a concrete call predicate or Core's init-environment well-formedness, and cannot be stated at the generic layer:
- projection succeeds exactly on the call-free fragment, phrased with Core's
Statement.isNotCall/Statements.noCalls; and - Core
BlockInitEnvWFtransports across projection and embedding (Core.Logic), phrased withInitEnvWFParamsand both the Core and genericBlockInitEnvWF; and - through the embedding, the runs of a call-free Core statement list are runs over base
commands, so every event they emit is captured under the entry's factory
(
Core.Logic.coreBlock_events_factory,coreBlock_terminatesAt_events_factory) and a completed run keeps the entry's factory and its defined bindings (Core.Logic.coreBlock_terminatesAt_env).
Everything else (inversion, round trips, injectivity, analysis commutation, and the native event-step/star correspondence) is reused from the generic module.
Projection succeeds exactly on the call-free fragment #
These are the only bridge facts that mention Core's concrete call predicates
Statement.isNotCall / Statements.noCalls, so they stay Core-side.
A Core statement all of whose substatements are non-calls projects successfully to a base statement.
A Core statement list all of whose substatements are non-calls projects successfully to base statements.
A call-free list of Core statements is the embedding of its projection: projection succeeds and re-embeds to the original.
The embedding lands in the call-free fragment #
Every substatement of an embedded base statement is a non-call.
Every substatement of an embedded base statement list is a non-call.
The embedding of any base block is call-free.
A Core block that projects successfully is call-free: projection succeeds exactly on the call-free fragment.
Output transport. Re-establish the full Core BlockInitEnvWF on an
embedded base block embedStmts bs from the corresponding base
conditions stated over bs.
The statement-independent fields (evaluator well-formedness, store
well-definedness, reserved-prefix freshness, factory-declaredness) are passed
through verbatim; the block-shaped fields (defsUndefined,
definedVarsNotReserved, exitsNotReserved, defUseOk, initTypesInhabited,
fvarTypesOk, measuresTyped, and the
readWritesDefined it subsumes) are discharged by rewriting each Core
analysis on embedStmts bs to the corresponding base analysis on bs.
Input transport (to the generic gate). A Core BlockInitEnvWF on ss
weakens to the generic Imperative.Logic.BlockInitEnvWF on the base block
bs that ss projects to, with the same params. This is the bridged
analogue of BlockInitEnvWF.toImperative, exposing the
generic base-language gate for the projected block.
Extract every Core initial-environment condition for the projected base
block bs.
Projecting a call-free Core block to base statements and re-embedding it
preserves BlockInitEnvWF.
Runs of call-free statement lists #
Every event of a call-free Core run is captured under the entry's factory. For a
call-free Core statement list ss, every event of every trace of ss from ρ₀ has the
factory of ρ₀.
Every event of a completed call-free Core run is captured under the entry's factory. For
a call-free Core statement list ss and a run of ss from ρ₀ ending normally or by an
exit, every event of its trace has the factory of ρ₀.
A completed call-free Core run keeps the entry's factory and its bindings. For a
call-free Core statement list ss and a run of ss from ρ₀ ending normally or by an
exit in ρ': ρ' has the factory of ρ₀, and every variable defined in ρ₀ is defined
in ρ'.