ElaboratedPlusCal pinned at Typed2Computable's output rather than the type checker's — the
same Statement/Block/Branches/Ref/Declarations/Process/Algorithm layer
TypedPlusCal pins, but at ComputableTLAPlus's types. See Core/TypedPlusCal/Syntax.lean's
module doc for why this pass needs no separate monomorphic copy.
Computable PlusCal expressions — always ComputableTLAPlus.Expression at
ComputableTLAPlus.Typ.
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Advances a reference's type by one path step: a field name projects a record, an index expression enters a function, sequence or tuple.
Equations
- ComputablePlusCal.Ref.stepType (SurfaceTLAPlus.Typ.record fs) (Sum.inl field) = (List.lookup field fs).getD (SurfaceTLAPlus.Typ.record fs)
- ComputablePlusCal.Ref.stepType τ (Sum.inl field) = τ
- ComputablePlusCal.Ref.stepType (x_1.function rng) (Sum.inr idx) = rng
- ComputablePlusCal.Ref.stepType elem.seq (Sum.inr idx) = elem
- ComputablePlusCal.Ref.stepType (SurfaceTLAPlus.Typ.tuple τs) (Sum.inr (ComputableTLAPlus.Expression.nat n)) = (n.toNat?.bind fun (x : ℕ) => τs[x - 1]?).getD (SurfaceTLAPlus.Typ.tuple τs)
- ComputablePlusCal.Ref.stepType (SurfaceTLAPlus.Typ.tuple τs) (Sum.inr idx) = SurfaceTLAPlus.Typ.tuple τs
- ComputablePlusCal.Ref.stepType τ (Sum.inr idx) = τ
Instances For
The type a Ref's bracket-index expression must have at one particular .inr step, given
the type before that step (unlike stepType, which gives the type after). Used by
Computable2Guarded/Par.lean's parRef to annotate hoisted index-temp with-bindings.
Equations
Instances For
The type a whole reference denotes: its base type, advanced one Ref.stepType per index.