Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/temporal_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ publish = false
jiff.workspace = true
serde.workspace = true
serde_json.workspace = true
uuid.workspace = true

[dev-dependencies]
serde_json.workspace = true
Expand Down
5 changes: 5 additions & 0 deletions crates/temporal_core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub enum TemporalError {
EmptyInterval,
/// Interval boundaries, precision, and certainty disagreed.
InvalidIntervalCertainty,
/// Qualitative relation classification received a nonproper or open interval.
RelationRequiresProperBoundedInterval,
/// A JSON wire payload was malformed, incomplete, or contained unknown fields.
InvalidWirePayload,
/// A JSON wire payload used a schema version this crate does not support.
Expand All @@ -32,6 +34,9 @@ impl fmt::Display for TemporalError {
Self::InvalidIntervalOrder => "invalid temporal interval order",
Self::EmptyInterval => "temporal interval is empty",
Self::InvalidIntervalCertainty => "invalid temporal interval certainty",
Self::RelationRequiresProperBoundedInterval => {
"temporal relation requires proper bounded intervals"
}
Self::InvalidWirePayload => "invalid temporal wire payload",
Self::UnsupportedWireVersion => "unsupported temporal wire version",
Self::ClockTypeMismatch => "temporal clock type mismatch",
Expand Down
33 changes: 32 additions & 1 deletion crates/temporal_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![forbid(unsafe_code)]
#![deny(missing_docs)]
//! Six nominal clocks, strict absolute instants, and uncertain intervals.
//! Six nominal clocks, strict absolute instants, uncertain intervals, and bounded temporal reasoning.
//!
//! TEPP distinguishes the time at which an event occurred, a claim was made,
//! a document was created, the platform observed data, evidence became
Expand All @@ -20,11 +20,18 @@
//! semantics. Known intervals retain source precision; unknown intervals do not
//! claim containment. JSON interchange is explicit, versioned, clock-specific,
//! and reconstructed through the same domain validation boundary.
//!
//! Proper bounded intervals can be classified with Allen's thirteen elementary
//! relations. Relation sets support inverse and complete composition, while a
//! resource-bounded path-consistency reasoner preserves direct assertions,
//! derived narrowing, and conservative supporting-assertion provenance.

mod clock;
mod error;
mod instant;
mod interval;
mod reasoner;
mod relation;
mod wire;

/// The time at which a source asserted a claim about an event or state.
Expand Down Expand Up @@ -53,5 +60,29 @@ pub use interval::TemporalCertainty;
pub use interval::TemporalInterval;
/// The source precision retained for a temporal value or interval.
pub use interval::TemporalPrecision;
/// Summary of one successful bounded closure operation.
pub use reasoner::ClosureReport;
/// An opaque identifier for one accepted relation assertion.
pub use reasoner::ConstraintId;
/// One observed or derived relation returned by the reasoner.
pub use reasoner::DerivedRelation;
/// The bounded resource whose configured maximum was exceeded.
pub use reasoner::ReasonerLimitKind;
/// Evidence that a qualitative temporal network has no possible relation.
pub use reasoner::TemporalContradiction;
/// A bounded qualitative interval-constraint network.
pub use reasoner::TemporalReasoner;
/// A fail-closed temporal-reasoner error.
pub use reasoner::TemporalReasonerError;
/// Explicit capacity bounds for one temporal reasoner instance.
pub use reasoner::TemporalReasonerLimits;
/// An opaque identifier for one interval variable in a reasoner instance.
pub use reasoner::TemporalVariableId;
/// One of Allen's thirteen elementary relations between proper intervals.
pub use relation::AllenRelation;
/// A compact set of possible elementary interval relations.
pub use relation::RelationSet;
/// Classify two proper, two-sided, nonzero intervals with Allen's algebra.
pub use relation::classify_interval_relation;
/// The only temporal JSON wire-schema version accepted by this crate.
pub use wire::TEMPORAL_WIRE_SCHEMA_VERSION;
Loading
Loading