Documentation

CslibFrontier.Computability.WordRAM.PointerMachine.Representation

Word-RAM states represented by pointer-machine dictionaries #

The logical AVL tree witnesses the shape and height of the concrete heap dictionary. Its cardinality counts stored addresses, including entries whose value has subsequently become zero. Program counters are separate from this data representation.

The register bank and linked AVL dictionary implement one RAM data state.

theorem Cslib.WordRAM.PointerMachine.Represents.with_pc {w r : ℕ} {x : Data r} {s : PointerMachine.State (model w) (layout r)} {tree : BinaryTree (DataStructure.SearchTree.PointerMachine.Label (model w) 2)} {avl : DataStructure.AVLTree ℕ} (h : Represents x s tree avl) (pc : ℕ) :
Represents x { pc := pc, ptr := s.ptr, data := s.data, heap := s.heap } tree avl

Changing the program counter preserves the data representation.