Mark a function async to have it return a promise; inside, await pauses until the awaited promise settles.
quantifies over strategies rather than paths: whatever the agents outside do, the coalition can force . With empty it collapses to CTL’s “all paths”; with everyone, to “some path”.
Multiplicative resources become copyable when marked , letting you recover classical behaviour where needed.
SAT instances are expressed over Boolean variables; each variable can appear positive or negated in clauses.
Returns {:ok, ast} or {:error, reason}. Use the bang variant Code.string_to_quoted!/1 to raise on parse failure. Every node in the resulting AST is a {form, metadata, args} tuple; pass columns: true and token_metadata: true for full position information.
abbreviates the infinite conjunction , where means “everyone in knows”. Unattainable over unreliable channels, per the coordinated attack argument.
Example: . In type theory this corresponds to dependent sums.
Use for await...of on objects implementing Symbol.asyncIterator, including many Node streams and custom async generators.
Generator function declaration syntax. The asterisk (*) indicates the function is a generator that can yield multiple values over time. When called, returns an iterator object. Combined with async, creates async generators for async iteration.
HashMap stores unique keys mapped to values; ownership is transferred into the map, and lookups are O(1) on average. Construct with HashMap::new() or HashMap::from.
Import via use std::iter::Iterator; and rely on adapters like map, filter, and collect for chaining.
holds when is true in every world agent cannot distinguish from the actual one. Operators nest: says knows that knows , the currency in which protocols trade.
(also written ) asserts at every state from now on. Safety properties take this shape: , nothing bad ever happens.
(also written ) asserts at some state from now on. Liveness properties take this shape: , something good eventually happens. Dual to : .
Calls fun.(node, acc) on each node before visiting its children, returning {new_node, new_acc}. Use to collect information from or transform an AST without manually recursing. Macro.postwalk/3 visits children first; Macro.traverse/4 gives both pre- and post-visit hooks.
In reductions to SAT, mutual exclusion is encoded by pairing negated literals to forbid simultaneous truth assignments.
expects a consumer ready for either side, and .
waits for a name on channel and binds it to within . The parenthesised is a binder, like the in : after a communication delivering , the receiver continues as .
is the process that does nothing. Every finite behaviour bottoms out in , and trailing occurrences are conventionally omitted: abbreviates .
offers the name on channel . The send blocks until a matching input on is available; the two synchronise and the sender continues as . What travels is always a name, never a process.
places two processes side by side. They proceed independently, except where one offers an output and the other an input on the same channel, in which case they may synchronise. Composition is commutative and associative up to structural congruence.
satisfies : a copy of can always be peeled off. Replication supplies unbounded behaviour without recursive definitions; is the idiom for a persistent server that handles any number of requests on .
(“new in ”) creates a fresh channel visible only within . Privacy is not permanent: if sends to an outside process, the scope of the restriction extrudes to cover the recipient, which is how private connections are established dynamically.
offers the initial actions of both branches; the first to communicate wins and the alternative is discarded. A sum of input prefixes, , is the calculus’s analogue of a selective receive over several channels.
Promises model async results and support chaining via then() and catch(), or awaiting inside async functions.
Read left to right as the protocol of one endpoint: sends a value of type and continues as ; receives one; closes the session. The peer endpoint holds the dual type, , every send matched by a receive. Branching protocols add internal choice and external choice over labelled alternatives.
consumes both resources together and is dual to under linear negation.
Example: . In type theory this corresponds to dependent products.
Vectors own contiguous elements on the heap and support push/pop; you create them with Vec::new() or vec![] literal syntax.
restores weakening and contraction dually to , signalling that the resource can be duplicated or discarded.