engine.rete.facts ================= .. py:module:: engine.rete.facts .. autoapi-nested-parse:: Working-memory facts and partial matches used by the RETE network. Classes ------- .. autoapisummary:: engine.rete.facts.Fact engine.rete.facts.PartialMatch Functions --------- .. autoapisummary:: engine.rete.facts.fact_id_for_triple Module Contents --------------- .. py:function:: fact_id_for_triple(triple: rdflib_reasoning.axiom.common.Triple) -> str Return the canonical internal id for one RDFLib triple. .. py:class:: Fact(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Fundamental unit of data within the RETE internals. In the current design, logical entailment is triple-oriented. Any broader RETE-OO-style object handling remains internal scaffolding and MUST NOT bypass the engine's triple-based materialization contract. .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: id :type: str :value: None .. py:attribute:: triple :type: rdflib_reasoning.axiom.common.Triple :value: None .. py:attribute:: stated :type: bool :value: None .. py:class:: PartialMatch(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Represent facts satisfying a subset of a rule's preconditions. Partial matches are the join-time support structure later referenced by agenda scheduling, justification tracking, and explanation reconstruction. .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: facts :type: tuple[Fact, Ellipsis] :value: None .. py:attribute:: bindings :type: dict[str, rdflib.term.Node] :value: None .. py:attribute:: depth :type: int :value: None