Crate deep_causality

Crate deep_causality 

Source
Expand description

DeepCausality is a hyper-geometric computational causality library that enables fast and deterministic context-aware causal reasoning over complex causality models.

Why DeepCausality?

  • DeepCausality is written in Rust with production-grade safety, reliability, and performance in mind.
  • DeepCausality provides recursive causal data structures that concisely express arbitrary complex causal structures.
  • DeepCausality enables context awareness across data-like, time-like, space-like, spacetime-like entities stored within (multiple) context-hyper-graphs.
  • DeepCausality simplifies modeling of complex tempo-spatial patterns.
  • DeepCausality comes with Causal State Machine (CSM)

Modules§

causal_type
causaloid
This module defines the Causaloid struct, the fundamental building block for representing causal units within the DeepCausality framework.
causaloid_graph
context_graph
contextoid_type
graph
graph_reasoning
math_utils
model_validation_error
monadic_collection_utils
time_utils
utils_test

Structs§

ActionError
AdjustmentError
Assumption
BaseSymbol
BuildError
CSM
Causal State Machine (CSM)
CausalAction
A CausalAction represents an executable action that can be triggered in response to causal conditions.
CausalEffectLog
Represents an encapsulated, timestamped log of causal evaluation events.
CausalEffectSystem
CausalEffectSystem is a marker struct that serves as a concrete instance of the Effect3 trait from the deep_causality_haft crate.
CausalFnOutput
CausalGraphIndexError
CausalMonad
CausalMonad is the concrete implementation of the MonadEffect3 trait for the CausalEffectSystem. It provides the fundamental pure and bind operations that enable monadic programming within the DeepCausality framework.
CausalPropagatingEffect
CausalSetSpacetime
A symbolic, discrete model of spacetime based on causal set theory (CST).
CausalState
A CausalState represents a state in a causal state machine (CSM) that can be evaluated based on causal conditions.
CausalSystemState
Mutable state container for the causal system.
CausalityError
CausalityGraphError
Causaloid
Causaloid is the fundamental building block for causal models in DeepCausality.
CausaloidGraph
A specialized graph structure for representing and reasoning about causal relationships.
ConformalSpacetime
A minimal spacetime model preserving only causal and angular structure, based on conformal geometry.
Context
ContextIndexError
Contextoid
Data
A generic container for a piece of data, associated with a unique identifier.
DiscreteTime
A time model representing discrete, uniformly spaced ticks instead of continuous physical time.
EcefSpace
A spatial context in Earth-Centered, Earth-Fixed (ECEF) coordinates.
EffectEthos
The EffectEthos provides a reasoning engine for deontic inference. It encapsulates all the necessary components to evaluate a proposed action against a set of teleological norms (Teloids).
EntropicTime
A time model based on entropy-driven progression, suitable for emergent systems, self-organization, and irreversible state evolution.
EuclideanSpace
A 3-dimensional spatial context represented in standard Euclidean coordinates (x, y, z).
EuclideanSpacetime
A concrete 3D + time context based on classical (Euclidean) geometry.
EuclideanTime
A time model based on Euclidean (imaginary) time, primarily used in theoretical and computational physics.
GeoSpace
A non-Euclidean spatial context based on geodetic coordinates (WGS84).
GraphGeneratableEffect
The core effect type for the HKT generative system.
GraphGeneratableEffectSystem
The effect system witness that fixes error and log types.
GraphGeneratableEffectWitness
HKT witness type for the graph generatable effect system.
IndexError
Inference
Interpreter
LorentzianSpacetime
A 4-dimensional spacetime context based on Lorentzian geometry, as used in General Relativity.
LorentzianTime
A time model representing Lorentzian (physical) time in relativistic spacetimes.
MinkowskiSpacetime
A 4D spacetime context based on the Minkowski metric of special relativity.
Model
ModificationLog
Container for modification log entries, providing a complete audit trail.
ModificationLogEntry
A single entry in the modification audit trail.
NedSpace
A local tangent-plane spatial context using the North-East-Down (NED) reference frame.
Observation
PropagatingEffectWitness
ProposedAction
Represents an action that the system intends to perform, submitted for evaluation by the Effect Ethos.
QuaternionSpace
A spatial context representing 3D orientation using unit quaternions.
Root
SymbolicTime
A symbolic time representation for use in logic-based, non-numeric, or event-driven causal systems.
TagIndex
TangentSpacetime
A 4D+4D spacetime model combining position and motion, with support for curved geometry.
Teloid
TeloidGraph
A graph structure representing the relationships between Teloids (norms).
TeloidStore
A generic, in-memory storage for Teloids, indexed by their unique ID.
UncertainBooleanData
UncertainFloat64Data
UncertainParameter
UpdateError
Verdict
Represents the final, justified outcome of a deontic evaluation.

Enums§

ActionParameterValue
Represents a value for a parameter within a ProposedAction. This allows the parameters map to hold values of different types.
AggregateLogic
Defines how the results from a collection of Causable items should be aggregated.
AssumptionError
CausaloidType
Represents the structural type of a Causaloid.
ContextKind
Enum of monoidal context node types (each a composable unit of structure). Each variant name ends in -oid to emphasize its monoid role as a single identity-bearing unit.
ContextoidType
CsmError
DeonticError
Errors related to the Deontic Inference process within the Effect Ethos.
EffectValue
Represents the payload of a propagating effect.
ModelBuildError
ModelGenerativeError
ModelValidationError
NumericValue
OpStatus
Status of an operation execution.
Operation
Represents all possible operations that can be applied to a causal model.
RelationKind
SpaceKind
An enumeration over supported spatial context types.
SpaceTimeKind
A polymorphic enum over supported spacetime context types.
SymbolKind
SymbolicRepresentation
SymbolicRepr defines a general-purpose symbolic representation that supports identifiers, logical operations, expressions, and compound terms.
SymbolicResult
SymbolicTimeUnit
Represents a symbolic unit of time with a qualitative relationship to named events.
TeloidModal
Represents the modal status of a teloid, indicating its obligation or permissibility.
TeloidRelation
Defines the nature of a relationship between two Teloids in the TeloidGraph.
TimeKind
An enumeration of supported time models for unified, heterogeneous temporal reasoning.
TimeScale

