The output of Computable2Guarded: every guard (await/receive/with) sits at the very
start of its atomic branch. Reuses ElaboratedPlusCal.Ref/.Multicast rather than
redefining them — Computable2Guarded's Ref field-access fix (Core/TypedPlusCal/Syntax.lean)
flows through automatically. Unlike ElaboratedPlusCal, Statement here is genuinely flat: by
this stage every if/while/either has already been rewritten away into AtomicBranch's
precondition/action split (𝒞_cflow/𝒞_flat/𝒞_reord), so no constructor embeds a nested
Block/Branches the way CorePlusCal.Statement.if/.while/.either do — no mutual,
partial, or position tracking is needed anywhere in this file (ElaboratedPlusCal carries
none either, see Typed2Computable/PlusCal.lean's module doc).
Block, unlike every other type here, is generic over an arbitrary index family
α : Bool → Type, not (Typ Expr : Type), since it's purely structural and doesn't reference
Typ/Expr at all. Block (Statement Typ Expr true) false/Block (Statement Typ Expr false) true both instantiate it.
Pinned at ComputableTLAPlus.Typ/ComputablePlusCal.Expression for this pass's actual use
(ComputableGuardedPlusCal below), the same way Core/ComputablePlusCal/Syntax.lean pins the
shared ElaboratedPlusCal layer rather than forking a monomorphic copy.
Equations
- GuardedPlusCal.Block.traverse f B = GuardedPlusCal.Block.mk <$> List.traverse f B.begin <*> f B.last
Instances For
Block's list-like interface. end/cons are the constructors the semantics recurses on;
toList/ofList are the two halves of the isomorphism with non-empty lists; concat/prepend
extend a block on the right and on the left. All abbrevs or @[reducible] so that rw sees
through them in Semantics/Lemmas.lean.
Equations
- GuardedPlusCal.Ref Typ Expr = ElaboratedPlusCal.Ref Typ Expr
Instances For
Equations
- GuardedPlusCal.Multicast Typ Expr = CorePlusCal.Multicast Typ Expr
Instances For
ElaboratedPlusCal.Ref carries no Bifunctor/Bitraversable instance (it has an extra
baseType : τ field, same reason Typed2Computable/PlusCal.lean's Ref.toComputable is
hand-written rather than a generic bitraverse call) — small local helpers instead, used only by
Statement's instances below, not registered as global instances.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
A statement in the Guarded PlusCal language. The first Bool (guardClass) is true for a
statement allowed in a branch's precondition (with/await/receive); the second (terminal)
is true only for goto, which always ends a branch's action block.
- with
{Typ Expr : Type}
(name : String)
(ann : Typ)
(bound : Bool)
(e : Expr)
: Statement Typ Expr true false
Body-less: a
with's nested body is un-nested into flat sequencing by𝒞_flat/𝒞_reordbefore reaching this type (boundistruefor=,falsefor∈).anncarriesname's type through unchanged fromComputablePlusCal.Statement.with— every earlier pass keeps a fresh binder's type available this way, so this stage shouldn't be the one that drops it. - await {Typ Expr : Type} (e : Expr) : Statement Typ Expr true false
- receive {Typ Expr : Type} (c r : Ref Typ Expr) (coe : TypedTLAPlus.Coercion) : Statement Typ Expr true false
- skip {Typ Expr : Type} : Statement Typ Expr false false
- print {Typ Expr : Type} (e : Expr) : Statement Typ Expr false false
- assert {Typ Expr : Type} (e : Expr) : Statement Typ Expr false false
- send {Typ Expr : Type} (c : Ref Typ Expr) (e : Expr) : Statement Typ Expr false false
- multicast {Typ Expr : Type} (c : String) (filter : Multicast Typ Expr) : Statement Typ Expr false false
- assign
{Typ Expr : Type}
(r : Ref Typ Expr)
(e : Expr)
: Statement Typ Expr false false
Single target — parallel assignment is eliminated by
𝒞_parbefore reaching this type. - goto {Typ Expr : Type} (label : String) : Statement Typ Expr false true
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
The one name a statement binds, if any — with's binder, and nothing else. Lives here rather
than beside either of its users because both WellFormedness.WellScoped.GuardedPlusCal (where a
binder must be fresh against the enclosing scope) and Guarded2Network's Fresh (where a binder
must not shadow the pass's generated inbox) need exactly this, and stating it twice is how the two
drift. Stated for every guard class, since only Guarded2Network needs the action one and the
answer there is always none.
Equations
- (GuardedPlusCal.Statement.with name ann bound e).boundName? = some name
- x✝.boundName? = none
Instances For
Equations
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
- label : String
- branches : List (AtomicBranch Typ Expr)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
One parallel {...} thread — a sequence of labelled atomic blocks, in program order.
AtomicBlock already carries a label, unlike ElaboratedPlusCal.Process.threads's
List (String × Block τ ε true) pairing, so no separate label pairing is needed here.
Equations
- GuardedPlusCal.Thread Typ Expr = List (GuardedPlusCal.AtomicBlock Typ Expr)
Instances For
What a scope declares: its variables with their initializers, its channels, and its FIFOs.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
A declared process: its optional mailbox, its fairness, its identity, its own declarations, and
its parallel threads, each a Thread Typ Expr of self-labelled atomic blocks.
- isFair : Bool
- name : String
- =|∈ : Bool
- id : Expr
- localState : Declarations Typ Expr
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
- isFair : Bool
- name : String
- globalState : Declarations Typ Expr
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.