Counts in the logic, where they depend on the data
Library · Source module
Counts in the logic, where they depend on the data
NLAlib.Ops.ConditionalRuns.of_run bounds counts by the static cost. It charges bindIdx at every value up to its bound and covers all branches and loop iterations. NLAlib.Ops.RunsFromW gives its postcondition the counts that the eval added and the final memory. The bound can depend on the data, on the starting state of a continuation, and on weights such as a superadditive function of the dimensions.
One rule per constructor: skip, seq (the continuation is proved from the state and the counts reached), call (one call, at its dimensions), ite, bindIdx (charged at the value read), alloc, loop (an invariant on the counts so far and the memory), whileFuel, frame; and NLAlib.Ops.RunsFromW.of_wp takes everything whose counts do not depend on the data from Wp with its static cost. A RunsFromW from the initial state is a NLAlib.Ops.ConditionalRunsW (NLAlib.Ops.RunsFromW.runsW) or a NLAlib.Ops.ConditionalRuns (NLAlib.Ops.RunsFromW.runs), which linking transfers (NLAlib.Ops.ConditionalRunsW.link, NLAlib.Ops.exec_link_weight).
NLAlib.Ops.RunsFromWL is the same judgment for partial correctness: if the counted run from the state succeeds, it stays within the workspace and the postcondition holds of the counts added and the final memory. It has the same rules, read in parallel: where the total rule is given the Boolean of a test, the value of a conversion or a live frame, the liberal rule is proved for every Boolean the test may return, every value within the bound, and under the hypothesis that the frame is live; abort is vacuous. NLAlib.Ops.RunsFromWL.of_static is the static count with no hypothesis at all (NLAlib.Ops.exec_within). It says nothing of success, so a target never rests on it alone; what it is for is the accounting certificate of an implementation, which speaks of every successful run (NLAlib.Ops.Table.AccountsW.of_runsFromWL).
Main results
* NLAlib.Ops.RunsFromW: the judgment. * NLAlib.Ops.RunsFromW.seq, NLAlib.Ops.RunsFromW.bindIdx, NLAlib.Ops.RunsFromW.loop, NLAlib.Ops.RunsFromW.whileFuel and the other rules. * NLAlib.Ops.RunsFromW.of_wp, NLAlib.Ops.RunsFromW.runsW, NLAlib.Ops.RunsFromW.runs. * NLAlib.Ops.RunsFromWL: the liberal judgment, with skip, abort, seq, call, ite, bindIdx, alloc, frame, loop, whileFuel, mono, and, of_static, of_wp. * NLAlib.Ops.RunsFromWL.of_runsFromW, NLAlib.Ops.RunsFromWL.runsFromW: total and liberal. * NLAlib.Ops.RunsFromW.link_from, NLAlib.Ops.RunsFromWL.link_from, NLAlib.Ops.RunsFromWL.link: linking from counted states and from the initial state. * NLAlib.Ops.Table.AccountsW.of_runsFromWL, NLAlib.Ops.RunsFromWL.runsL, NLAlib.Ops.RunsFromWL.exec_init: the table certificate and the forms from the initial state.
Declarations
- NLAlib.Ops.RunsFromW
- NLAlib.Ops.RunsFromW.alloc
- NLAlib.Ops.RunsFromW.bindIdx
- NLAlib.Ops.RunsFromW.call
- NLAlib.Ops.RunsFromW.frame
- NLAlib.Ops.RunsFromW.ite
- NLAlib.Ops.RunsFromW.link_from
- NLAlib.Ops.RunsFromW.loop
- NLAlib.Ops.RunsFromW.mono
- NLAlib.Ops.RunsFromW.of_wp
- NLAlib.Ops.RunsFromW.runs
- NLAlib.Ops.RunsFromW.runsW
- NLAlib.Ops.RunsFromW.seq
- NLAlib.Ops.RunsFromW.skip
- NLAlib.Ops.RunsFromW.whileFuel
- NLAlib.Ops.RunsFromWL
- NLAlib.Ops.RunsFromWL.abort
- NLAlib.Ops.RunsFromWL.alloc
- NLAlib.Ops.RunsFromWL.and
- NLAlib.Ops.RunsFromWL.bindIdx
- NLAlib.Ops.RunsFromWL.call
- NLAlib.Ops.RunsFromWL.exec_init
- NLAlib.Ops.RunsFromWL.frame
- NLAlib.Ops.RunsFromWL.ite
- NLAlib.Ops.RunsFromWL.link
- NLAlib.Ops.RunsFromWL.link_from
- NLAlib.Ops.RunsFromWL.loop
- NLAlib.Ops.RunsFromWL.mono
- NLAlib.Ops.RunsFromWL.of_runsFromW
- NLAlib.Ops.RunsFromWL.of_static
- NLAlib.Ops.RunsFromWL.of_wp
- NLAlib.Ops.RunsFromWL.runsFromW
- NLAlib.Ops.RunsFromWL.runsL
- NLAlib.Ops.RunsFromWL.seq
- NLAlib.Ops.RunsFromWL.skip
- NLAlib.Ops.RunsFromWL.whileFuel
- NLAlib.Ops.St.Reach
- NLAlib.Ops.St.Reach.refl
- NLAlib.Ops.St.Reach.tick
- NLAlib.Ops.St.Reach.trans
- NLAlib.Ops.Table.AccountsW.of_runsFromWL