Reaction Rules for the Rule Markup Language
Reaction RuleML Home
Reaction RuleML
Reaction RuleML Home
Content

Overview
Scope
Modularization
Changes
Examples
XSD Schema
Syntax
Glossary
Editor
Validation
Translators
References

 

News

Reaction RuleML 0.2 Release, 2007-07-01 (xsd)

Int. RuleML Symposium on Rule Interchange and Applications (RuleML-2007), 2007-10-25/26, co-located with the 10th International Business Rules Forum
Register NOW !!!

all news>>

 

Reaction RuleML List

Archives
Subscribe

post a message:
reaction-tg@ruleml.org

 

Publications

Paper at VLDB EDA-PS'07 (pdf)

Reaction RuleML 0.1 Tutorial at RuleML'06 (slides)

Reaction RuleML Poster at RuleML 2006 (pdf)

Position Paper at Business Rules Forum 2006 (pdf)

all publications>>

 

Members Section

Login

 

Reaction RuleML 0.2 Syntax

Quick Links:
EBNF Syntax, Content Models, Meta Models

 

The syntax of Reaction RuleML is specified by means of extended BNF (EBNF), i.e. alternatives are separated by vertical bars (|); zero to one occurrences are written in square brackets ([]) and zero to many occurrences in braces ({}).

RuleML 0.91 Layer (RuleML hornlogeq.xsd)

see RuleML 0.91 content models

Derivation RuleML Layer (dr.xsd)

Derivation Rules with Naf, Neg, Equal and optional meta data label, scope and rule quantification; Replaces "Implies" with general "Rule"

Rule ::= [label,] [scope,] [quantification,] [oid,] if, then, [else]
label ::= Ind | Expr | Plex
scope ::= Ind
quantification ::= Ind | Expr | Plex
if ::= Atom | And | Or | Equal | Naf | Neg
then ::= Atom | Equal | Neg
else ::= then
Naf ::= [oid,] weak | Atom | Neg | Equal
Neg ::= [oid,] strong | Atom | Equal

RuleML ::= [label,] [scope,] [quantification,] [oid,] {Assert | Retract | Query}
Assert ::= [label,] [scope,] [quantification,] [oid,]
                {formula | Rulebase | Atom | Rule | Equivalent | Entails | Forall | Equal | Neg}
Retract ::= Assert
Query ::= [label,] [scope,] [quantification,] [oid,] {formula | Rulebase | Naf | Neg | Atom | And | Or | Entails | Exists | Equal}
Rulebase ::= [label,] [scope,] [quantification,] [oid,]
                   {formula | Atom | Neg | Rule | Equivalent | Equal | Forall}
Atom ::= [label,] [scope,] [quantification,] [oid,] (op | Rel,) {slot,}
              {arg | Ind | Data | Skolem | Var | Reify,} {slot}
Expr ::= [label,] [scope,] [quantification,] [oid,] (op|Fun,) {slot,} [resl,]
             {arg|Ind|Data|Skolem|Var|Reify|Expr|Plex,} [repo,] {slot,} [resl]

PR RuleML Layer (pr.xsd)

Production Rules and Serial Derivation Rules with transactional update actions (Assert, Retract, Update)

Rule ::= [label,] [scope,] [quantification,] [oid,]
            (if, do, [after,] [else,] [elseDo,] [elseAfter]) |
            (if, then, [else,] [elseDo,] [elseAfter])
if ::= Atom | And | Or | Equal | Naf | Neg | Assert | Retract | Update
do ::= {Atom | Assert | Retract | Update | Rule}
after ::= if
elseDo ::= do
elseAfter ::= if
Update::= (oid | formula | Rulebase | Atom | Rule | Equivalent | Entails | Forall | Equal | Neg,)
                [oid | formula | Rulebase | Atom | Rule | Equivalent | Entails | Forall | Equal | Neg]

RR RuleML Layer (rr.xsd)

Reaction Rules with complex event and action algebra operators and messaging reaction rules with complex event messages

RuleML ::= [label,] [scope,] [quantification,] [oid,] {Assert | Retract | Query,} [Message]
Rule ::= [label,] [scope,] [quantification,] [oid,]
            (on, [if,] [then,] do, [after,] [else,] [elseDo,] [elseAfter]) |
            (on | do) |
            (if, do, [after,] [else,] [elseDo,] [elseAfter]) |
            (if, then, [else,] [elseDo,] [elseAfter])
on ::= Naf | Neg | Atom | Rule | Message | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic | Ind | Var | Expr
do ::= Atom | Assert | Retract | Update | Message | Succession | Choice | Flow | Loop | Ind | Var | Expr

Message Constructs (message_module.xsd)

Message ::= [label,] [scope,] [qualification,] (oid | Ind | Var | Expr), (protocol | Ind | Var | Expr), (sender | receiver | Ind | Var | Expr), (content | Atom | Ind | Var | Expr | Plex | Naf | Neg | Rulebase | And | Or | Entails | Exists | Equal)
protocol ::= Ind | Var | Expr
sender ::= Ind | Var | Expr
receiver ::= sender
content ::= Atom | Ind | Var | Expr | Plex | Naf | Neg | Rulebase | And | Or | Entails | Exists | Equal

