The interpreter of steps and templates #
Steps (Interpreter.DStep) act on a state:
- choose an assignment from a table (
pick); - look up an operation in a table (
op); - guess a bit list (
bits); - reject unless a value is nonempty (
check).
Interpreter.dstepsF runs a list of steps, and its weighted values are the states after the steps
(Interpreter.execAll). Templates (Interpreter.Tm) are trees with holes that are filled from the
state (Interpreter.tmF).
From VP ≠ VNP over every field [Ant26], module NS1.DSteps.
Main definitions #
Interpreter.DStep,Interpreter.DStep.exec,Interpreter.DStep.cost,Interpreter.dstepF,Interpreter.execAll,Interpreter.dstepsF.Interpreter.Tm,Interpreter.Tm.expand,Interpreter.tmF,Interpreter.tmsF.
Main results #
Steps.
- pick (p : List Bool) (tab : Tree) : DStep
choose an option (a list of assignments) from the list that the table has at the value of
p - op (p q dst : List Bool) (φ : Tree) : DStep
dst := φ (value of p, value of q) - bits (p dst : List Bool) : DStep
if the value of
pis not empty: guess a bit list fordst - check (p : List Bool) : DStep
reject if the value of
pis empty
The program of a step; the argument is (step, trie); n is the length of guessed bit lists, in
binary.
Templates.
Recursive call of the expansion.
The program that fills in templates. The argument is (this program, (template, trie)).
Fill in a template: t gives the template, w the trie.