Skip to content

feat: V2 phase 3A — VDBE core (interpreter, registers, control/result/arithmetic/compare opcodes) #89

Description

@iheitlager

Refs: 009/Req-1, 009/Req-2, 009/Req-3, 009/Req-4
Part of epic #56, V2 phase 3 (0.7.0). Depends on: #78 (kernel) + #87 (frozen opcode set) + #88 (spec 009). Can start the moment #78 lands — does not wait for the parser (#61).

Scope (src/vdbe/)

  • Instruction/Opcode/Program types per spec 009; register file of Values
  • Fetch-decode-execute loop: Init/Goto/Halt/Return/Once, conditional jumps (IfNot/IfPos/IfNotZero/DecrJumpZero, IsNull/NotNull), OffsetLimit counters
  • Result ops: Integer/String8/Null/Copy/MakeRecord/ResultRow
  • Arithmetic (Add/Subtract/Multiply/Divide/Remainder) and comparisons (Lt/Le/Gt/Ge/Eq/Ne) — all value semantics delegated to src/semantics (spec 008); zero semantic logic in the opcode bodies
  • Coercion ops: RealAffinity/MustBeInt/CollSeq via kernel apply_affinity/collation registry
  • Acceptance oracle: spike 008's expression vectors (tests/corpus/expr_vectors/) reproduce bit-exact through hand-assembled programs — the ratchet pays off here, before any codegen exists

Assurance obligations

mvl-limit clean; no-panic totality (bad programs → structured Err, never panic; fuzz target on arbitrary instruction streams); per-scenario Tests links in spec 009; #65's dashboard line starts counting opcodes-implemented.


🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions