Size bounds along machine runs #
Along the run of the evaluation machine that simulates a derivation Eval env p r t, every
configuration stays bounded (CfgBound): values have size at most V (where t ≤ V and
the initial values are at most V, since every value produced is the result of a
sub-derivation of cost at most t), environments have length at most L + 2 t, programs
are subterms of the initial ones, and the stack gains at most t frames
(eval_steps_bound). Consequently the data encoding of every configuration along the run
has size polynomial in the sizes of the program, the input and the cost
(size_toData_le). This is what bounds the cost of the self-interpreter.
Bounds on configurations #
Bounds on a frame: values of size at most V, an environment of length at most L,
a program of size at most P.
Equations
- MIPRE.Cost.Machine.FrameBound V L P (MIPRE.Cost.Machine.Frame.cons1 t env) = (MIPRE.Cost.esize t ≤ P ∧ List.length env ≤ L ∧ ∀ v ∈ env, v.size ≤ V)
- MIPRE.Cost.Machine.FrameBound V L P (MIPRE.Cost.Machine.Frame.cons2 a) = (a.size ≤ V)
- MIPRE.Cost.Machine.FrameBound V L P (MIPRE.Cost.Machine.Frame.let1 b env) = (MIPRE.Cost.esize b ≤ P ∧ List.length env ≤ L ∧ ∀ v ∈ env, v.size ≤ V)
- MIPRE.Cost.Machine.FrameBound V L P (MIPRE.Cost.Machine.Frame.loop1 b env) = (MIPRE.Cost.esize b ≤ P ∧ List.length env ≤ L ∧ ∀ v ∈ env, v.size ≤ V)
Instances For
Bounds on a configuration: values of size at most V, environments of length at most
L, programs of size at most P, a stack of length at most K.
- frames (f : Frame) : f ∈ c.kont → FrameBound V L P f
Instances For
Program subterms #
Chaining bounds along runs #
Size of the encoded configurations #
Runs from the empty stack are bounded forever #
Along the run of a derivation from the empty stack, every configuration — also after the final one, which is fixed — is bounded.