engine.rete.consequents

Scheduled consequents and action instances produced by RETE terminal matches.

Classes

TripleProduction

Declarative logical consequent managed by the engine.

CallbackSchedule

A normalized non-mutating callback scheduled from a completed match.

ContradictionSchedule

A normalized non-mutating contradiction signal from a completed match.

ActionInstance

Scheduled unit of work derived from a completed match.

Module Contents

class engine.rete.consequents.TripleProduction(/, **data: Any)

Bases: pydantic.BaseModel

Declarative logical consequent managed by the engine.

Logical rule heads are represented as engine-managed triple production so that fixed-point reasoning and truth-maintenance support remain centralized.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

rule_id: engine.proof.RuleId = None
pattern: engine.rules.TriplePattern = None
required_variables: tuple[str, Ellipsis] = None
class engine.rete.consequents.CallbackSchedule(/, **data: Any)

Bases: pydantic.BaseModel

A normalized non-mutating callback scheduled from a completed match.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

callback: str = None
arguments: tuple[rdflib.term.Node, Ellipsis] = None
required_variables: tuple[str, Ellipsis] = None
class engine.rete.consequents.ContradictionSchedule(/, **data: Any)

Bases: pydantic.BaseModel

A normalized non-mutating contradiction signal from a completed match.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

category: str = None
detail: str | None = None
arguments: tuple[rdflib.term.Node, Ellipsis] = None
required_variables: tuple[str, Ellipsis] = None
class engine.rete.consequents.ActionInstance(/, **data: Any)

Bases: pydantic.BaseModel

Scheduled unit of work derived from a completed match.

An action instance may represent logical triple production, an observational callback, a contradiction diagnostic, or a mixed set of scheduled consequences from a single terminal match.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

rule_id: engine.proof.RuleId
bindings: dict[str, rdflib.term.Node]
premises: tuple[engine.rete.facts.Fact, Ellipsis] = ()
depth: int = 0
salience: int = 0
productions: tuple[TripleProduction, Ellipsis] = ()
callbacks: tuple[CallbackSchedule, Ellipsis] = ()
contradictions: tuple[ContradictionSchedule, Ellipsis] = ()
silent: bool = False
bootstrap: bool = False
property kind: Literal['production', 'callback', 'contradiction', 'mixed', 'empty']

Classify the scheduled consequence kinds present on this action.