Skip to main content

Module defeasible

Module defeasible 

Source

Re-exports§

pub use crate::frame_layout::DEFEATER_BIT;

Structs§

DefeasibleRule
A minimal defeasible rule: an id, its kind, the literal it concludes, and the polarity (positive: concludes literal; else concludes ¬literal).
DefeasibleVerdict

Enums§

AmbiguityMode
How unresolved ambiguity (neither conflicting rule superior) is treated.
Conclusion
The conclusion drawn for a literal after conflict resolution.
DefeasibleError
DefeasibleStatus
RuleKind

Constants§

OP_DEFEASIBLE_OVERRIDE

Functions§

evaluate_defeasible_frame
Evaluates a slice of Quins for non-monotonic (defeasible) reasoning.
grounded_justified_rules
Resolve a defeasible rule set against the Dung grounded extension: returns the set of rule ids whose conclusion is justified (skeptically), excluding defeaters. Conflicting rules attack mutually unless the superiority relation (or strictness) orients the attack one way.
holds_by_default
Negation-as-failure / closed-world assumption: a proposition holds “by default” (its negation is concluded) exactly when it CANNOT be proven from the closed set of facts — i.e. the (subject, predicate, object) triple is absent. This is the non-monotonic primitive the positive forward-chainer (fire_guard_rules) cannot express; the agent-honesty guard’s “Unverified until proven” is an instance. Zero-heap (single linear scan).
is_superior
Superiority lookup: is a superior to b in the supplied relation sup (pairs (higher, lower))?
resolve_conflict
Resolve a conflict between two opposing rules, given the superiority relation and ambiguity mode. Non-conflicting inputs yield a’s polarity. Semantics (Nute / Governatori):
rules_conflict
Two rules conflict iff they conclude the same literal with opposite polarity.