Standard ML runtime case study

Uses a Standard ML compiler and bytecode VM as a case study for vertical slicing, type inference, pattern compilation, closures, explicit stacks, and arena-indexed object graphs.

Research
Last verified
Not verified
Updated
Reading time
1 minutes

Uses a Standard ML compiler and bytecode VM as a case study for vertical slicing, type inference, pattern compilation, closures, explicit stacks, and arena-indexed object graphs.

Architecture topic: this page does not claim that the WordPress website implements or executes the described runtime behavior.

Compiler pipeline

Lexing and parsing feed elaboration and Hindley–Milner inference, pattern compilation, closure conversion, bytecode generation, and virtual-machine execution.

Runtime structures

An explicit value stack, return stack, environment representation, tagged values, closure records, and arena-indexed object graph make control and memory visible.

Vertical slicing

Implement arithmetic end to end first, then lexical scope, heap objects, functions, patterns, and optional diagnostic intelligence. Each slice should remain executable and testable.

Research boundary

This case study does not imply that MiRust.com ships a Standard ML runtime.

Scope

This starter page defines the questions, boundaries, evidence, and failure modes that should be recorded before a capability is presented as supported.

Engineering considerations

  • Identify the source, version, target environment, and owner.
  • Separate observed values from estimates and externally reported values.
  • Record trade-offs, unsupported cases, and fallback behavior.
  • Link performance statements to a compatible benchmark methodology.

Verification questions

  • What exact artifact, revision, backend, and environment were reviewed?
  • Which assumptions could change the result?
  • Which data should be retained so another engineer can reproduce the conclusion?