(moved from Rulesystem_Arrangement_Framework)
Rule Language Dialects
Rule languages can be broadly categorized as belonging to one of the following types:
- deductive
- reactive
- normative
Deductive languages are further classified into the dialects of
- logic programming (LP)
- first order logic (FOL)
These languages are often evaluated top-down in response to a query.
Reactive languages are further classified into the dialects of
- production rules (PR)
- event-condition-action rules (ECA)
These languages are often evaluated bottom-up in response to changes in the knowledge base.
Normative rules are also known as integrity constraints (IC).
Mapping between deductive rule and reactive rule terminology
The following table is an approximate and partial mapping between common terminology used in deductive rule languages and reactive rule languages. Within deductive rules, the focus is on LP terminology, and within reactive rules, the focus is on PR terminology.
deductive concept |
reactive concept |
comment |
rule body |
condition |
events have no mapping to deductive rules |
rule head |
single assert action |
suggests a subset of deductive and PR with same semantics |
logic variable |
pattern variable |
|
function symbol and arguments |
nested facts flattened using fact/pattern variables |
allows structured facts |
predicate |
pattern |
|
built-in predicate |
test, pattern matching operator |
cannot occur in actions |
procedural attachment |
user-defined/built-in test in condition, arbitrary actions with side-effects |
a technique to make deductive rules reactive |
relation type |
fact (or event) type |
|
non-ground fact |
|
no mapping to reactive rules |
ask query, get result |
fire rules, lookup derived facts |
how rulesets are used |