Expand description
DeepCausality is a Rust framework for dynamic causality. It enables fast, deterministic, context-aware causal reasoning over complex multi-stage causal models, and stays correct when both the data and the rules evolve at runtime.
Why DeepCausality?
- Written in Rust with production-grade safety, reliability, and performance in mind.
- Provides recursive causal data structures that concisely express arbitrary complex causal structures.
- Threads context awareness across data-like, time-like, space-like, and spacetime-like entities stored within one or more context hypergraphs.
- Models complex tempo-spatial patterns through the Causal Monad and the Effect Propagation Process.
- Ships with a Causal State Machine (CSM) for pairing inference with action.
See https://docs.deepcausality.com/ for the documentation.
Modules§
- aggregate_
logic - causal_
type - causaloid
- This module defines the
Causaloidstruct, the fundamental building block for representing causal units within the DeepCausality framework. - causaloid_
graph - graph
- graph_
reasoning - math_
utils - monadic_
collection_ utils - time_
utils - utils_
test
Structs§
- Action
Error - Assumption
- Build
Error - CSM
- Causal State Machine (CSM)
- Causal
Action - A
CausalActionrepresents an executable action that can be triggered in response to causal conditions. - Causal
Effect - The effect of the effect-propagation process — a value or a command. See the module docs.
- Causal
Effect Propagation Process - The fundamental unit of causal computation in DeepCausality.
- Causal
Flow - A fluent flow over the causal monad.
StateandContextdefault to(), soCausalFlow<T>is the stateless form (lowering tocrate::PropagatingEffect); a non-unitState/Contextlowers toPropagatingProcess.ErrorandLogare fixed toCausalityError/EffectLog, so the witness types never appear in a signature a caller reads. - Causal
Graph Index Error - Causal
State - A
CausalStaterepresents a state in a causal state machine (CSM) that can be evaluated based on causal conditions. - Causal
System State - Mutable state container for the causal system.
- Causality
Error - The standard error type for DeepCausality operations.
- Causality
Graph Error - Causaloid
Causaloidis the fundamental building block for causal models in DeepCausality.- Causaloid
Graph - A specialized graph structure for representing and reasoning about causal relationships.
- Effect
Log - Represents an encapsulated, timestamped log of causal evaluation events.
- Graph
Generatable Effect - The core effect type for the HKT generative system.
- Graph
Generatable Effect System - The effect system witness that fixes error and log types.
- Graph
Generatable Effect Witness - HKT witness type for the graph generatable effect system.
- Inference
- Interpreter
- Lambda
Edges - Identity-keyed store of per-edge Λ decoration slots for one causal graph.
- Model
- Modification
Log - Container for modification log entries, providing a complete audit trail.
- Modification
LogEntry - A single entry in the modification audit trail.
- Observation
- Proposed
Action - Represents an action that the system intends to perform, submitted for evaluation by the Effect Ethos.
- Uncertain
- A real-valued quantity with inherent uncertainty, modelled as a lazy computation graph.
- Uncertain
Parameter
Enums§
- Action
Parameter Value - Represents a value for a parameter within a
ProposedAction. This allows the parameters map to hold values of different types. - Aggregate
Logic - Defines how the results from a collection of
Causableitems should be aggregated. - Assumption
Error - Causality
Error Enum - Detailed variants of potential errors in the system.
- Causaloid
Type - Represents the structural type of a
Causaloid. - CsmError
- Model
Build Error - Model
Generative Error - Model
Validation Error - OpStatus
- Status of an operation execution.
- Operation
- Represents all possible operations that can be applied to a causal model.
Traits§
- Aggregatable
- Defines how to aggregate a collection of effects of type T.
- Assumable
- The Assumable trait defines the interface for objects that represent assumptions that can be tested and verified. Assumable types must also implement Identifiable.
- Assumable
Reasoning - The AssumableReasoning trait provides default implementations for common operations over collections of Assumable types.
- Causable
- The Causable trait defines the core behavior for all causal elements.
- Causable
Collection Accessor - A trait for accessing items in a collection of causable elements.
The trait is generic over
I(input type),O(output type), andT(element type).Tmust implementMonadicCausable<I, O>. - Causable
Graph - Causal
Monad - The state-threading effect monad for the propagating-effect family.
- CsmEvaluable
- Trait for types that can be evaluated to a boolean decision in a CSM.
- Identifiable
- Trait for types that have a unique identifier.
- Inferable
- Trait for inferable types with causal reasoning properties.
- Inferable
Reasoning - Trait providing reasoning methods for collections of Inferable items.
- LogAdd
Entry - LogAppend
- Trait for types that can append log entries from another instance of themselves.
- LogEffect
- LogSize
- Monadic
Causable - Sealed: implementable only inside
deep_causality(the crate-privatesealedmodule; tracker #11a). - Monadic
Causable Collection - Monadic
Causable Graph Reasoning - Provides default implementations for monadic reasoning over
CausableGraphitems. - Observable
- Observable trait for objects that can be observed.
- Observable
Reasoning - ObservableReasoning trait provides reasoning methods for collections of Observable items.
- Stateful
Monadic Causable - Stateful counterpart to
crate::MonadicCausable. - Stateful
Monadic Causable Collection - Stateful counterpart to
crate::MonadicCausableCollection. - Stateful
Monadic Causable Graph Reasoning - Stateful counterpart to
crate::MonadicCausableGraphReasoning. - Transferable
- Trait for types that can verify their assumptions against propagating effects.
- Verdict
- A verdict: a bounded lattice with complement (a Boolean algebra for
bool; an MV-algebra for the probability carrier, wherecomplement(p) = 1 − p).
Type Aliases§
- Auditable
Graph Generator - Type alias for auditable graph generator computations.
- Base
Causal Graph - A type alias for a
CausaloidGraphcomposed ofBaseCausaloidinstances. - Base
Causal Map - A type alias for a
HashMapthat storesBaseCausaloidinstances, typically indexed by their unique identifiers. - Base
Causaloid - A type alias for a default, general-purpose
Causaloidconfiguration. - Base
Causaloid Vec - A type alias for a
Vec(vector) containingBaseCausaloidinstances. - Base
Model - A type alias for the default
Modelconfiguration. - Benchmark
Causal Map - CSMMap
- CSMState
Actions - Causal
Fn - The unified function signature for all singleton causaloids that do not require an external context.
- Causaloid
Id - Contextual
Causal Fn - The unified function signature for all singleton causaloids that require access to a shared, external context.
- Description
Value - A string value that provides a human-readable description of a Cause or Context
- Edge
Lambda Fn - A per-edge Λ transform on the value channel: the arrow applied to the value flowing along one
identified edge before the join merge. A plain
fnpointer, consistent with the crate’sCausalFnfamily (nodyn, no stored closures). - EvalFn
- Function type for evaluating numerical values and returning a boolean result. This remains unchanged as it serves a different purpose outside the core causal reasoning.
- Float
Type - The floating-point type this crate works in.
- Identification
Value - The unique identifier for a Cause or Context in the Causality Graph
- Number
Type - A type alias for unsigned integers, used for numerical counting and indexing
- Numerical
Value - A floating point value that represents a numerical measure
- OpTree
- Type alias for operation trees.
- Propagating
Effect - A stateless causal effect.
- Propagating
Process - A stateful causal process with context.
- State
Action - A tuple consisting of a causal state and an associated causal action.
- Stateful
Contextual Causal Fn - The unified function signature for singleton causaloids authored on the stateful evaluation path.
- Uncertain
Activation Predicate - Uncertain
Bool - The framework’s uncertain carriers, at the scalar the framework works in.
- Uncertain
F64 - The real carrier at
FloatType. Named for the scalar it is fixed at, which isf64. - Uniform
Causal Graph - A type alias for a
CausaloidGraphcomposed ofUniformCausaloidinstances. - Uniform
Causal Map - A type alias for a
HashMapthat storesUniformCausaloidinstances, typically indexed by their unique identifiers. - Uniform
Causaloid - A type alias for a default, general-purpose
Causaloidconfiguration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts. - Uniform
Causaloid Vec - A type alias for a
Vec(vector) containingUniformCausaloidinstances. - Uniform
Model - A type alias for a default, general-purpose
Modelconfiguration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.