The metadata a frame inference procedure operates on: the wp application metadata WPApp and the
FrameProc bundling an inference procedure with its frame operator and lattice-split rules.
@[frameproc] registration lives in FrameProcAttr.
A frame inference procedure: given the resource type R of the applicable frame operator
op : R → Pred → Pred, the goal's precondition, the wp metadata of a spec-ready program, and the
spec's precondition instantiated at the call site (the RHS of the spec's precondition VC pre ⊑ ·),
optionally produce a frame F : R to peel off. none leaves the spec to apply directly.
The caller instantiates and hash-conses F before the speculative spec application's metavariable
context is reset, so F may mention metavariables assigned during that application.
Equations
Instances For
How to decompose a lattice operator head … s⃗ on the RHS of an entailment: the distribution and
unfolding rewrites that saturate it, and the terminal ⊑-introduction terminals that close the
reduced form. head keys the split in the latticeOps table. A built-in connective contributes an
empty split (the shared built-in rewrites and terminals cover it); a frame operator adds its own.
- head : Name
Head constant of the operator this split decomposes. Keys the
latticeOpstable. - numConst : Nat
The number of leading arguments held constant during rule construction: the operator's carrier type and its typeclass instances. The operands and excess state arguments after them become the rule's schematic parameters.
2for a connective over aCompleteLatticecarrier;0for a monomorphic operator. Distribution and unfolding equalities that saturate the operator applied to state arguments.
The operator's terminal
⊑-introduction rule, ornonewhen it saturates to another operator's terminal.
Instances For
A frame inference procedure registered with @[frameproc], together with its frame operator. The
vcgen frontend selects the one whose prog matches the goal program's monad.
- prog : Name
Head constant of the program type (the monad) whose
wpthis procedure frames. Keys the procedure in thebyProgindex;vcgenconsults it for a program with that head. Builds the frame operator (head constant
op.head) applied to the goal's assertion type.- op : LatticeOp
The lattice split decomposing the frame operator on the RHS of an entailment.
- proc : Option FrameInferenceProc
The frame inference metaprogram, or
nonefor an operator framed only through an explicitframesclause.
Instances For
The registered frame inference procedures: byProg indexes the procedure by the program monad's
head constant (selected per node in solve); latticeOps indexes each frame operator's split by
its operator head (consulted by splitLatticeOp?).
- byProg : Std.HashMap Name FrameProc
- latticeOps : Std.HashMap Name LatticeOp
Instances For
Equations
Instances For
The default frame operator: lattice meet pre ⊓ F, the Hoare frame every complete lattice carries.
Framed only through an explicit frames clause (proc := none); used for a monad with no registered
@[frameproc].
Equations
- One or more equations did not get rendered due to their size.