The call rule
Library · Source module
The call rule
One rule for a call of an operation under a contract in operand form (NLAlib.Ops.BlockRel), whatever the contract: relational, functional, with a window, with any number of input and output blocks.
Main results
* NLAlib.Ops.wp_call_rel, the rule, in every mode: from the input blocks that are read, the continuation receives output blocks of the declared lengths, related to the inputs and to the window, written at the output operands, and the position advanced by the window. * NLAlib.Ops.wp_call_rel_liberal: partial correctness, with nothing to prove about the memory; the continuation also receives that the inputs were read and that there was room.
Everything else here is a corollary for a shape of the outputs or of the contract, so that the continuation is stated on blocks and cells instead of lists of blocks:
* one output block, one output cell, two output blocks: NLAlib.Ops.wp_call_rel1, NLAlib.Ops.wp_call_rel_cell, NLAlib.Ops.wp_call_rel2; * a functional contract, where the call is an equation: NLAlib.Ops.wp_call_fn, NLAlib.Ops.wp_call_fn_liberal, and on cells NLAlib.Ops.wp_call_const, wp_call_un, wp_call_bin, wp_call_tern, wp_call_draw.
The tactic wp_call (NLAlib.Ops.Tactic) applies the right one and discharges the side goals.