Documentation

CslibFrontier.Computability.WordRAM.PointerMachine.Defs

Scalar basis for pointer simulation of the standard word RAM #

The source machine's words, including numerical memory addresses, are scalar values. Its arithmetic operations act on those scalars. The simulator's own heap addresses remain opaque pointers: no scalar operation receives or produces a pointer. AVL navigation resolves numerical memory addresses to heap nodes.

The word-width operation is interpreted at the source width. Scalar overflow is immaterial to the forward simulation of successful source executions; no fault correspondence is claimed.

Standard word operations together with constants and the AVL height operation.

  • constant (value : ℕ) : Operation

    A program constant, independent of both arguments.

  • bin (operation : BinOp) : Operation

    A standard binary word-RAM operation on scalar words.

  • width : Operation

    Read the source word width.

  • maxSucc : Operation

    The AVL height operation.

Scalar comparisons used by the source and by the AVL dictionary.

  • eq : Test

    Equality of scalar words.

  • lt : Test

    Strict scalar order.

  • le : Test

    Nonstrict scalar order, used by balancing.

  • heavy : Test

    The first height exceeds the second by at least two.

@[reducible, inline]

Natural words and heights, with precisely the source arithmetic and AVL scalar operations. The width affects only the width-reading primitive, not pointer interpretation.

@[reducible, inline]

Seven navigation registers, four scalar scratch registers, then the source register bank. Records contain left/right/parent links and key/height/value scalar fields.

Place source registers after query, two AVL temporaries, and dictionary value scratch.

Source registers never alias any dictionary scalar scratch register.

Source register names do not alias the four scalar scratch registers.

The register placement preserves distinct source registers.