Documentation

Complexity.Computability.Ram.Compiler.Language.Arena.Tactic

Structural arena resource proofs #

ram_source_arena_step composes the existing ArenaMeasured rules for primitive bindings, assignment, sequencing, conditionals, option matches and returns, stopping at calls. It reads the actual source statement; clients do not reconstruct argument environments or continuation states. A known Boolean selects its actual branch; an unknown Boolean gives two proof obligations, each charging only its own path. Option matches likewise inspect the actual source value and bind its stored payload, retaining ranges obtained from the actual callee's readiness proof.

ram_source_arena_step using total as currentTotal additionally transports an existing source total-correctness proof through primitive bindings and sequencing. It stops at the next other statement, retaining its matching proof as currentTotal. A sequence carries the source postcondition into the measured outcome: normal completion supplies totality of the continuation at its actual intermediate state, while early return retains only the original return contract.

ram_source_arena_call exact using cost consumes an actual callee cost witness. Its optional via embedded transports a witness from the original source program. ram_source_arena_call measured using certificate directly composes an existing returning ArenaMeasured, retaining its observations without witness unpacking. The same optional embedding supports imported measured bodies. Adding as finish value cursor steps observed fits names the six actual continuation arguments and pauses before its structural statements. This permits preparing a result-dependent callee certificate once before a later branch is split; ram_source_arena_step resumes the ordinary structural pass. ram_source_arena_call (index := x) using total, resources, bounded instead uses independent source correctness, arena resource and cost contracts. Add via embedded to use contracts for an imported source program. By default all forms resume structural reasoning after the call, stopping at the next call.

The contract form exposes the real returned value, heap, cursor and core count, including the proved bound on that count. Mathematical preconditions, capacity and final cost comparisons remain ordinary goals. No continuation budget is guessed, and no callee implementation or instruction-price table is unfolded.

Compose the structural measured-execution rules with a supplied leaf pass. Calls remain intact, and non-propositional metavariables are never filled by search. Clients can normalize their own proof coordinates without duplicating these rules.

Compose non-loop structural statements in a measured arena execution, leaving the next call and mathematical obligations for explicit proofs. Conditionals and option matches preserve the selected path's actual heap, cursor and count.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Transport supplied source totality through primitive bindings and sequencing. Stop at the next other statement and name its matching total-correctness proof. Sequential outcomes retain source facts at their actual intermediate state.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Compose the current actual source call with an exact callee cost witness, then process structural statements in its actual continuation.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Compose an existing measured body, retaining its observations at the actual returned heap, value, cursor and count. An embedding supports imported bodies.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Name the actual returned state, value, cursor, core count, observations and value-range proof, then pause before the continuation. Resume with ram_source_arena_step after preparing result-dependent facts or certificates.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Compose the current source call using independent correctness, resources and cost contracts. An optional embedding transports original imported contracts.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For