Expand description
Cognitum Gate Kernel
A no_std WASM kernel for worker tiles in a 256-tile coherence gate fabric. Each tile maintains a local graph shard, accumulates evidence for sequential testing, and produces witness fragments for aggregation.
§Architecture
The coherence gate consists of 256 worker tiles, each running this kernel. Tiles receive delta updates (edge additions, removals, weight changes) and observations, process them through a deterministic tick loop, and produce reports containing:
- Local graph state (vertices, edges, components)
- Evidence accumulation (e-values for hypothesis testing)
- Witness fragments (for global min-cut aggregation)
§Memory Budget
Each tile operates within a ~64KB memory budget:
- CompactGraph: ~42KB (vertices, edges, adjacency)
- EvidenceAccumulator: ~2KB (hypotheses, sliding window)
- TileState: ~1KB (configuration, buffers)
- Stack/Control: ~19KB (remaining)
§WASM Exports
The kernel exports three main functions for the WASM interface:
ingest_delta: Process incoming delta updatestick: Execute one step of the deterministic tick loopget_witness_fragment: Retrieve the current witness fragment
§Example
ⓘ
// Initialize tile
let tile = TileState::new(42); // Tile ID 42
// Ingest deltas
tile.ingest_delta(&Delta::edge_add(0, 1, 100));
tile.ingest_delta(&Delta::edge_add(1, 2, 100));
// Process tick
let report = tile.tick(1);
// Get witness
let witness = tile.get_witness_fragment();Modules§
- delta
- Delta types for incremental graph updates
- evidence
- Evidence accumulator for anytime-valid coherence gate
- report
- Tile report structures for coherence gate coordination
- shard
- Compact graph shard for tile-local storage
Structs§
- Tile
State - Tile state containing all local state for a worker tile
Constants§
- MAX_
DELTA_ BUFFER - Maximum deltas in ingestion buffer
Functions§
- get_
memory_ usage - Get memory usage in bytes
- get_
status ⚠ - Get tile status
- get_
witness_ ⚠fragment - Get the current witness fragment
- ingest_
delta ⚠ - Ingest a delta from raw memory
- init_
tile ⚠ - Initialize the tile with the given ID
- reset_
tile ⚠ - Reset the tile state
- tick⚠
- Execute one tick of the kernel