Compositional certificates and fun_prop automation for register-word glue #
This module re-exports CslibFrontier.Computability.WordRAM.Glue.Basic and provides the staged
comparison-operand selection combinators (GlueComputes.stage_pair, GlueComputes.ite_eq_staged,
GlueComputes.ite_lt_staged) together with the @[fun_prop] closure rules on GlueComputable.
Main results #
GlueComputes.stage_pair,GlueComputes.ite_eq_staged,GlueComputes.ite_lt_staged: staged-operand selection with explicit guard and branch costs.GlueComputable.proj,GlueComputable.const,GlueComputable.comp,GlueComputable.comp_many: register projections, constants, and scalar/vector composition.GlueComputable.ite_eq,GlueComputable.ite_lt: lazy branch selection on equality and<between input registers, which stages nothing and so imposes no envelope obligation on them.GlueComputable.ite_eq_staged,GlueComputable.ite_lt_staged: lazy branch selection on equality and<between arbitrary certified computed operands.GlueComputable.add,GlueComputable.sub,GlueComputable.mul,GlueComputable.div,GlueComputable.mod,GlueComputable.and,GlueComputable.or,GlueComputable.xor,GlueComputable.shiftLeft,GlueComputable.shiftRight(and*_standard): exact- and standard-basis binary closure rules.
Stage two computed words into fresh scratch slots and run a (k + 2)-input computation over
the original k input registers together with the two staged words, without copying the original
input registers.
Select between two computations by equality of two computed words. Both guard operands are staged once before the branch, and only the selected branch is executed.
Select between two computations by unsigned comparison of two computed words. Both guard operands are staged once before the branch, and only the selected branch is executed.
Reuse a named scalar computation after another computation, with explicit domain and envelope implications. This rule searches for the two functions, never for a budget.
Apply an opaque routine to any finite vector of computed local words. The component budgets are chosen uniformly, before the input/width quantifiers, and then summed explicitly.
Indexing a finite tuple is compile-time routing, so it adds no runtime instruction.
A singleton tuple has just its computed head; there is no empty-tail obligation.
Register-condition selection retains branch-specific domains.
Select by equality of input words, without evaluating the unchosen computation. The guard compares the input registers directly, so the operands need not fit the result envelope.
Select by unsigned comparison of input words. The guard compares the input registers directly, so the operands need not fit the result envelope.
Select by equality of computed words, without evaluating the unchosen computation. Both
operands are staged, so each must be certified within the result envelope; ite_eq handles
direct input-register comparisons without that obligation.
Select by unsigned comparison of computed words, without evaluating the unchosen
computation. Both operands are staged, so each must be certified within the result envelope;
ite_lt handles direct input-register comparisons without that obligation.
The standard basis's binary operation rule.
The exact basis's binary operation rule keeps its domain premise explicit.
Closure under exact-basis add; the common envelope also bounds this result.
Closure under exact-basis sub; the common envelope also bounds this result.
Closure under exact-basis mul; the common envelope also bounds this result.
Closure under exact-basis div; the common envelope also bounds this result.
Closure under exact-basis mod; the common envelope also bounds this result.
Closure under exact-basis and; the common envelope also bounds this result.
Closure under exact-basis or; the common envelope also bounds this result.
Closure under exact-basis xor; the common envelope also bounds this result.
Closure under exact-basis shiftLeft; the common envelope also bounds this result.
Closure under exact-basis shiftRight; the common envelope also bounds this result.
Closure under standard-basis add; the common envelope also bounds this result.
Closure under standard-basis sub; the common envelope also bounds this result.
Closure under standard-basis mul; the common envelope also bounds this result.
Closure under standard-basis div; the common envelope also bounds this result.
Closure under standard-basis mod; the common envelope also bounds this result.
Closure under standard-basis and; the common envelope also bounds this result.
Closure under standard-basis or; the common envelope also bounds this result.
Closure under standard-basis xor; the common envelope also bounds this result.
Closure under standard-basis shiftLeft; the common envelope also bounds this result.
Closure under standard-basis shiftRight; the common envelope also bounds this result.