Time and Event Interval Constructs (algebra_module.xsd)

time ::= Ind | Var | Expr
interval ::= Interval | Plex | Var
Interval ::= [oid,] on | time | Ind | Var | Expr | Naf | Neg | Atom | Rule | Message | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic , on | time | Ind | Var | Expr | Naf | Neg | Atom | Rule | Message | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic

Complex Event and Action Algebra Constructs (algebra_module.xsd)

Complex Event Algebra:
Sequence ::= [oid,] {on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic }
Disjunction ::= [oid,] {on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic }
Conjunction ::= [oid,] {on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic}
Xor ::= [oid,] {on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic}
Concurrent::= [oid,] {on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic}
Not::= [oid,] on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic, interval | Interval | Plex | Var
Any ::= [oid,] Ind | Data | Var, on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic, interval | Interval | Plex | Var
Aperiodic ::= [oid,] on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic, interval | Interval | Plex | Var
Periodic ::= [oid,] time | Ind | Var | Expr , interval | Interval | Plex | Var

Complex Action Algebra:
Succession ::= [oid,] {do | Atom | Assert | Retract | Update | Message | Ind | Var | Expr | Succession | Choice | Flow | Loop}
Choice ::= [oid,] {do | Atom | Assert | Retract | Update | Message | Ind | Var | Expr | Succession | Choice | Flow | Loop}
Flow ::= [oid,] {do | Atom | Assert | Retract | Update | Message | Ind | Var | Expr | Succession | Choice | Flow | Loop}
Loop ::= [oid,] {do | Atom | Assert | Retract | Update | Message | Ind | Var | Expr | Succession | Choice | Flow | Loop}

KR Temporal / Event / Action / Transition / Process Logics Layer (kr.xsd)

State Processing Constructs (state_module.xsd)

state ::= Ind | Var | Expr
Initiates ::= [oid,] state | Ind | Var | Expr
Terminates ::= [oid,] state | Ind | Var | Expr
HoldsState: [oid,] (state | Ind | Var | Expr), (time | interval | Ind | Expr | Interval)

 

 

Reaction RuleML 0.2 Content Models

The content models are specified in a DTD like notation

RuleML 0.91 Layer (RuleML hornlogeq.xsd)

see RuleML 0.91 content models

Derivation RuleML Layer (dr.xsd)

Derivation Rules with Naf, Neg, Equal and optional meta data label and rule quantification; Replaces "Implies" with general "Rule"

