Examples · Foundations
Foundations
The examples to read first. They teach the framework's calling conventions: how to wrap a value in a PropagatingEffect, how to compose with bind, how to wire a Causaloid into a state machine, and how to run inference on an async runtime.
-
Background causal inference on a Tokio runtime
An event handler runs a causal model on a Tokio task while the main loop stays free.
-
Pearl's Ladder of Causation: association, intervention, counterfactual
Walk all three rungs of Pearl's ladder against the same Smoking → Tar → Cancer chain. The difference between the rungs is one method call.
-
A Causal State Machine wired to three real-time sensors
Smoke, fire, and explosion sensors each get a Causaloid and an Action. The CSM routes per-tick readings and fires the matching alert when a predicate holds.