FactRules class

Rules that describe how to deduce facts in logic space

When defined, these rules allow implications to quickly be determined for a set of facts. For this precomputed deduction tables are used. see deduceAllFacts (forward-chaining)

Also it is possible to gather prerequisites for a fact, which is tried to be proven. (backward-chaining)

Definition Syntax

a -> b -- a=T -> b=T (and automatically b=F -> a=F) a -> !b -- a=T -> b=F a == b -- a -> b & b -> a a -> b & c -- a=T -> b=T & c=T

Internals

.fullImplications[(k, v)]: all the implications of the fact k=v .betaTriggers[(k, v)]: beta rules that might be triggered when k=v

.prereq -- {} k <- [] of k's prerequisites .definedFacts -- set of defined fact names

Constructors

FactRules(List<String> rules)
FactRules.pregenerated(List<(Set<(Logic, bool)>, (Logic, bool))> betaRules, Set<Logic> definedFacts, Map<(Logic, bool), Set<(Logic, bool)>> fullImplications, Map<(Logic, bool), List<int>> betaTriggers, Map<Logic, Set<Logic>> prereq)

Properties

betaRules List<(Set<(Logic, bool)>, (Logic, bool))>
latefinal
betaTriggers DefaultMap<(Logic, bool), List<int>>
final
definedFacts Set<Logic>
latefinal
fullImplications DefaultMap<(Logic, bool), Set<(Logic, bool)>>
final
hashCode int
The hash code for this object.
no setterinherited
prereq DefaultMap<Logic, Set<Logic>>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printRules() Iterable<String>
toDart() String
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited