Expand description
Bytecode program validation: structural checks, address validation, and stack-type simulation.
Validation runs in layers:
- Structural (always): operand bounds, arity limits, instruction ordering
- Architecture (when arch spec provided): address validity
- Stack simulation (when enabled): type checking via abstract interpretation
Enums§
Functions§
- simulate_
stack - Simulate the type-level stack through the instruction stream.
Collects type errors and stack underflow errors.
If an
ArchSpecis provided, also validates lane groups atMoveinstructions. - validate_
addresses - Validate addresses in the program against an architecture specification. Checks each constant location, lane, and zone instruction to ensure the encoded address refers to valid entries in the arch spec.
- validate_
arch_ constraints - Validate all architecture-dependent constraints (addresses + capabilities).
- validate_
capabilities - Validate device capability constraints against the program.
- validate_
structure - Run structural validation on a program. Returns collected errors.