0%

Walking Skeleton — Real Program Slice

Goal

Prove the production spine from the shared executable-program artifact through bytecode and the VM to the real CLI, without creating a second realization pipeline.

Implementation Sketch

  • Create a dedicated ori_vm crate with unsafe_code = "deny", depending only on backend-neutral compiler/runtime crates.
  • Add VmBackend beside LlvmBackend at the existing backend boundary. It consumes the canonical ExecutableProgram; it does not call ARC lowering, canonicalization, or method/derive discovery itself.
  • Use a deliberately small provisional encoding and safe typed slots. The slice includes straight-line arithmetic plus one call target outside the ordinary-function cache (an impl method, derive, or built-in descriptor) so the closed-program prerequisite is actually tested.
  • Expose the slice through the existing backend selector as ori run --backend=vm. Keep --dual as a diagnostic mode, not a separate realization path.
  • Compare stdout, stderr class, exit status, and leak counters with the tree-walker and LLVM. A missing callable must fail cleanly rather than panic or fall through to LLVM.

Layer Coverage

LayerDisposition
L1N/A: no grammar changes.
L2N/A: no typechecking changes.
L3N/A: no canonicalization changes.
L4Covered by the skeleton post-AIMS artifact criterion.
L5Covered by the VM execution criterion.
L6Covered by the LLVM-debug backend-selection regression criterion.
L7Covered by the LLVM-release backend-selection regression criterion.
L8Covered by the AOT backend-selection regression criterion.
L9Covered by the section cross-executor criterion.
L10Covered by the section leak-freedom criterion.
L11Covered by the skeleton spec-fixture criterion.
L12Covered by the real ori run --backend=vm criterion.

Work Items

  • Scaffold safe ori_vm plus VmBackend at the existing backend boundary; consume the canonical executable-program artifact and add provisional typed slots/encoding without a second ARC path.
  • Drive arithmetic plus a non-ordinary callable through real ori run --backend=vm; assert output, exit, parity, and leak behavior and fail cleanly for an intentionally missing callable.