Traits§

Adjustable
Assumable
The Assumable trait defines the interface for objects that represent assumptions that can be tested and verified. Assumable types must also implement Identifiable.
AssumableReasoning
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.
CausableCollectionAccessor
CausableGraph
Contextuable
Represents any entity that participates in a causal context graph.
ContextuableGraph
Trait for graph containing context-aware nodes.
Coordinate
Provides a generalized interface for N-dimensional coordinate access.
CurrentDataIndex
CurrentTimeIndex
DataIndexable
Datable
Represents data-bearing entities in a context graph.
DeonticExplainable
A trait for explaining the reasoning behind a deontic verdict.
DeonticInferable
Defines the public API for a deontic reasoning engine.
ExtendableContextuableGraph
Trait for poly-contextuable causal graphs. By default, the context graph is assumed to be a single-context graph.
Identifiable
Trait for types that have a unique identifier.
Inferable
Trait for inferable types with causal reasoning properties.
InferableReasoning
Trait providing reasoning methods for collections of Inferable items.
Intervenable
Defines the intervene operation for a monadic effect system. This trait is intended for causal reasoning systems where counterfactuals are modeled by forcing a value at a specific point in a computation chain.
IntoEffectValue
Defines the contract for any type that can be losslessly converted to and from the EffectValue enum.
Metric
Defines a measurable relationship between two entities within the same space.
MetricCoordinate
Represents coordinate-bearing entities that also implement distance metrics.
MetricTensor4D
Trait for exposing and modifying a local 4×4 spacetime metric tensor.
MonadicCausable
MonadicCausableCollection
MonadicCausableGraphReasoning
Provides default implementations for monadic reasoning over CausableGraph items.
Observable
Observable trait for objects that can be observed.
ObservableReasoning
ObservableReasoning trait provides reasoning methods for collections of Observable items.
PreviousDataIndex
PreviousTimeIndex
Trait for getting and setting the previous time index for various time scales.
PropagatingValue
A trait for values that can be propagated through the causal graph. It ensures that any type used in a causal function can be dynamically typed, cloned, and compared for equality.
ScalarProjector
A trait that defines how to extract a scalar value from a structured input type.
ScalarValue
Marker trait to identify numeric scalar types.
SpaceTemporal
Combines spatial and temporal semantics into a 4D spacetime model.
SpaceTemporalInterval
Trait for spacetime types that support Minkowski-style interval calculations.
Spatial
Marks entities that have spatial semantics.
Symbolic
Represents a symbolic, logical, or linguistic identity.
TeloidStorable
Teloidable
Defines the domain-specific API for a graph of Teloids.
Temporal
Represents entities that have intrinsic temporal properties.
TimeIndexable
Trait for types that can be indexed.
Transferable
UncertainAdjustable
UncertainDatable
Represents uncertain data entities in a context graph.

Type Aliases§

ArcRWLock
A type alias that combines Arc and RwLock to provide thread-safe shared mutable state.
AuditableGraphGenerator
Type alias for auditable graph generator computations.
BaseCausalGraph
A type alias for a CausaloidGraph composed of BaseCausaloid instances.
BaseCausalMap
A type alias for a HashMap that stores BaseCausaloid instances, typically indexed by their unique identifiers.
BaseCausaloid
A type alias for a default, general-purpose Causaloid configuration.
BaseCausaloidVec
A type alias for a Vec (vector) containing BaseCausaloid instances.
BaseContext
A type alias for a default, general-purpose Context configuration.
BaseContextoid
A type alias for a default, general-purpose Contextoid configuration.
BaseModel
A type alias for the default Model configuration.
BaseTeloidStore
A type alias for a default, general-purpose TeloidStore configuration.
BenchmarkCausalMap
CSMMap
CSMStateActions
CausalFn
The unified function signature for all singleton causaloids that do not require an external context.
CausaloidId
ComplexTensor
ContextId
ContextoidId
ContextualCausalFn
The unified function signature for all singleton causaloids that require access to a shared, external context.
DescriptionValue
A string value that provides a human-readable description of a Cause or Context A string value that provides a human-readable description of a Cause or Context
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.
FloatType
A type alias for floating point numbers, used for numerical calculations
IdentificationValue
The unique identifier for a Cause or Context in the Causality Graph
NumberType
A type alias for unsigned integers, used for numerical counting and indexing
NumericalValue
A floating point value that represents a numerical measure
OpTree
Type alias for operation trees.
PropagatingEffect
StateAction
A tuple consisting of a causal state and an associated causal action.
TeloidID
TeloidMetaData
TeloidTag
UncertainActivationPredicate
UniformCausalGraph
A type alias for a CausaloidGraph composed of UniformCausaloid instances.
UniformCausalMap
A type alias for a HashMap that stores UniformCausaloid instances, typically indexed by their unique identifiers.
UniformCausaloid
A type alias for a default, general-purpose Causaloid configuration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.
UniformCausaloidVec
A type alias for a Vec (vector) containing UniformCausaloid instances.
UniformContext
A type alias for a default, general-purpose Context configuration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.
UniformContextoid
A type alias for a default, general-purpose Contextoid configuration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.
UniformModel
A type alias for a default, general-purpose Model configuration that uses abstract “kind” enums for its spatial, temporal, and symbolic contexts.