Expand description
Webizen VM — the Rights-Ontology governance gate over LLM/graph operations.
Library-ized from the former webizen.rs (pure code motion, no behaviour change):
arena— the 42MB zero-allocation SLG tabling arena + N3 rule firing.opcode— theSlgOpcodeWAM instruction set.vm—VmFrame, the VM helpers, andexecute_vm_frame.agreement— agreement DIDs + the personhood-category-error guard.
The full public surface is re-exported here, so every external path
(crate::governance::webizen::<Item>) resolves exactly as before.
Re-exports§
pub use agreement::*;
Modules§
Structs§
- Arena
Admit - Lease/scope wrapper over caller-owned arena backing.
- SlgArena
- VmFrame
- The Execution Frame tracking variable bindings without touching the heap
Enums§
- Arena
Budget Class - Budget class for a caller-owned backing size.
- Collision
Policy - Occupied hash-slot collision policy. Absence is never “complete facts”.
- Parity
Kind - Stored Quin parity classification. Never dual-accept without classifying.
- SlgOpcode
- The Opcodes for the Lightweight Warren Abstract Machine (WAM) variant.
f64parameters requirePartialEqonly —Eqis not derived.
Constants§
- MAX_
RULE_ STAGING - Maximum staged + live rules in one admit record.
- ORDINARY_
CELL_ BYTES - Ordinary cell budget ceiling. 42 MiB is the Sentinel pass, not the cell.
- QUIN_
ABI_ BYTES NQuinABI width. Must stay 48 bytes.- RECENT_
RING_ IS_ DURABLE - Recent-slot ring (512 entries in the arena) is lossy. Never durable.
- SENTINEL_
PASS_ BYTES - Sentinel pass working-set: exact 42 MiB slot backing (not the cell budget).
- SENTINEL_
SLOTS - Slots in exact 42 MiB backing:
SENTINEL_PASS_BYTES / QUIN_ABI_BYTES.
Functions§
- admit
- Acquire an exclusive RT-01 lease for
backing_bytesand bind scope + generations. - classify_
budget - Classify a caller backing size. Exact 42 MiB is the Sentinel pass; (42 MiB, 512 MiB]
is an ordinary cell. Smaller than 42 MiB is not a documented scratch class here.
Over 512 MiB is over the cell budget. Both fail closed as
QdnfError::Capacity. - classify_
parity - Classify stored parity. Canonical five-field wins when both XOR folds match
(e.g.
metadata == 0). Garbage isQdnfError::Malformed. Never dual-accept. - collision_
on_ occupied_ hash_ slot - Occupied hash-slot collision: always recompute. A miss is not completeness.
- empty_
entry_ is_ not_ allow - Empty / unoccupied table entries fail closed. They are not an allow.
- execute_
vm_ frame - The Bytecode Evaluator for the Prolog Webizen
- recent_
ring_ may_ certify_ obligation - The recent-slot ring is lossy. It must not certify obligation.