Register-machine kernel of the closure loops #
The counter code compiled from transitive-closure (FO(TC)) and deterministic-transitive-closure
(FO(DTC)) formulas over the canonical ordered language shares one kernel. It evaluates a term
whose free variables sit in registers, tests whether the current tuple of a closure loop differs
from the target tuple, decodes a base-n code into a tuple of registers, and loads the source
tuple of a closure.
Main definitions #
Cslib.Logic.FO.Ordered.ClosureKernel.termE: a term as an expression.Cslib.Logic.FO.Ordered.ClosureKernel.testExpr: positive exactly when the current tuple differs from the target tuple.Cslib.Logic.FO.Ordered.ClosureKernel.digitE: digitiof a base-ncode.
Main results #
Cslib.Logic.FO.Ordered.ClosureKernel.reaches_digitsCode: decoding a code into a tuple.Cslib.Logic.FO.Ordered.ClosureKernel.reaches_loadCode: loading the source tuple of a closure.Cslib.Logic.FO.Ordered.ClosureKernel.eval_termE_of_atomic: a compiled term computes its value.
References #
A term with free variables in registers, as an expression.
Instances For
A term compiled by termE computes its value, given correct atomic handlers.
The test of the closure loop: positive exactly when the current tuple differs from the target tuple.
Instances For
Digit i in base n (register 0) of register r: the decoding of a code into a tuple.
Instances For
Decoding register r, holding g < n ^ k, into registers d + i writes the tuple
finFunctionFinEquiv.symm g.
Loading the source tuple s₀ of a closure, denoted by expressions src that read only
registers below base, into registers base + i.
The pair of a tuple in registers base + i and a tuple in registers base + k + i is in
registers base + i, for i < 2 * k.
The registers of the extended assignment of an existential body: the new variable in
register base, the others in their registers.