Skip to main content

Module concurrency

Module concurrency 

Source
Expand description

Concurrency determinacy model + classifier (Phase 0 of work/FINISH_INTERPRETER.md).

This module is the single source of truth for the language’s concurrency memory model and the determinacy classifier that labels a program as belonging to the determinate (Kahn-deterministic) or nondeterminate fragment. The classifier is consumed by AOT mode selection (Phase 8) and translation validation (Phase 11), so both agree on one boundary.

Re-exports§

pub use classify::branches_independent;
pub use classify::branches_share_mutable_state;
pub use classify::classify_program;
pub use marshal::materialize;
pub use marshal::rebuild;
pub use marshal::MarshalError;
pub use model::Determinacy;
pub use model::NondetKind;
pub use model::NondetWitness;
pub use send_check::check_send_escape;
pub use send_check::SendDiagnostic;

Modules§

bridge
The async↔scheduler bridge.
channel
SecureChannel envelope — the end-to-end crypto seam that wraps the opaque wire blob marshal produces, between the codec and the transport.
classify
Determinacy classifier — a whole-program AST walk.
driver
The interpreter task driver.
fec
Reed-Solomon erasure coding over GF(2^8) — the wire codec’s redundant knob.
marshal
Marshalling between the interpreter’s RuntimeValue and the Send-able [RtPayload] that crosses task/thread boundaries through channels.
model
Concurrency memory model — the normative determinacy table.
pnp
PNP — the information-theoretic true one-time pad tier, the last resort should computational cryptography fall (the P = NP scenario the name marks).
send_check
Send / escape analysis — the static soundness gate for the concurrency memory model (Phase 4 of work/FINISH_INTERPRETER.md).
stream
Streaming framing / deframing — process a byte STREAM of length-delimited messages INCREMENTALLY, as bytes arrive, without ever buffering the whole stream. This is the basis of every streaming protocol (gRPC, Arrow Flight, Kafka): a producer frames each message as [uvarint length][body]; a consumer feeds arriving chunks — ANY chunking, from byte-at-a-time to many frames at once to a frame split across chunks — to a StreamDeframer, which hands back each complete frame the instant it is buffered, ZERO-COPY (the body is a borrowed slice, so pair it with crate::concurrency::marshal::view_message for a fully in-place stream read).
vm_driver
The VM task driver (T11).

Functions§

net_is_offline
Whether Connect should skip the real dial and run as a single-node local no-op.
set_net_offline
Enter (or leave) OFFLINE networking mode — see [NET_OFFLINE]. Set by the deterministic tree-walker / VM oracles; unset in the browser/relay paths.
uses_scheduler
Does the program use Go-like concurrency (channels / tasks / select) that must run on the scheduler-driven interpreter path?