ilusm.dev

ilu_isa

ISA summary and architecture introspection for the pln domain - enumerate all opcodes with opcode number, name, and example text; list the three ilusm execution layers; list known architecture gaps; and read the current bytecode version constant ILU_BC_VER.

Load with: use ilu_isa

What this module does

ilu_isa provides a reflection surface over the ilusm instruction set architecture. It is used by the pln (planning) domain and tooling that needs to introspect the available opcodes or understand which execution layer will run a given program. The opcode list is sourced from mcde.ilu via mcdops().

Quick example

use ilu_isa

# List all opcodes
ops = ilu_isa_summary()
trl.ech(ops, \(o) prn(str(o.op) + " " + o.nm + "  ex: " + o.ex))

# Execution layers
prn(ilu_execution_layers())
# ["tree-walk (evl)", "bytecode (ilusm_vm)", "native (jit/ffi)"]

# Bytecode version
prn(ilu_isa.bcver())  # e.g. 3

# Architecture gaps (known missing features)
prn(ilu_isa_architecture_gaps())  # []

Functions

Introspection

ilu_isa_summary() / ilu_isa.summary()

Returns the list of all ISA opcodes, each as {op, nm, ex} - opcode number, short name, and example text.

ilu_execution_layers() / ilu_isa.layers()

Returns the three execution layer names: "tree-walk (evl)", "bytecode (ilusm_vm)", and "native (jit/ffi)".

ilu_isa_architecture_gaps() / ilu_isa.gaps()

Returns the list of known architecture limitations or unimplemented features. Currently returns [].

ilu_isa.bcver()

Returns the current bytecode version constant ILU_BC_VER.

Notes

  • Requires ../backend/mcde.ilu and trl.
  • Used internally by the pln module for ISA-aware planning.