Rule: (label?, scope?, quantification?, oid?, if, then, else?
label: Ind | Expr | Plex
scope: Ind
quantification: Ind | Expr | Plex
if: (Atom | And | Or | Equal | Naf | Neg)
then: (Atom | Equal | Neg)
else: (Atom | Equal | Neg)
Naf: (oid?, weak | Atom | Neg | Equal)
Neg: (oid?, strong | Atom | Equal)

RuleML: (label?, scope?, quantification?, oid?, (Assert | Retract | Query)*)
Assert: (label?, scope?, quantification?, oid?,
           (formula | Rulebase | Atom | Rule | Equivalent | Entails | Forall | Equal | Neg)*)
Retract: (label?, scope?, quantification?, oid?,
             (formula | Rulebase | Atom | Rule | Equivalent | Entails | Forall | Equal | Neg)*)
Query: (label?, scope?, quantification?, oid?,
            (formula | Rulebase | Naf | Neg | Atom | And | Or | Entails | Exists | Equal)*)
Rulebase: (label?, scope?, quantification?, oid?,
               (formula | Atom | Neg | Rule | Equivalent | Equal | Forall)*)
Atom: (label?, scope?, quantification?, oid?, (op | Rel), (slot)*,
           (arg | Ind | Data | Skolem | Var | Reify)*, (slot)*)
Expr: (label?, scope?, quantification?, oid?, (op|Fun), (slot)*, resl?,
          (arg|Ind|Data|Skolem|Var|Reify|Expr|Plex)*, repo?, (slot)*, resl?)

Attributes:
Var: @mode; possible values: +|-|?; default value: ?; optional attribute
Rel: @per; possible values: plain|value|effect|modal; default value: plain; optional attribute
Fun: @per; possible values: plain|value|effect|modal; default value: plain; optional attribute
if, then, else: @arg; possible values: String; optional attribute
Rule: @evaluation; possible values: weak|strong; default value: strong; optional attribute
Rule: @style; possible values: active|messaging|reasoning; default value: reasoning; optional attribute

PR RuleML Layer (pr.xsd)

Production Rules and Serial Derivation Rules with transactional update actions (Assert and Retract)

Rule: (label?, scope?, quantification?, oid?,
         (if, do, after?, else?, elseDo?, elseAfter?) |
          (if, then, else?, elseDo?, elseAfter?) )
if: (Atom | And | Or | Equal | Naf | Neg | Assert | Retract | Update)
do: (Atom | Assert | Retract | Update | Rule)*
after: (Atom | And | Or | Equal | Naf | Neg | Assert | Retract | Update)
elseDo: (Atom | Assert | Retract | Update | Rule)*
elseAfter: (Atom | And | Or | Equal | Naf | Neg | Assert | Retract | Update)
Update: (oid | formula | Rulebase | Atom | Rule | Equivalent | Entails | Forall | Equal | Neg),
             (oid | formula | Rulebase | Atom | Rule | Equivalent | Entails | Forall | Equal | Neg)?

Attributes:
do, elseDo, elseAfter: @arg; possible values: String; optional attribute
Assert: @safety; possible values: transactional|normal; default value: normal; optional attribute
            @all; possible values: yes|no; default value=no; optional attribute
Retract: @safety; possible values: transactional|normal; default value: normal; optional attribute
             @all; possible values: yes|no; default value=no; optional attribute
Update: @safety; possible values: transactional|normal; default value: normal; optional attribute
             @all; possible values: yes|no; default value=no; optional attribute

 

RR RuleML Layer (rr.xsd)

Reaction Rules with complex event and action algebra operators and messaging reaction rules with complex event messages

RuleML: label?, scope?, quantification?, oid?, (Assert | Retract | Query)*, Message?
Rule: label?, scope?, quantification?, oid?,
          (on, if?, then?, do, after?, else?, elseDo?, elseAfter?) |
          (on | do) |
          (if, do, after?, else?, elseDo?, elseAfter?) |
           (if, then, else?, elseDo?, elseAfter?)
on: (Naf | Neg | Atom | Rule | Message | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic | Ind | Var | Expr)
do: (Atom | Assert | Retract | Update | Message | Succession | Choice | Flow | Loop | Ind | Var | Expr)

Attributes:
on: @arg; possible values: String; optional attribute

Message Constructs (message_module.xsd)

Message: label?, scope?, quantification?, (oid | Ind | Var | Expr), (protocol | Ind | Var | Expr), (sender | receiver | Ind | Var | Expr), (content | Atom | Ind | Var | Expr | Plex | Naf | Neg | Rulebase | And | Or | Entails | Exists | Equal)
protocol: (Ind | Var | Expr)
sender: (Ind | Var | Expr)
receiver: (Ind | Var | Expr)
content: (Atom | Ind | Var | Expr | Plex | Naf | Neg | Rulebase | And | Or | Entails | Exists | Equal)

Attributes:
Message: @mode; possible values: inbound | outbound; required attribute
Message: @directive; possible values: performatives, e.g. ACL:inform; required attribute

Time and Event Interval Constructs (algebra_module.xsd)

time: (Ind | Var | Expr)
interval: (Interval | Plex | Var)
Interval: (oid?, (on | time | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic), (on | time | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Naf | Neg | Atom | Rule | Message | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic))

Complex Event and Action Algebra Constructs (algebra_module.xsd)

Complex Event Algebra:
Sequence: (oid?, (on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic)*)
Disjunction: (oid?, (on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic)*)
Conjunction: (oid?, (on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic)*)
Xor: (oid?, (on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic)*)
Concurrent: (oid?, (on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic)*)
Not: (oid?, (on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic, interval | Interval | Plex | Var))
Any: (oid?, (Ind | Data | Var), (on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr |Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic, interval | Interval | Plex | Var))
Aperiodic: (oid?, (on | Naf | Neg | Atom | Rule | Message | Ind | Var | Expr | Sequence | Disjunction | Xor | Conjunction | Concurrent | Not | Any | Aperiodic | Periodic, interval | Interval | Plex | Var))
Periodic: (oid?, (time | Ind | Var | Expr), (interval | Interval | Plex | Var))

Complex Action Algebra:
Succession: (oid?, (do | Atom | Assert | Retract | Update | Rule | Ind | Var | Expr | Succession | Choice | Flow | Loop)*)
Choice: (oid?, (do | Atom | Assert | Retract | Update | Rule |Ind | Var | Expr | Succession | Choice | Flow | Loop)*)
Flow: (oid?, (do | Atom | Assert | Retract | Update | Rule | Ind | Var | Expr | Succession | Choice | Flow | Loop)*)
Loop: (oid?, (do | Atom | Assert | Retract | Update | Rule | Ind | Var | Expr | Succession | Choice | Flow | Loop)*)

 

KR Temporal / Event / Action / Transition / Process Logics Layer (kr.xsd)

State Processing Constructs (state_module.xsd)

state: (Ind | Var | Expr)
Initiates: (oid?, (state | Ind | Var | Expr))
Terminates: (oid?, (state | Ind | Var | Expr))
HoldsState: (oid?, (state | Ind | Var | Expr), (time | interval | Ind | Var | Expr | Interval) )

 

 

Reaction RuleML 0.2 Meta Models

Reaction RuleML 0.2 generalized rule model

Reaction RuleML 0.2 Formula

Reaction RuleML 0.2 Atom

Reaction RuleML 0.2 Derivation Rule

Reaction RuleML 0.2 Production Rule

Reaction RuleML 0.2 Serial Horn Rule with (transactional update) actions

<< back

 

Site Contact: Adrian Paschke - Last Update 2006-10-13