Skip to main content

Module temporal_graph

Module temporal_graph 

Source
Expand description

Temporal overlay graph helpers — PROV-O + Dublin Core bi-temporal quins.

All temporal quins are written to T_CONTEXT. Predicates are FNV-1a hashes of the standard W3C URIs, computed at compile time via q_hash().

Named graph context: T_CONTEXT = q_hash("urn:qualia:context:temporal")

Bi-temporal model:

  • Assertion time (t_assert) — when the system recorded the fact. Stored as prov:generatedAtTime.
  • Valid time (t_valid_start / t_valid_end) — when the fact was true in reality. Stored as prov:startedAtTime / prov:endedAtTime.

All timestamps are milliseconds since Unix epoch (u64).

Constants§

AGENT_CONTEXT
C_COG_AGENT
C_COG_BELIEF
C_COG_GOAL
C_COG_PLAN
P_COG_HAS_GOAL
P_COG_HAS_PLAN
P_COG_HOLDS_BELIEF
P_DC_CREATOR
P_DC_DATE
P_DC_VALID
P_ENDED_AT
P_GENERATED_AT
P_HAD_PRIMARY_SOURCE
P_INVALIDATED_AT
P_Q42_INFERENCE_AUTHORIZED_BY
P_Q42_PROVENANCE_CITATIONS
P_RDF_TYPE
P_STARTED_AT
P_WAS_ATTRIBUTED_TO
P_WAS_GENERATED_BY
P_WAS_INVALIDATED_BY
T_CONTEXT

Functions§

assert_temporal
Write PROV-O bi-temporal quins for entity to T_CONTEXT.
invalidate_entity
Record that an entity was invalidated (tombstoned) at t_invalidate by agent_did.
register_agent
Write cog:Agent type quin for a DID hash to AGENT_CONTEXT.
write_belief
Write cog:Belief with PROV-O provenance for (agent_did, belief_hash) pair.
write_goal
Write cog:Goal for (agent_did, goal_hash) pair to AGENT_CONTEXT.

Type Aliases§

TempQuins
Variable-length return type for assert_temporal.