Glossary of Reaction RuleML 1.0

From RuleML Wiki
Jump to: navigation, search

Authors: Adrian Paschke, Tara Athan, Harold Boley, Alexander Kozlenkov, Zhili Zhao, Kia Teymourian


This version: reaction.ruleml.org/1.0/glossary

Latest version: reaction.ruleml.org/glossary

This glossary describes all tags in Reaction RuleML as of version 1.0. Reaction RuleML also includes tags from Deliberation RuleML 1.0.

Contents

1 <act>

A role used for the performatives (<Assert>, <Retract>, <Consult>, <Query>, <Answer>, <Update>, <Test>, <Send>, <Receive>, <Action>) contained in the top element (<RuleML>)
Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See performative module)

2 <Action>

Explicit generic Action. An action can be defined

There is a distinction into the action interface/definition/pattern/signature which is define by the <signature> and the concrete implementation/instantiation of an action object. It is possible to define the interface signature of an action separated from its implementation by using the @key @keyref attributes.

The optional @type attribute defines the type of the action, the optional @safety attribute indicates if this is an interrupting, non-interrupting, transactional action, and the optional @card @minCard @maxCard attribute acts as a generic size counter for the number of actions to be executed in a complex action.

Like Uniterms the interpretation of an Action as object, relation, (complex) term, function with or without effect and its model-theoretic truth interpretation, is context sensitive on where it is used in a formula and depends on the reasoning/execution @style of the Reaction RuleML dialect and the intended semantic interpretation/execution <Profile>.

Attributes: @vocab @type @arity @iri @safety @card @minCard @maxCard @closure @node @prefix @key @keyref @xml:id @xml:base
(See: action module)

3 <after>

The "after" part of a rule <Rule> defining a post-condition after the action execution (<do>), e.g. to define a post-conditional integrity test which rolls back transactional actions (@safety) or triggers a compensating action in the <elseDo> part.

Attributes: @prefix @key @keyref @xml:id @xml:base

(See: rule module)

4 <After>

An algebra operator defining a time (<Time>) or spatial (<Spatial>) which follows after another time or spatial, i.e. "X after Y". "Y" might be absolute or relative, e.g. "after 2 days" (relative), "2 days after X" (absolute).
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module)

5 <Agent>

A generic Agent element used in CEP Reaction RuleML to describe agents (e.g. event processing agent, agent-based rule inference service, etc.). An agent can be either defined by arbitrary XML syntax (e.g. an existing XML-based Agent/Service language) within its <content> role or by references to an external definition (e.g. a Web Ontology resource) using the @type (agent type) and @iri (agent instance / address) attribute. Agent definitions can be used in messaging reaction rules within the sender (<sender>) and receiver (<receiver>) role in a message (<Message>).
(See: message module)

6 <And>

A conjunctive connective, consisting of zero or more formula (<formula>). In cases where <And>F</And> consists of only one formula F this is equivalent to omitting the <And> conjunctive operator and just writing F (possibly surrounded by a <formula> role). If <And/> is empty, it is always true.
Attributes: @closure @node @prefix @key @keyref @xml:id @xml:base
(See: connective module)

7 <Answer>

A performative wrapper giving the answers to a query (<Query>) or results from a forward directed rule processing/reasoning as in the case of production rules and reaction rules with actions. Used e.g. in Question-Answering (Q&A - see Rule Responder project) communication with messages (<Message>) or in testing (<Test>). For instance, for a query "<Query><Rel>p</Rel><Var>x</Var><Var>y</Var><Var>z</Var></Query>" the answer is given in terms of solved formulas, e.g. as a rulebase (<Rulebase>) that contains 'solved' equations with the variable bindings.
<Rulebase>
   <Equal><Var>x</Var><Ind>a</Ind></Equal>
   <Equal><Var>y</Var><Ind>b</Ind></Equal>
   <Equal><Var>z</Var><Ind>c</Ind></Equal>
 </Rulebase>

or as ground literals (<Atom>) matching the query / goal

<Atom>
   <Rel>p</Rel>
   <Ind>a</Ind>
   <Ind>b</Ind>
   <Ind>c</Ind>
</Atom>

or as entailment (<Entails>) of the answer from the instantiated rule base.

With the optional <degree> role a truth/uncertainty value (between 0.0 and 1.0; with the truth values "1" for true and "0" for false in two-valued logics and "0.5" for unknown in three-valued logics) can be assigned to the answer. An answer maybe be also just referenced by the local key-keyref mechanism (@key-@keyref) or by the optional @iri attribute, in case of externally published answers (as e.g. in decoupled interaction as in event streaming). With the optional @type attribute an answer type can be specified. The @safety optionally defines if the answer (event) is interrupting or non-interrupting and the @card @minCard @maxCard attribute optionally defines the number of results contained in an Answer.

Attributes: @safety @card @minCard @maxCard @closure @node @prefix @key @keyref @xml:id @xml:base
(See: performative module and Answer Message Interchange example - for further examples on query answering see the Rule Responder project )

8 <Any>

An event algebra operator defining an any operation for events (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>).

Or a temporal or spatio algebra operator defining a time (<Time>) or spatial (<Spatial>) which repeats any list of [time or spatial], i.e. "any X1,..Xn", e.g. "any Saturday and Sunday".

Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module)
Attributes: @safety @card @minCard @maxCard @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module)

9 <Aperiodic>

An event algebra operator defining an aperiodic operation ("Event2 does occur aperiodically between [Event 1 and Event3]") for the aperiodic occurrence of an event (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>) within an interval of two other events.
Attributes: @safety @card @minCard @maxCard @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module and Snoop Event Algebra)

10 <Assert>

A performative/action wrapper specifying that its content (optionally surrounded by a <formula> role) is asserted, making an 'implicit <Rulebase>' assumption. This allows the separation of declarative content from such procedural performatives (as pioneered by KQML, which has a similar performative 'tell'). In active reaction rule dialects with actions (in PR/ECA/CEP Reaction RuleML) Assert can be used as knowledge asserting action in the <do> part of a <Rule>. The following example shows a simple production rule using Assert as action in the do part of the rule.
    <Rule style="active">
      <if>
        <Atom>
          <Rel>likes</Rel>
          <Var>X</Var>
          <Ind>wine</Ind>
        </Atom>
      </if>
      <do>
        <Assert>
          <Atom>
            <Rel>likes</Rel>            
            <Ind>John</Ind>
            <Var>X</Var>
          </Atom>
        </Assert>
      </do>
    </Rule>
Attributes: @safety @card @minCard @maxCard @direction, @closure, @material @node @prefix @key @keyref @xml:id @xml:base
(See: performative module and FOL RuleML)

11 <arg>

A role used for the positional arguments of <Atom>, <Time>, <Spatial>, <Interval>, <Action>, <Event>, <Situation> with respective content models.
Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: term module action module spatial module interval module event module time module situation module )

12 <at>

a role used in in event algebra operators and in reified calculi for event/action/situation reasoning containing times (explicit <Time> or <Interval>, as e.g. in event calculus and temporal situation calculus, or a branching history of <Situation>s, as e.g., in classical situation calculus, or event/action intervals, as in interval-based event logics)
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: spatio-temporal-interval algebra module)

13 <AtLeast>

An event algebra operator defining an atleast operation ("AtLeast @card @minCard @maxCard occurrences on Event") counting the minimum number of events (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>). The @card @minCard @maxCard attribute is used to define the number of required event occurrences.
Attributes: @card @minCard @maxCard @safety @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module)

14 <AtMost>

An event algebra operator defining an atmost operation ("AtMost @card @minCard @maxCard occurrences on Event") counting the maximum number of events (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>). The @card @minCard @maxCard attribute defines the number of event occurrences which at most are allowed to occur.
Attributes: @card @minCard @maxCard @safety @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module)

15 <Atom>

A logical atom, i.e. an expression formed from a predicate (or relation) applied to a collection of operands, or a frame object. The predicate relation (<Rel>) is followed by a sequence of zero or more positional arguments (<arg>). The frame object is identified by an object identifier (<oid>) and is followed by a sequence of zero or more unpositional slots (<slot>). Optional user-defined slots are also permitted before and/or after the positional arguments. Rest variables -- <repo> (positional) and <resl> (slotted) -- are also permitted. For example, one way to formalize "John is the father of Mary" as predicate is:
<Atom> 
  <Rel>father</Rel>    
  <Ind>John</Ind>    
  <slot><Ind>daughter</Ind><Ind>Mary</Ind></slot>  
</Atom>

and as frame:

<Atom> 
  <oid><Ind>John</Ind></oid>    
  <slot><Ind>father</Ind><Ind>Mary</Ind></slot>   
</Atom>
Attributes: @closure @node @prefix @key @keyref @xml:id @xml:base
(See: atom module)

16 <Before>

An algebra operator defining a time (<Time>) or spatial (<Spatial>) which is before another time or spatial, i.e. "X before Y". "Y" might be absolute or relative, e.g. "2 days before" (relative), "2 days before X" (absolute).
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module)

17 @card

An attribute optionally specifying a cardinality constraint on set values.
(See: attribute module)

18 <Choice>

An action algebra operator defining a non-deterministic choice operation on a set of actions (<Action>, <Assert>, <Retract>, <Update>, <Query>, <Operator>, <Succession>, <Choice>, <Flow>, <Loop>).
Attributes: @vocab @type @arity @iri @safety @card @minCard @maxCard @node @prefix @key @keyref @xml:id @xml:base
(See: action algebra module)

19 <cid>

A conversation identifier used to identify a conversation in which a <Message> is interchanged.

Attributes: @prefix @key @keyref @xml:id @xml:base

(See: message module)

20 @closure

An attribute indicating how the contained free variables are quantified using the closure value as default quantifier assumption. The closure value applies as default assumption to the whole scope of the formula on which it is defined, i.e., it is automatically inherited as default quantifier assumption to all formulas which are in the scope of the group formula. The inherited closure can be overwritten by another explicitly closure defined on nested formulas and by explicitly defined quantifiers.

Allowed predefined values are "universal" and "existential". Additional values can be referenced by an IRI, CURIE or vocabulary term.

(See: attribute module)

21 <Concurrent>

An event algebra operator defining a concurrent operation for concurrent events (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>).
Attributes: @safety @card @minCard @maxCard @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module and Snoop Event Algebra)

22 <Conjunction>

An event algebra operator defining a conjunction operation for an unordered conjunction ("event 1 and event 2") of events (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>).
Attributes: @safety @card @minCard @maxCard @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module and Snoop Event Algebra)

23 <Consult>

A performative/action wrapper that dynamically "consults" (imports) the knowledge form an enclosed (<enclosing>) message (<Message>) or an external knowledge source (referenced by the @iri attribute), e.g. <Consult iri="http://reaction.ruleml.org/1.0/exa/dr/DistributedDerivationRuleInterface.rrml"/>.
Attributes: @safety @card @minCard @maxCard @direction, @closure, @material @iri @node @prefix @key @keyref @xml:id @xml:base
(See: performative module)

24 <content>

A role used for as extensible content argument, which acts as an syntactic extension point to embed xs:any XML code in the argument. It can be used to extend the content of <Time>, <Spatial>, <Interval>, <Action>, <Event>, <Situation>, <Profile>, <Message>, <Agent>, <Protocol>. The optional @vocab and @prefix can be used to define vocabulary and prefix mappings to be used for the translation of terms and Curies to absolute IRIs in the <content>.
Attributes: @vocab @prefix @prefix @key @keyref @xml:id @xml:base
(See: action module spatial module interval module event module time module situation module profile module message module)

25 <Data>

A sequence of characters (fixed relative to a datatype like XML PCDATA and RDF literals). It may be optionally associated with an XML Schema built-in datatype using the xsi:type attribute. For example:
<Data xsi:type="xs:dateTime">2002-10-10T17:00:00Z</Data>
is valid (according to the dateTime datatype), but the following is not:
<Data xsi:type="xs:dateTime">tomorrow</Data>
Note, however, that <Data>tomorrow</Data> is valid because no built-in datatype is given and that XML is also permissible, e.g.
<Data>        
  <ex:object>       
    <ex:id>115897</ex:id>       
    <ex:owner>John Doe</ex:owner>     
  </ex:object>   
</Data>
Attributes: @node @prefix @key @keyref @xml:id @xml:base
(See: term module)

26 <declare>

A role used for variables (<Var>) declared within a quantifier (<Forall>, <Exists>, <Quantifier>).

Attributes: @prefix @key @keyref @xml:id @xml:base

(See: quantifier module)

27 <degree>

An optional uncertainty value (between 0.0 and 1.0) that may be assigned to atomic formulas and equations. With a mapping of a degree "1" into "true" and "0" into "false" in two-valued (Boolean) logics and "0.5" into "unknown" in three-valued logics.

Attribute: @prefix @key @keyref @xml:id @xml:base

(See: atom module) and Fuzzy RuleML

28 @direction

An attribute indicating the intended direction of a rule's inferencing or execution. It has a neutral default value of "bidirectional". Other allowed values are "forward" and "backward".
(See: attribute module)

29 <directive>

A role for specifying the pragmatic characterization of a message (<Message>) context, broadly characterizing the meaning of a message in a communicative situation / interaction by referencing (external) vocabularies / ontologies, e.g. the speech act theory-based communicative acts from the FIPA Agent Communication Language, or the KQML inspired RuleML primitives, or alethic and deontic logic modal operator etc.
(See: message module)

30 <Disjunction>

An event algebra operator defining a disjunction operation for a disjunction ("event 1 or event 2") of events (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>).
Attributes: @safety @card @minCard @maxCard @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module and Snoop Event Algebra)

31 <do>

The "do" part in a <Rule> containing an atomic or complex action (<Action>, <Assert>, <Retract>, <Update>, <Query>, <Operator>, <Succession>, <Choice>, <Flow>, <Loop>) which is actively executed.

Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: rule module)

32 <Do>

a function used in reified calculi for for event/action/situation/fluent reasoning (e.g. event calculus, situation calculus, fluent calculus, etc.) that takes a (reified) action ( <Action>) and transfers a give situation into a new situation which includes the action (i.e. Do: A x S -> S).
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: situation reasoning module)

33 <During>

An interval algebra operator defining a relation between two intervals (<Interval>), here "X during Y".
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module and Allen's Interval Algebra)

34 <else>

The logical else conclusion in a <Rule>. An if-then-else rule is syntactic sugar for to two rules where the first rule is the normal if-then derivation rule and the second rule has the negation of the premise of the first rule and the else as conclusion.

Attributes: @prefix @key @keyref @xml:id @xml:base
(See: rule module)

35 <elseDo>

The else action in a <Rule>. The alternative action will be executed if the "normal" rule execution fails. The default semantics applies the elseDo to the negation of the <if>-part in production rules and the negation of the combined <if>-<do>-<after>-part ("if ∧ do ∧ after") in ECA/CEP reaction rules, i.e. if one of the parts fails the alterantive elseDo action is executed (e.g. to roll-back or compensate action effects). A deviating semantics for a <Rule> with elseDo can be specified in the semantic <Profile> of the rule.

Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: rule module)

36 <enclosed>

A role enclosing a RuleML message (<Message>) in messaging actions/primitives (<Consult> <Send> <Receive>).
Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: message module)

37 <Entails>

Used to <Assert>/<Query> that/whether the sequence of formulas in the first <Rulebase> entails the sequence of formulas in the second, e.g. the first acting as a knowledge base and the second acting as its integrity constraints. For example: ssn.ruleml

Attributes: @node @prefix @key @keyref @xml:id @xml:base

(See: connective module)

38 <Equal>

An equational formula consisting of two expressions, each of which may be optionally surrounded by a left (<left>) or a right (<right>) role. For example, "factorial(0)=1" may be equivalently represented in the following two ways:
<Equal>    
  <Expr>      
    <Fun per="value">fac</Fun>      
    <Data xsi:type="xs:int">0</Data>    
  </Expr>    
  <Data xsi:type="xs:int">1</Data>  
</Equal>
<Equal>    
  <left>      
    <Expr >        
      <Fun per="value">fac</Fun>        
      <Data xsi:type="xs:int">0</Data>      
    </Expr>    
  </left>    
  <right>      
    <Data xsi:type="xs:int">1</Data>    
  </right>      
</Equal>
Attributes: @oriented
(See: equality module)

39 <Equivalent>

An equivalence formula, which is "syntactic sugar" for a pair of conjoined converse rules. It consists of a pair of (optionally skipped) <torso> roles. For example, the two rules "if a person is owning an object then the object is belonging to a person" and "if an object is belonging to a person then a person is owning this object" can be shorted to "A person owning an object is equivalent to an object belonging to a person":
<Equivalent>
  <torso>
    <Atom>
      <Rel>own</Rel>
      <Var>person</Var>
      <Var>object</Var>
    </Atom>
  </torso>
  <torso>
    <Atom>
      <Rel>belongs</Rel>
      <Var>object</Var>
      <Var>person</Var>
    </Atom>
  </torso>
</Equivalent>
Attributes: @closure @node @prefix @key @keyref @xml:id @xml:base
(See: connective module)

40 <evaluation>

An optional role used to define the intended semantics (e.g. model theoretic semantic, proof-semantics, operational semantics such as selection and consumption policies etc.) in terms of a Semantic <Profile>. Multiple alternative semantics can be defined by repeating the evaluation role and a prioritization ordering can be imposed by using the @index attribute.
Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: descriptor module)

41 <Event>

Explicit generic Event. An event can be defined

There is a distinction into the event interface/definition/pattern/signature which is define by the <signature> and the concrete implementation/instantiation of an event object. It is possible to define the interface signature of an event separated from its implementation by using the @key @keyref attributes.

The optional @type attribute defines the type of the event, the optional @safety attribute indicates if this is an interrupting, non-interrupting, transactional event, and the optional @card @minCard @maxCard attribute acts as a generic size counter for the number of events in a complex event.

Like Uniterms the interpretation of an Event as object, relation, (complex) term, function with or without effect and its model-theoretic truth interpretation, is context sensitive on where it is used in a formula and depends on the reasoning/execution @style of the Reaction RuleML dialect and the intended semantic interpretation/execution <Profile>.

Attributes: @vocab @type @arity @iri @safety @card @minCard @maxCard @closure @node @prefix @key @keyref @xml:id @xml:base
(See: event module)

42 <Every>

An algebra operator defining a time (<Time>) or spatial (<Spatial>) which repeats every time or spatial, i.e. "every X", e.g. "every Monday", "every 2 meters".
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module)

43 <Exists>

Exists quantifier defined internally in the <quantification> role. It consists of one or more variables (<Var>), each optionally surrounded by a <declare> role, followed by an optional logical formula (optionally surrounded by a <formula> role), , i.e. "exists variables such that formula holds".
Attributes: @node @prefix @key @keyref @xml:id @xml:base
(See: extended quantifier module)

44 <expectedResult>

a role used to define the expected result as a predefined (<Answer>) in a test item (<TestItem>).
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: test module)

45 <Expr>

A logical function of the form "f(...)" where f is a function name. The function name (<Fun>) is followed by a sequence of zero or more arguments (<arg>). Optional user-defined slots (<slot>) are also permitted before and/or after the arguments, just like an atom (<Atom>). Rest variables (<repo> and <resl>) are also permitted. If the attribute @per has value "copy", the <Expr> corresponds to a complex term (<Cterm>) in 0.9 and earlier:
<Expr>
  <Fun per="copy">book</Fun>
  <Var>title</Var>
  <Var>author</Var>
  <Var>table of contents</Var>
  <Var>chapters</Var>
</Expr>

On the other hand, if the attribute @per has value "value", the <Expr> corresponds to a nano (<Nano>) in 0.9 and earlier. Modal interpretation of expression functions is denoted by @per with value "modal".

An expression can be also used to define action (<Action>), event (<Event>), situation (<Situation>), time (<Time>), interval (<Interval>) and spatial (<Spatial>) functions. The intended interpretation of the embedded expression function is defined by the @per attribute as active effect-full expression with value "effect", as complex term with value "copy", by value interpretation with "value" and "open" for combined interpretations. The default value is context dependent if the action/event/situation/time/interval/spatial is used as predicate, term or active event/action.

<!-- action execution -->           <!-- complex term -->          <!-- (truth) value interpretation -->          <!-- nested interpretation  -->
<Action>                             <Action>                       <Action>                                      <Action>
   <Expr per="effect">                  <Expr per="copy">              <Expr per="value">                             <Expr per="value"> 
      <Fun>book</Fun>                     <Fun>book</Fun>                 <Fun>book</Fun>                                  <Fun per="effect">book</Fun> 
      <Var>Flight</Var>                   <Var>Flight</Var>               <Var>Flight</Var>                                 <Var>Flight</Var>
    </Expr>                             </Expr>                        </Expr>                                        </Expr>
</Action>                            </Action>                      </Action>                                     </Action>

Attributes: @per @vocab @type @arity @node @prefix @key @keyref @xml:id @xml:base
(See: [expr module and Functional Ruleml)

46 <Finishes>

An interval algebra operator defining a relation between two intervals (<Interval>), here "X finishes Y".
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module and Allen's Interval Algebra)

47 <Flow>

An action algebra operator defining a parallel (execution) flow of actions (<Action>, <Assert>, <Retract>, <Update>, <Query>, <Operator>, <Succession>, <Choice>, <Flow>, <Loop>).
Attributes: @vocab @type @arity @iri @safety @card @minCard @maxCard @node @prefix @key @keyref @xml:id @xml:base
(See: action algebra module)

48 <fluent>

a role used in reified calculi for <Fluent>s (changeable Situation properties which are initiated (<Initiate>) or terminated (<Terminate>) by events/actions (<Event>/<Action>) and which hold (<Hold>) at (<at>) a time or in a situation (explicit time/intervals <Time>/<Interval> or <Situation> histories) in event/action/situation reasoning such as event calculus, situation calculus, fluent calculus, etc.
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: situation reasoning module)

49 <Fluent>

a <Fluent> is changeable Situation property which is initiated (<Initiate>) or terminated (<Terminate>) by events/actions (<Event>/<Action>) and which holds (<Hold>) at (<at>) a time or in a situation (explicit time/intervals <Time>/<Interval> or <Situation> histories). It is possibly surrounded by the <fluent> role. It is used in event/action/situation reasoning such as event calculus, situation calculus, fluent calculus, etc. to represent and reason about the effects of event/actions on changeable properties (fluents) within a conditional situation context.
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: situation reasoning module)

50 <Forall>

Forall quantifier defined internally in the <quantification> role. It consists of one or more variables (<Var>), each optionally surrounded by a <declare> role, followed by an optional logical formula (optionally surrounded by a <formula> role), i.e. "forall variables such that formula holds". For instance, "Forall ?customer such that And(?customer # Customer ?customer[status -> "Silver"]) translates to
<Forall>
  <declare><Var>customer</Var></declare>
  <formula> <!-- such that -->
        <Atom>
          <oid><Var type="Customer">customer</Var></oid>
          <slot><Ind>status</Ind><Ind>Silver</Ind></slot>
        </Atom>
  </formula>
</Forall>
Attributes: @node @prefix @key @keyref @xml:id @xml:base
(See: extended quantifier module)

51 <formula>

The formula role of a connective operator (<Operator>), conjunctive (<And>) or disjunctive (<Or>) formula, negated formula (<Negation>), quantifier (<Quantifier>, <Forall> or <Exists>), rulebase (<Rulebase>), semantic profile (<Profile>), performative (<Assert>, <Retract>, <Consult>, <Query>, <Answer>, <Update>, <Test>, <Send>, <Receive>, <Action>).

Attributes: @prefix @key @keyref @xml:id @xml:base

(See: connective module, performative module, quantifier module, negation module, profile module, connective operator module and test module)

52 <Fun>

A user-defined function name of an <Expr>. It is optionally surrounded by an operator (<op>).
Attributes: @iri, @per (and @val in equality sublanguages) @node @prefix @key @keyref @xml:id @xml:base
(See: expr module)

53 <guard>

An optional role used to define guards acting as pre-constraints which are validated before the conditions/goals, events and actions of a <Rule> or <Query>. Guards can be used as quantifier guards (in the formula role of <Quantifier>, <Forall>, <Exists>), as pre-constraints for goals in the <if> conditions, e.g. to validate general integrity constraints, as pre-conditions for events and actions, and for meta reasoning within knowledge base scopes (see <scope>) which are constructively defined over descriptive and qualifying metadata (<meta> and <qualification>).
Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: descriptor module and Scoped Derivation Rule example and Guarded Derivation Rule example)

54 <Happens>

a generic predicate used in reified calculi for event/action/situation/fluent reasoning (e.g. event calculus, situation calculus, fluent calculus, etc.). The Happens predicate defines a predicate relation between events/actions (<Event> / <Action> possibly surrounded by an <on> role) and times (explicit <Time> possibly surrounded by <at> role, as e.g. in event calculus and temporal situation calculus, or a history of <Situation>s, as e.g., in classical situation calculus). Different sorts happens predicates / happenings can be defined by reference to an external vocabulary with the @iri attribute, e.g. a vocabulary for a calculi which distinguishes between events which actually happen and other event relations over time or situations such as "poss", "planned", etc.
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: situation reasoning module)

55 <Holds>

a generic predicate used querying <Fluent>s in reified calculi for event/action/situation/fluent reasoning (e.g. event calculus, situation calculus, fluent calculus, etc.). The Holds predicate defines a predicate relation between fluents (<Fluent>) and times (explicit <Time>, as e.g. in event calculus and temporal situation calculus, or a history of <Situation>s, as e.g., in classical situation calculus). Different sorts of the holds predicates can be defined by reference to an external vocabulary with the @iri attribute.
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: situation reasoning module)

56 <if>

The "if" part of a rule <Rule> containing the premise(s), also known as the "antecedent" or "condition part" of the rule. Also used as the "antecedent" part of an entailment (<Entails> ) and condition part in production rules, Event-Condition-Action (ECA) rules and as condition part in Complex Event Processing (CEP) reaction rules.

Attributes: @prefix @key @keyref @xml:id @xml:base

(See: connective module)

57 <Implies>

An implication rule. It consists of a conclusion role (<then>) followed by a premise role (<if>), or, equivalently (since roles constitute unordered elements), a premise role followed by a conclusion role. Implication rules are used in Deliberation RuleML (see Glossary_of_Deliberation_RuleML_1.0#gloss-Implies). In DR and KR Reaction RuleML <Implies> can be used and is equivalent to a <Rule> with style value "reasoning" and implemented by the <if> followed by <then> role. In general, Reaction RuleML uses the more general <Rule>.
Attributes: @closure, @direction, @material @prefix @key @keyref @xml:id @xml:base
(See: connective module)

58 <Ind>

An individual constant, as in predicate logic (which can have an IRI like an RDF resource).
Attributes: @vocab @type @arity @iri @prefix @key @keyref @xml:id @xml:base
(See: term module)

59 @index

An optional attribute for specifying the position of a positional argument (see <arg>) or an ordering, e.g. for roles such as <meta>, <guard>, <evaluation>, <signature>, <qualification>, <quantification> where the order is interpreted in terms of a priority ordering, e.g. to define a priority between alternative applicable semantic <Profile>s.
(See: attribute module)

60 <Initiates>

a generic predicate used in reified calculi for event/action/situation/fluent reasoning (e.g. event calculus, situation calculus, fluent calculus, etc.). The Initiates predicate defines when a fluents (<Fluent>) is initiated by an event/action(<Event>, <Action>) at a time (explicit <Time>, as e.g. in event calculus and temporal situation calculus, or a history of <Situation>s, as e.g., in classical situation calculus). Different sorts of the initiates predicates can be defined by reference to an external vocabulary with the @iri attribute.
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: situation reasoning module)

61 <Interval>

Explicit generic Interval construct. Within the <arg> role (possibly omitted) an interval can be defined for events, actions, situations, times, spatials and other intervals. Within the <content> role (possibly omitted) an interval can be defined for any XML content (xs:any). The optional @type is used to define the sort of interval (predefined sorts in the RuleML Metamodel are: "EmptyInterval", "DegeneratedInterval", "LeftClosedRightOpenInterval", "LeftOpenRightClosedInterval, "LeftOpenInterval, "LeftClosedInterval, "RightClosedInterval", "RightOpenInterval"). The optional @iri attribute can be used to point to an external definition of the interval. Interval algebra operators (<During>, <Overlaps>, <Starts>, <Precedes>, <Succeeds>, <Meets>, <Equal>, <Finishes>, <Operator>) are used to relate intervals.
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: interval module)

62 @iri

An optional attribute of <Ind>, <Rel>, <Fun> and all generic language constructs such as <Action>, <Time>, <Interval> <Spatial>, <Situation>, <Profile>, <Negation>, <Quantifier>, and <Operator>s for referring to an Internationalized Resource Identifier (IRI). For instance, it can be used to point to external built-in vocabularies and external definitions of events, actions etc. Besides absolute IRIs also Curies can be used (with mappings into IRIs by the @prefix attribute).
(See: attribute module)

63 @key

An attribute used to define an unique key as Compact URI (Curie) (with mappings into IRIs by the @prefix attribute) or absolute Internationalized Resource Identifier (IRI) on all <RuleML> nodes and roles which can be referenced by the corresponding @keyref attribute. It uses the XML Schema key-keyref approach which allows XML tools to validate and process the defined keys and their keyref references. The key-keyref pair connects and joins distributed and modularized knowledge definitions within a logical <RuleML> knowledge base, where @key is the unique identifier key and @keyref is a key reference. This can be used e.g., to modularize the knowledge base, separate interface/template/pattern definition from the implementation/instantiation, and in general avoid repeated knowledge definitions by referencing already defined knowledge in the knowledge base. It it is possible to distribute conjoint knowledge definitions in one <RuleML> document or over multiple physical <RuleML> documents which can be included to the logical knowledge base with XML Inclusions (XInclude) or in CEP Reaction RuleML by <Message> interchange with <Consult>. The XML processor then validates uniqueness of keys and correctness of keyref links. The following example shows the definition of a rule (interface) <signature> in a <Rule> which has the key "rule-interface". This rule is referenced by the separately defined <Rule> implementation using keyref="rule-interface".

Rule Interface Definition

<Rule key="rule-interface"> 
  <signature>    
     	<Atom>
    		<op><Rel>likes</Rel></op>
		<arg><Var mode="+"/></arg> 
		<arg><Var mode="?"/> </arg>
	</Atom>
  </signature>    
</Rule>

Rule Implementation Definition

<Rule keyref="rule-interface"> 
  <if>...</if>    
  <then>
         <Atom>
              <op><Rel>likes</Rel></op>
              <arg><Ind>John</Ind></arg>
              <arg><Var>X</Var></arg>
         </Atom>
  </then>
</Rule>

N:1 and N:M references are also possible with key-keyref. The following example defines a complex <Event> pattern which has the key="ce1". The <signature> of ce1 defines the (detection) pattern as a <Sequence> of two events (e1;e2). These two events e1 and e2 are defined (by their <signature>) and instantiated separately in another <RuleML> document called "EventStream.rrml". This document is included with XInclude and then asserted to the logical KB. By the key references "e1-pattern" and "e2-pattern" their signature definitions are included in the pattern definition of the complex event "ce1". This pattern definition of the complex event ce1 now can be used in a reaction <Rule> (in the <do> part) to detect the complex event instance of ce1 from the included and asserted event instance of e1 and e2.

<xi:include href="EventStream.rrml" xpointer="xpointer(/RuleML/*)"/>
...
<do> 
 <Event type="ruleml:ComplexEvent" key="ce1"> 
  <signature>
     <Sequence>
     	<Event keyref="e1-pattern" key="e1"/>
        <Event keyref="e2-pattern" key="e2"/>
     </Sequence>
  </signature>    
 </Event>
<do> 

snippet from document "EventStream.rrml":

<Assert>
  <Event type="ruleml:SimpleEvent" keyref="e1" key="e1-pattern">
      <signature><Event><arg><Ind>e1</Ind></arg></signature>  
      <arg><Ind>e1</Ind></arg>
  </Event>
  <Event type="ruleml:SimpleEvent" keyref="e2" key="e2-pattern">
      <signature><Event><arg><Ind>e2</Ind></arg></signature>  
      <arg><Ind>e2</Ind></arg>
  </Event>
</Assert>
(See: attribute module)

64 @keyref

An attribute used to reference corresponding knowledge which is identified in a RuleML knowledge base by its unique @key.
(See: attribute module)

65 <left>

The left-hand side of an equation (<Equal>).
(See: equality module)

66 <Loop>

An action algebra operator defining a loop operation for an action (<Action>, <Assert>, <Retract>, <Update>, <Query>, <Operator>, <Succession>, <Choice>, <Flow>, <Loop>). The optional @card @minCard @maxCard attribute can be used to define the maximum number of loops.
Attributes: @vocab @type @arity @iri @safety @card @minCard @maxCard @node @prefix @key @keyref @xml:id @xml:base
(See: action algebra module)

67 @material

An attribute indicating the kind of implication (material or non-material) used for an implication derivation rule (<Implies> and <Rule style="reasoning">). Allowed values are "yes" (the default) and "no". A rule implication is a formula of the form "Q  :- P". This is the notion of implication which is typically used in logic programming. It is different from the classical material implication "P implies Q; P => Q" which is equivalent to "Or(Q Neg P)".
(See: attribute module)

68 @maxCard

An attribute defining the maximum cardinality (see @card).
(See: attribute module)

69 <meta>

An optional role for internally attaching to a Node a single formula as descriptive meta-knowledge. For instance, the following examples defined two metadata "name-value" pairs using the dublin core metadata vocabulary to define the creator and the creation date.
<meta>
  <Atom>
   <Rel iri="dc:creator"/>
   <Data xsi:type="xs:string">Adrian Paschke</Data>
  </Atom>
</meta>
<meta>
  <Atom>
   <Rel iri="dc:date"/>
   <Data xsi:type="xs:dateTime">2011-03-21T10:00:00-04:00</Data>
 </Atom>
</meta>

Such metadata can be used for life cycle management and in the scoped reasoning approach for dynamically defining constructive views (<scope>) on the knowledge base using the descriptive (<meta>) and qualifying (<qualification>) metadata.

Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: descriptor module and Full Derivation Rule example)

70 <Meets>

An interval algebra operator defining a relation between two intervals (<Interval>), here "X meets Y".
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module and Allen's Interval Algebra)

71 <Message>

A Message element that provides the syntax for inbound and outbound messages / notifications. A message consists of
  • an <cid> which is the conversation identifier (enabling also long-running asynchronous conversations and sub-conversations with new conversation identifiers),
  • an optional <protocol>: protocol definition (e.g. high-level negotiation and coordination protocols, agent protocols and operational transport protocols)
  • an optional <sender> and <receiver> : denotes the sender and the target of the message,
  • a <directive>: pragmatic context defining the pragmatic interaction and interpretation context for the message payload, e.g. FIPA Agent Communication Language primitives such as "acl:query-ref",
  • an optional @type defines the type of the message and an optional @mode attribute distinguishes "inbound" from "outbound" communication,
  • a <payload> transporting any valid <RuleML> knowledge (enclosing queries (<Query>), answers (<Answer>), includes, imports and updates (<Consult>, <Assert>, <Retract>, <Update>) and and general actions (<Action>)) or arbitrary XML <content> (note: the <payload> role might be omitted if a reference to some external message source is provided, either by using the @keyref attribute to a local knowledge or to an external source using the @iri attribute.

Messages are used in CEP Reaction RuleML for inter-operation and (platform-independent) interchange of rule-bases, events, actions, queries and answers between distributed rule-based agents/inference services (e.g. event processing agents, decision support agents etc.) which interact with each other using messaging reaction rules with <Send> and <Receive> actions (see Prova project for an implementation of messaging reaction rules). In such agent/service interactions (Reaction) RuleML is used as common standardized rule interchange format (see RuleResponder project and RuleResponder article) between possibly different platform-specific rule engines (such as Prova, OO jDrew, Drools, Emerald). To safeguard semantic interoperation semantic profiles (<Profile>) and test cases (<Test>) for validation and integrity testing can be explicitly interchanged together with the rules, queries and actions/events (see Reaction RuleML 1.0 Perspective on Standards).

Attributes: @mode @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: message module and the RuleResponder project ( RuleResponder article))

72 @minCard

An attribute defining the minimum cardinality (see @card).
(See: attribute module)

73 @mode

An attribute for optionally specifying the intended input-output constellations of the predicate terms with the following semantics:
  • "+" The term is intended to be input
  • "-" The term mode is intended to be output
  • "?" The term is undefined (input or output)

The default is ?

In CEP Reaction RuleML the mode attribute is also used for <Message> defining the communication mode with the values "inbound", "outbound" and "bidirectional" communication.

(See: attribute module and message module)

74 <Naf>

A "by default" negation of an atomic formula (with the <formula> role possibly omitted) (i.e. "weak" negation or negation as failure). The negated formula may be optionally surrounded by a <weak> role.
(See: negation module)

75 <Neg>

A classical negation of an atomic formula (with the <formula> role possibly omitted) (i.e. classical or "strong" negation). The negated formula may be optionally surrounded by a <strong> role.
(See: negation module)

76 <Negation>

A generic negation of an atomic formula (with the <formula> role possibly omitted). It either acts as a polymorphic negation which is interpreted according to the intended semantics (defined e.g. by the semantic <Profile>) or the sort is explicitly defined by the optional @type attribute, e.g. using predefined negation types from the RuleML Metamodel. For instance, <Naf> is a shortcut for a generic negation <Negation type="ruleml:InflationaryNegation"> (in PR Reaction RuleML) or <Negation type="ruleml:DefaultNegation"> (in DR/KR Reaction RuleML) and <Neg> for <Negation type="ruleml:StrongNegation">.
(See: negation module)

77 @node

An optional IRI identifier for a Node, creating accessibility within the knowledge representation. This can help for representing prioritization between rules, for example. All Node tags (i.e. those that begin with an uppercase letter) of RuleML can be decorated with such an identifier. Web semantics requires that each IRI denote a unique Node in a unique rulebase. Besides absolute IRIs also Curies can be used (with mappings into IRIs by the @prefix attribute).
(See: attribute module)

78 <Not>

An event algebra operator defining a not operation ("Event 2 does not occur between [Event 1 and Event 3]") which defines that an event (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>) must not occur within an interval of two other events .
Attributes: @card @minCard @maxCard @safety @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module and Snoop Event Algebra)

79 <oid>

An optional label for the object used as identifier / instance name. In frame representation the oid is required to denote the object frame. For example the frame "john(likes -> wine)" is represented as follows:
<Atom>
  <oid><Ind>John</Ind></oid>
  <slot><Ind>likes</Ind><Var>X</Var></slot>
</Atom>

Attributes: @prefix @key @keyref @xml:id @xml:base

(See: desc module)

80 <on>

The "on" part of a <Rule> consisting of an atomic or complex event pattern definition (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <Operator>) for the active event detection.

Attributes: @index @prefix @key @keyref @xml:id @xml:base

(See: rule module)

81 <op>

A role for operators, containing either a relation (<Rel>) of an atom (<Atom>), a function name (<Fun>) of a (<Expr>), or a neutralized constant (<Const>) of a Hilog term (<Uniterm>).

Attributes: @prefix @key @keyref @xml:id @xml:base

(See: atom module, expr module and holog module)

82 <Operator>

An extensible, generic operator for e.g. a logical connective, modal operator, algebra operator (<Time>, <Spatial>, <Interval>, <Action>, <Event> algebra operators). The sort of an operator can be defined by an external ontology using the @type attribute and externally defined operators can be referenced by the @iri attribute.
Attributes: @vocab @type @arity @iri @safety @card @minCard @maxCard @closure @node @prefix @key @keyref @xml:id @xml:base
(See: action algebra module, event algebra module, spatial-temporal-interval algebra module, connective operator module and Allen's Interval Algebra and Snoop Event Algebra)

83 <Or>

A disjunctive connective, consisting of zero or more formula (<formula>). In cases where <Or>F</Or> consists of only one formula F this is equivalent to omitting the <Or> operator and just writing F (possibly surrounded by a <formula> role).
Attributes: @closure @node @prefix @key @keyref @xml:id @xml:base
(See: connective module)

84 @oriented

An attribute indicating whether an equation (<Equal>) is oriented (directed) or unoriented (symmetric). Allowed values are "no" (unoriented, the default) and "yes" (oriented). For example, the (oriented) defining equation home(father-of(John)) = Mexico City appears as follows:
<Equal oriented="yes">
  <left>
    <Expr>
      <Fun per="value">home</Fun>
      <Expr>
        <Fun per="copy">father-of</Fun>
        <Ind>John</Ind>
      </Expr>
    </Expr>
  </left>
  <right>
    <Ind>Mexico City</Ind>
  </right>
</Equal>
(See: attribute module and Functional RuleML)

85 <Overlaps>

An interval algebra operator defining a relation between two intervals (<Interval>), here "X overlaps with Y".
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module and Allen's Interval Algebra)

86 <payload>

An optional role in RuleML messages (<Message>) to specify the payload as a <RuleML> knowledge base.
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: message module)

87 @per

An attribute used to indicate how a relation (<Rel>), function (<Fun>) or expr (<Expr>) will be interpreted. In equality sublanguages, it has three values "copy" (the default), "value" and "open", while in non-equality sublanguages it can only have the value "copy". In active sublanguages, it has the additional value "effect" to denote effects of the active execution and in modal sublanguages, it has the additional value "modal". An example for the use of @per is given in <Expr>.
(See: attribute module)

88 <Periodic>

An event algebra operator defining a periodic operation ("at Time2 between event time interval [Event 1 and Event3]") of a time (a time event) which occurs at an interval (<Interval>).
Attributes: @safety @card @minCard @maxCard @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module and Snoop Event Algebra)

89 <Plex>

A list term consisting of a collection of (ordered) arguments (optionally enclosed by <arg>) and/or (unordered) user-defined slots (<slot>), identical to an uninterpreted expression (<Expr>) except not having a user-specified function name (equivalent to having a system-specified constructor <Fun per="value">Plex</Fun>). Rest variables (<repo> and <resl>) are also permitted. For example:
<Plex>
  <Var>title</Var>
  <Var>author</Var>
  <Var>table of contents</Var>
  <Var>chapters</Var>
</Plex>
Attributes: @node @prefix @key @keyref @xml:id @xml:base
(See: expr module)

90 <Precedes>

An interval algebra operator defining a relation between two intervals (<Interval>), here "X precedes Y".
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module and Allen's Interval Algebra)

91 @prefix

an attribute defining a list of prefixes for the mapping of Compact URIs (Curies) to Internationalized Resource Identifiers (IRIs) as a white space separated list of prefix-name IRI pairs of the form "prefix : xsd:anyURI". Reaction RuleML allows the use of Curies in addition to absolute IRIs in several attributes which act as local or as external identifiers or references (@vocab @type @iri @node @key @keyref). Since Reaction RuleML provides means for including and importing distributed RuleML knowledge bases (<Consult>, XML Inclusions (XInclude)), for interchanging rule bases and questions-answering via messaging (<Send>, <Receive>, <Message>), and for modularizing a knowledge base (@key, @keyref) it must deal with complete IRIs instead of relative paths and local identifiers/references. Any relative IRI, Curie (or local (vocabulary) term) MUST be resolved relative to the @xml:base IRI and the defined prefixes (@prefix) (and vocabularies @vocab for term mapping). The mapping is as follows:
  • TERM (only for @type): is expanded with the defined vocabulary (@vocab) and the resulting IRI is used. If there is no local vocabulary which can be used, check if the term (case-sensitively) matches a name in the local type signature definitions. If there is a match, use the base IRI.
  • CURIE: is translated into an IRI using a prefix (@prefix) and the resulting IRI is used.
  • IRI: the value is already an absolute IRI, and is used as such.

Default prefixes can be explicitly defined on the top level <RuleML> element. If no prefix is defined it will use the @xml:base which will usually be the IRI of the document if no explicit XML base is defined. Reaction RuleML also permits the definition of mappings by XML Namespaces (xmlns). The defined xmlns mappings is processed before processing of any mappings from @prefix on the same attribute value (note, relative paths as the IRI should not be used and must not be evaluated against the XML base). General prefixes defined on <RuleML> can be overwritten by prefix definitions on all elements (e.g. to permit the use of Curies in @key @keyref in imported knowledge as well as on the extensible <content> role, which is used to embed arbitrary XML code as content into the RuleML language). The processing rules for the mapping of Curies into IRIs using the @prefix attribute follow the RDFa processing model. For instance, the modularization example given for the @key attribute defines a key as a Curie (<Rule key="rule-interface">) which is by default expanded to the base IRI or in case a prefix is used (e.g. <Rule key="kb1:rule-interface">) it would be translated into an IRI by the defined prefix mapping.

(See: attribute module and RDFa processing model)

92 <Profile>

An explicit generic semantic profile (partially) defining the intended semantics for knowledge interpretation (e.g. a model-theoretic semantics), inference (e.g. entailment regimes and proof-theories) and execution (e.g. operational semantics, selection and consumption policies) etc., as needed e.g. for rule interchange (see <Message>), knowledge inclusions, imports, updates and querying (see RuleML XInclude includes and performatives/actions (<Assert>, <Retract>, <Consult>, <Query>, <Answer>, <Update>, <Test>, <Send>, <Receive>, <Action>), as well as semantically safe translations from RuleML into platform specific languages for the execution and reasoning. A semantic profile is defined
  • internally by a <formula> role which contains the axioms of the semantics represented in RuleML syntax
  • internally by the <content> role which allows using any XML content model (xs:any), e.g. to embed semantic definitions given in other XML-based languages, e.g. in ISO Common Logic XCL, W3C OWL/XML etc.
  • externally or locally by referencing an existing external or local semantic profile definition, where
    • the optional @type attribute references the local or external sort name/type of the used semantic profile,
    • the optional @iri attribute points to an external definition (resource) of the semantics profile,
    • the optional @keyref attribute syntactically references and co-joins a local profile definition, identified by its corresponding unique key.

The optional @direction attribute indicates the default direction of the inference / execution. The optional @closure attribute indicates the default quantification. The optional @safety attribute indicates if the default execution / inference is transactional, interrupting, non-interrupting. The optional @card @minCard @maxCard attribute acts as a generic size boundary / counter in the operational semantic profiles.

Multiple semantic profiles can be used or locally defined as alternatives in the <evaluation> meta role by using the @index attribute in the surrounding <evaluation> role. For example:

   <evaluation index="1">
      <!-- the primary intended semantics is well founded semantics -->
      <Profile type="ruleml:WellFoundedSemantics" direction="backward"/>
    </evaluation>
    <!-- and (alternatively) semantic profile is answer set semantics -->
    <evaluation index="2">
      <Profile type="ruleml:AnswerSetSemantics" direction="backward"/>
    </evaluation>

Defined semantic profiles can be referenced in the @style attribute. For example:

   <Naf style="WellFoundedSemantics AnswerSetSemantics SLDNF ">...</Naf>
Attributes: @type @mode @arity @card @minCard @maxCard @weight @style @style @safety @direction @scope @closure @material @per @meta @qualify @node @iri @vocab @prefix @key @keyref @xml:id @xml:base
(See: profile module)

93 <protocol>

An optional role in RuleML messages (<Message>) to specify the protocol (<Protocol> which should be used for the message interchange.
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: message module)

94 <Protocol>

A generic Protocol element used in CEP Reaction RuleML's message interchange (<Message>) to define protocols (e.g. high-level coordination and negotiation protocols, agent/service protocols, operational message interchange protocols etc.). An protocol can be either defined by arbitrary XML syntax within its <content> role or by references to an external definition using the @type and @iri attribute. Protocol definitions can be used in messaging reaction rules within the protocol (<protocol>) role in a message (<Message>).
Attributes: @vocab @type @arity @iri @direction @card @minCard @maxCard @safety @node @prefix @key @keyref @xml:id @xml:base
(See: message module)

95 <qualification>

An optional role used to define qualifying meta knowledge. Examples of qualifying meta knowledge are e.g. validity times, prioritization etc. In contrast to descriptive metadata (<meta>), qualifying metadata has an impact on the semantics, e.g. it used for knowledge prioritization (e.g. in defeasible reasoning, production rules conflict resolution strategies), defining validity times (e.g. for windowing techniques in event processing or knowledge life cycle management such as selection and consumption policies), etc. Such qualifying meta knowledge can be used in guarded scoped meta reasoning (see <scope> and <guard>) to construct dynamic views on the knowledge base (so called scopes) in which the reasoning takes place.
Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: descriptor module)

96 <quantification>

An optional role used to define quantifiers (<Quantifier>, <Forall>, <Exists>). Note, Reaction RuleML defines quantifiers internally, i.e. in the formulas in which the quantifier scope applies, whereas Deliberation RuleML (in version 1.0) defines quantifiers in prefix notation it outside of the formulas, which are in the scope of the quantifier.
Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: descriptor module)

97 <Quantifier>

Generic quantifier defined internally in the <quantification> role. It consists of one or more variables (<Var>), each optionally surrounded by a <declare> role, followed by an optional logical <guard> formula (optionally surrounded by a <formula> role). The sort of the generic Quantifier is defined by the @type attribute and the @iri attribute can be used to point to an external vocabulary definition. For instance, <Forall> is a shortcut of a generic quantifier type using forall quantifier defined in the RuleML metamodel <Quantifier type="ruleml:Forall"> and <Exists> for <Quantifier type="ruleml:Exists">.
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: extended quantifier module)

98 <Query>

A performative/action wrapper specifying that its content (optionally surrounded by a <formula> role) is queried, making an 'implicit <Rulebase>' assumption. This allows the separation of declarative content from such procedural performatives (as pioneered by KQML, which has a similar performative 'ask').
Attributes: @closure @card @minCard @maxCard @safety @node @prefix @key @keyref @xml:id @xml:base
(See: performative module and FOL RuleML)

99 <Receive>

An performative/action that waits to receive an enclosed (<enclosed>) message (<Message>) matching the pattern defined in the message's signature definition (<signature>). The Receive action is used in messaging reaction rules in CEP Reaction RuleML in the event part (<on>). The @card @minCard @maxCard attribute defines the number of messages to be received, with the default value of "1" for exactly one message. If "-1" is used Receive will wait infinitely for incoming messages. The qualification (<qualification> can be used, e.g. to define timeouts and validity intervals.
Attributes: @safety @card @minCard @maxCard @closure @node @prefix @key @keyref @xml:id @xml:base
(See: message module)

100 <receiver>

An optional role in RuleML messages (<Message>) to specify the receiving agent (<Agent>) of the message.
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: message module)

101 <Reify>

Supports reification (a kind of instantiation or quasi-quotation) as needed by SWSL. It allows any RuleML tag available within the current sublanguage as content, treating it as a term for performing reasoning on, e.g. <Reify><Ind>John Doe</Ind></Reify>
(See: term module)

102 <Rel>

A relation, i.e. a logical predicate, of an atom (<Atom>). It is optionally surrounded by an operator (<op>). External relations (e.g. built-ins, procedural attachments) can be referenced by the @iri attribute.
Attributes: @per @iri @node @prefix @key @keyref @xml:id @xml:base
(See: atom module)

103 <repo>

A positional rest variable used in <Atom>, <Expr> and <Plex>, <Action>, <Event>,<Situation>, <Time>, <Spatial>.
Attribute: @prefix @key @keyref @xml:id @xml:base
(See: rest module)

104 <resl>

A slotted rest variable used in <Atom>, <Expr> and <Plex>, <Action>, <Event>,<Situation>, <Time>, <Spatial>.
Attribute: @prefix @key @keyref @xml:id @xml:base
(See: rest module)

105 <Retract>

A performative/action wrapper specifying that its content (optionally surrounded by a <formula> role) is to be deleted, making an 'implicit <Rulebase>' assumption. This allows the separation of declarative content from such procedural performatives (as pioneered by KQML, which has a similar performative 'untell'). In active reaction rule dialects with actions (in PR/ECA/CEP Reaction RuleML) Retract can be used as knowledge retracting action in the <do> part of a <Rule>. For example, if John no longer likes Mary then this fact could be retracted:
 <Retract>
   <Atom>
     <Rel>likes</Rel>
     <Ind>John</Ind>
     <Ind>Mary</Ind>
   </Atom>
 </Retract>

It is also possible to retract knowledge by referencing the @key of existing knowledge using the @keyref attribute, e.g.<Retract keyref="rulebase1"> or by using the <oid> of the knowledge. Furthermore, with the guarded scoped (<scope>-<guard>) meta-reasoning approach of Reaction RuleML it is possible to construct a dynamic view on the knowledge base and then retract this view. For instance, the following example creates a scoped view on the knowledge selecting all knowledge from the knowledge base which as metadata (<meta> and <qualification>) has as creator "Adrian Paschke". It then retracts the first 10 results (card="10") of this constructed scope in a transactional (safety="transactional") retract operation (which will be rolled-back if the retract fails).

<Retract card="10" safety="transactional">
      <scope>
            <Atom>
              <Rel iri="dc:creator"/>
              <Data xsi:type="xs:string">Adrian Paschke</Data>
            </Atom>
   </scope>
<Retract>
Attributes: @safety @card @minCard @maxCard @direction, @closure, @material @node @prefix @key @keyref @xml:id @xml:base
(See: performative module and FOL RuleML)

106 <right>

The right-hand side of an equation (<Equal>).
(See: equality module)

107 <Rule>

A rule. A rule can be optionally annotated with descriptive metadata (e.g. for life cycle management) using the <meta> role. An optional <scope> with optional additional <guard> constraints can be defined in which reasoning/execution of the rule takes place. The intended semantics of the rule can be defined by one or more semantic <Profile>s which are defined or referenced in the <evaluation> role. There is a distinction into the rule interface signature which is define by the <signature> role and the concrete implementation of a rule defined by its parts (<on>, <if>, <then>, <do>, <after>, <else>, <elseDo>). It is possible to define the interface signature of a rule separated from its implementation by using the @key @keyref attributes. Qualifying metadata (used e.g. for defining a qualified <scope>) is defined in the optional rule <qualification> and quantifications (<Quantifier>, <Forall>, <Exists>) are defined in the <quantifier> role. The full syntax of a <Rule> is as follows:
<Rule @style? @vocab? @type? @closure? @direction? @material? @safety? @card @minCard @maxCard? @node? @prefix? @key? @keyref? @xml:id? @xml:base? >
     <meta>   <!-– descriptive metadata of the rule -->	       </meta>
     <scope>   <!–- scope of the rule e.g. a rule module -->   </scope>
     <guard>   <!–- a guard constraint acting as pre-condition -->   </guard>
     <evaluation>    <!-- intended semantics -->	       </evaluation>
     <signature> <!– rule signature -->                        </signature>
     <qualification> <!–- e.g. qualifying rule metadata, e.g.
                          priorities, validity, strategy -->	</qualification>
     <quantification>  <!-- quantifying rule declarations,
                            e.g. variable bindings -->	      </quantification>
     <oid>  <!– object identifier -->			      </oid> 
     <on>      <!–- event part -->			      </on>
     <if>      <!–- condition part -->                        </if>
     <then>    <!-– (logical) conclusion part -->             </then>
     <do>      <!--  action part -->			      </do>
     <after>   <!–- postcondition part after action,
                    e.g. to check effects of execution -->    </after>
     <else>  <!–- (logical) else conclusion -->		      </else>
     <elsedo>  <!-- alternative/else action,
                    e.g. for default handling -->	      </elsedo>
</Rule>

By selecting different parts of the syntax a <Rule> can be configured to define different major reaction rule sorts, such as

  • all deliberation rule (DR) types (see Deliberation RuleML 1.0)
  • (temporal/spatial/interval) reasoning derivation rules ("<if> condition <then> conclusion") and knowledge representation (KR) rules in event/action/situation calculi,
  • production rules (PR) ("<if> condition <do> action"),
  • Event-Condition-Action (ECA) rules ("<on> event <if> condition <do> action") and simple trigger rules (EA) ("<on> event <do> action")
  • Complex Event Processing (CEP) rules (arbitrary serial combination of all rule parts) and messaging reaction rules where the events and actions are <Message> interchanged between distributed event-based systems and event processing rule agents. The @style attribute defines the reasoning/execution style with value "reasoning" for purely reasoning rules, "active" for (re-)active rules with active detection and execution and "messaging" for messaging reaction rules which <Send> and <Receive> <Message>s.

The following example show how a <Rule> by selecting different parts can be configured to a particular rule sort.

Derivation Rule             Production Rule         ECA Rule                     CEP Messaging Rule

<Rule style="reasoning">    <Rule style="active">   <Rule style="active">        <Rule style="messaging">
   <if>...</if>               <if>...</if>            <on> ____ </on>              <on> <Receive> ____ </Receive> </on>
   <then>---</then>           <do>---</do>            <if> ... </if>               <do> <Send> ---- </Send>  </do>
</Rule>                     </Rule>                   <do> ---- </do>              <on><Receive> ____ </Receive></on>
                                                     </Rule>                       <if> ... </if>
                                                                                   <do>  ___  </do>
                                                                                </Rule>

An <Implies> rule is a shortcut notation for <Rule style="reasoning"> with <if>-<then> parts. In addition to these core rule parts an alternative logical conclusion (<else>), post-condition (<after>), and alternative action (<elseDo>) can be defined. In combined Reaction RuleML dialects also mixtures of different rule parts are possible, e.g. a production rule with actions (<do>) and logical conclusion (<then>)

Attributes: @style @vocab @type @arity @closure @direction @material @card @minCard @maxCard @safety @node @prefix @key @keyref @xml:id @xml:base
(See: rule module)

108 <Rulebase>

A collection of rules that can be ordered or unordered, without or with duplicates. For example: FullDerivationRule.rrml
Attributes: @closure @direction @material @safety @card @minCard @maxCard @node @prefix @vocab @key @keyref @xml:id @xml:base
(See: connective module)

109 <RuleML>

The n-ary top-level of a RuleML document. It permits (ordered) transactions of performatives/ knowledge actions (<Assert>, <Retract>, <Consult>, <Query>, <Answer>, <Update>, <Test>, <Send>, <Receive>, <Action>), optionally wrapped in <act>, making an 'implicitly sequential' assumption.
Attributes: @node @prefix @key @keyref @xml:id @xml:base
(See: performative module)

110 @safety

An attribute defining the execution/processing "safety" of a semantic profile (<Profile>), an action (<Action>, <Assert>, <Retract>, <Update>, <Query>, <Operator>, <Succession>, <Choice>, <Flow>, <Loop>) or an event (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <Operator>). It defines if the execution safety is "transactional", i.e. atomic (depending on the transactional semantics of the Profile with roll-backs and/or compensations), "non-interrupting" or "interrupting". The default value is "non-interrupting".
(See: attribute module)

111 <scope>

An optional role used to define a scope on the knowledge base. A scope is a view on the knowledge base. Scopes (as pioneered in the RBSLA project and implemented in the Prova rule engine) can be dynamically constructed (constructive view) by meta reasoning over the knowledge's metadata (<meta> and <qualification>). Included (XInclude) / imported (<Consult>), messaged (<Message>), asserted/updated (<Assert>), queried (<Query>) and structured (<Rulebase>) knowledge sets are implicitly metadata labelled by their source (typcially a RuleML document) and their unique <@key>. This can be used to manage the knowledge as scoped modules in a knowledge base on which scoped reasoning takes place in a closed domain and for life-cycle management operations, such as retracting (<Retract>) scoped knowledge modules, transactional knowledge base updates (<Retract>) with metadata annotated KB state transitions which can be rolled-back, etc. Further knowledge constraints can be defined explicitly using the <scope> and <guard> roles to construct a knowledge view in which scoped reasoning takes place in an explicitly closed domain.

For instance, the following example defines (in Prova syntax) three event facts event(e1), event(e2) and event(e3). These facts are annotated with additional metadata labels describing their source @src, @author and @key. Knowledge from source "kb1.rrml" is defined as a trusted source (trusted(example.org/kb1.rrml). The event selection rule (select(Event)) in its if body defines one scoped condition literal (event(Event)) with a scope defined over all knowledge sources (@src(Source) which are authored by "Adrian Paschke" (@author("Adrian Paschke")). This scope dynamically constructs a view on the knowledge base selecting event "e1" and "e3", but not "e2" since "e2" it is authored by "John Doe" and not "Adrian Paschke". The additional pre-conditional guard ([trusted(Source)]) then constraints the knowledge in the scope to only trusted knowledge sources, which is only event "e1" but not "e3" since "e3" comes from an untrusted source, i.e., the constructed guarded scope only consists of the remaining knowledge fact event(e1) on which the condition event(Event) is applied as a goal in backward-reasoning.

@src(http://example.org/kb1.rrml) @author("Adrian Paschke") @key(e1) event(e1).
@src(http://example.org/kb1.rrml) @author("John Doe") @key(e2) event(e2).
@src(http://example.org/kb2.rrml) @author("Adrian Paschke") @key(e3) event(e3).

trusted(http://example.org/kb1.rrml).

select(Event) :- @src(Source) @author("Adrian Paschke") event(Event) [trusted(Source)].

The corresponding scope and guard definitions in Reaction RuleML are:

<scope>
 <And>
  <Atom><Rel>src</Rel><Var>Source</Var></Atom>
  <Atom><Rel>author</Rel><Ind>Adrian Paschke</Ind></Atom>
 </And>
</scope>
<guard>
 <Atom><Rel>trusted</Rel><Var>Source</Var></Atom>
</guard>

A particular application of scopes in Reaction RuleML is the life cycle management of (active) knowledge in complex event and action processing. The scoping mechanism can be used, e.g., for defining certain selection and consumption policies (e.g. disqualify already processed events with a metadata flag and exclude them from the active processing/reasoning scope and retract all processed events from the knowledge bases after the complex event detection") or e.g., for implementing (sliding) windowing techniques using the event metadata (e.g. "events not older than ...").

Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: descriptor module and Scoped Derivation Rule example and Guarded Derivation Rule example. Applications can be found e.g. in the Rule Responder project (e.g., the Pragmatic Web Agent Infrastructure and the Distributed Reputation Management System), in the Prova project (e.g. for Semantic Complex Event Processing), the Rule Based Service Level Agreements project and OASIS LegalRuleML (e.g. LegalRuleML Copyright Law Use Case.)

112 <sender>

An optional role in RuleML messages (<Message>) to specify the sending agent (<Agent>) of the message.
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: message module)

113 <Send>

An performative/action that sends an enclosed (<enclosed>) message (<Message>). The Send action is used in messaging reaction rules in CEP Reaction RuleML in the action part (<do> <elseDo>).
Attributes: @safety @card @minCard @maxCard @closure @node @prefix @key @keyref @xml:id @xml:base
(See: message module)

114 <Sequence>

An event algebra operator defining a sequence operation ("sequence of events") for an ordered sequence of events (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>).
Attributes: @safety @card @minCard @maxCard @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module and Snoop Event Algebra)

115 <signature>

An optional role used for signature definitions of knowledge in a knowledge base. The signature definition can be defined separately by using key-keyref referencing (see @key) separating the knowledge interface (which includes the signature definition) from the concrete implementation / instantiation. Signatures are used for defining type signatures (e.g. a frame type signatures) and template patterns (e.g. query patterns, event patterns, message patterns). For instance, the following example defines the signature for a 2-ary predicate "likes" with the first argument being an input argument (i.e. a bound value) and the second argument being an output argument (i.e. a free variable).
<signature>
<Atom>
  <Rel>likes</Rel>
  <Var mode="+"/> <!-- mode=+ i.e. input argument -->
  <Var mode="-"/> <!-- mode=- i.e. output argument -->
</Atom>
</signature>

This example shows the definition of a frame signature for a frame type "person", who "likes" all types of "wine".

<signature>
   <Atom>
     <oid><Ind>person</Ind></oid>
     <slot><Ind>likes</Ind><Var type="wine" mode="?"/></slot>
   </Atom>
</signature>

This example defines the event pattern signature for a complex event pattern "(a;(b;c))" (which can be used e.g. in the <on> part of a ECA or CEP Reaction <Rule> for detecting instances of such complex event pattern signature).

<signature>
  <Event type="ruleml:ComplexEvent">
   <Sequence>
     <Event type="ruleml:SimpleEvent"> <!-- event "a"--> </Event>
     <Sequence>
       <Event type="ruleml:SimpleEvent"> <!-- event "b" --> </Event>
       <Event type="ruleml:SimpleEvent"> <!-- event "c" --> </Event>
     </Sequence>
   </Sequence>
 </Event>
</signature>
Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: descriptor module and Signature Derivation Rule example, Frame Derivation Rule example, and Complex ECA Rule example )

116 <Situation>

Explicit generic Situation. A situation can be defined

  • with positional arguments (with <arg>)
  • with unpositional slots (with <slot>)
  • by a complex term (with <Expr>)
  • by interpretation of intervals, time, spatial or event/action as situation
  • as a frame object (with <oid> and <slot>)
  • by <content>, which acts as an extension point to embed one of the many existing XML serialization languages for events
  • by external reference using the @type and @iri attributes
  • by internal reference using the @key @keyref attributes

The optional @type attribute defines the type of the situation. The RuleML Metamodel distinguishes the top-level sorts "HomogenousSituation" and "HeterogenousSituation" and "Fluent" which are conditional situation (effects) that can change.

Like Uniterms the interpretation of a Situation as object (situation individual), relation, (complex) term, function and its model-theoretic truth interpretation, is context sensitive on where it is used in a formula and depends on the reasoning/execution @style of the Reaction RuleML dialect and the intended semantic interpretation/execution <Profile>. For instance, in non-reified calculi situations and fluents are represented as predicates while in reified calculi fluents can be represented as functions. The @per attribute can be used to explicitly define the intended interpretation of embedded situation functions (<Expr>).

Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: situation module)

117 <Skolem>

A Skolem individual constant.
Attributes: @vocab @type @arity @node @prefix @key @keyref @xml:id @xml:base
(See: term module, and the Integrating Positional and Slotted Knowledge on the Semantic Web slides)

118 <slot>

A user-defined slot consisting of a name (first position) and a filler (second position). For example:
<slot>
  <Ind>color</Ind>
  <Ind>blue</Ind>
</slot>

Slots are use for unpositional predicate/function representations and in frame object representations (using the object identifier (<oid>) as frame name).

Attributes: @weight, @card (and [@minCard/@maxCard in SWSL sublanguages)
(See: slot module)

119 <Spatial>

Explicit generic Spatial construct. The optional @type attribute defines the type of the spatial.

A spatial can be defined:

  • with positional arguments (with <arg>)
  • with unpositional slots (with <slot>)
  • by a spatial expression function (with <Expr>)
  • as a frame object (with <oid> and <slot>)
  • by <content>, which acts as an extension point to embed one of the many existing XML serializations of times
  • by external reference using the @type and @iri attributes
  • by internal reference using the @key @keyref attributes on existing time definitions
  • by an absolute or relative spatial algebra operator (<After>, <Before>, <Every>, <Any>, <Operator>)
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base

120 <Starts>

An interval algebra operator defining a relation between two intervals (<Interval>), here "X starts Y".
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module and Allen's Interval Algebra)

121 <strong>

A role used for classical negation (<Neg>).
(See: negation module)

122 @style

The style attribute is a reference to one or multiple defined semantic <Profile>s. It can reference predefined (predefined value reference), locally defined (term reference) and externally defined (CURIE or IRI reference) profiles.

For instance, the following predefined values reference the active, messaging and reasoning semantic profile of Reaction RuleML:

  • active: actively polls and detects occurred events in ECA and CEP Reaction RuleML or

actively matches changed conditions as PR Reaction RuleML production rules.

  • messaging: waits for incoming complex event message (inbound) and sends

messages (outbound) as actions as in CEP RuleML.

  • reasoning: logical reasoning in formalisms such as temporal / interval event / action / transition logics (as e.g. in spatio-temporal DR Reaction RuleML and temporal event/action reasoning languages in KR Reaction RuleML)

The default value references in DR and KR Reaction RuleML are "reasoning", in PR and ECA Reaction RuleML it is "active" and in CEP Reaction it is "messaging".

(See: attribute module)

123 <Succeeds>

An interval algebra operator defining a relation between two intervals (<Interval>), here "X succeeds Y".
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module and Allen's Interval Algebra)

124 <Succession>

An action algebra operator defining a succession operation for an ordered execution of actions (<Action>, <Assert>, <Retract>, <Update>, <Query>, <Operator>, <Succession>, <Choice>, <Flow>, <Loop>).
Attributes: @vocab @type @arity @iri @safety @card @minCard @maxCard @node @prefix @key @keyref @xml:id @xml:base
(See: action algebra module)

125 <Terminates>

a generic predicate used in reified calculi for event/action/situation/fluent reasoning (e.g. event calculus, situation calculus, fluent calculus, etc.). The Terminates predicate defines when a fluents (<Fluent>) is initiated by an event/action(<Event>, <Action>) at a time (explicit <Time>, as e.g. in event calculus and temporal situation calculus, or a history of <Situation>s, as e.g., in classical situation calculus). Different sorts of the terminates predicates can be defined by reference to an external vocabulary with the @iri attribute.
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: situation reasoning module)

126 <Test>

A performative/action wrapper for Verification, Validation and Integrity testing (VVI - as implemented in the ContractLog framework of the RBSLA project and used in RuleResponder agent architecture for self-validating rule interchange). It consists of VVI tests (integrity entailments (<Entails>), single test items (<TestItem>) or possibly nested test suites (<TestSuite>) and is optionally surrounded by a role (<vvi>) which might be ordered (@index). The following examples shows the typical template of a test.
<Test>
	<vvi>
		<TestSuite>
			<!-- semantic profiles which should be us for the test suite -->
			<evaluation><Profile></Profile></evaluation>
			<!-- test assertion base, such as ground test facts -->
			<testbase><Assert></Assert></testbase>
			<vvi>
				<!-- one particular test item of a test suite -->
				<TestItem>
					<!-- test query -->
					<act><Query></Query></act>
					<!-- exepected result -->
					<expectedResult>
						<Answer>
							<degree><Data>1</Data></degree> <!-- expected "1" = query succeeds -->
							<!-- resulting query variable bindings  -->
							<Equal></Equal> 
							<Equal></Equal>	
							<Equal></Equal>	
						</Answer>
					</expectedResult>
				</TestItem>
			</vvi>
		</TestSuite>
	</vvi>
</Test>

An optional scope (<scope>) can be defined so that the test applies only to the scope (constructive view) on the knowledge base.

Attributes: @safety @card @minCard @maxCard @closure @direction @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: test module and VVI article and Reaction RuleML 1.0 Perspective on Standards)

127 <testbase>

a role used to define the test base for for a testsuite (<TestSuite>) consisting of either test assertions (<Assert>) or a consulted external test base (<Consult>).
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: test module)

128 <TestItem>

a TestItem describes one particular <vvi>-test consisting of the test <act> (typically a <Query>) and the expected result (<expectedResult>) (an <Answer> containing the expected truth valuation (<degree>) and the results/variable bindings).
Attributes: @node @prefix @key @keyref @xml:id @xml:base
(See: test module and VVI article and Reaction RuleML 1.0 Perspective on Standards)

129 <TestSuite>

a TestSuite consisting of test assertions (<Assert>) (typically ground test facts (<Atom>) and test events (<Event>)) and/or consulted external test bases (<Consult>) and a number of <vvi>-tests (integrity <Entailment>s, <TestItem>s or other nested <TestSuite>s).
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: test module and VVI article and Reaction RuleML 1.0 Perspective on Standards)

130 <then>

The "then" part of a rule (<Rule>) containing the conclusion, also known as the "consequent" or "head" of the rule. Also used as the "consequent" part of an entailment (<Entail>).
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: connective module)

131 <Timer>

An algebra operator defining a time (<Time>) or spatial (<Spatial>) which is described by a recurring time or space counter. A timer is a syntactic shortcut for "After X Every Y", e.g. "after 1 hour every minute" (recurring timer).
Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base
(See: spatio temporal interval algebra module)

132 <torso>

A symmetric role used in an equivalence formula (<Equivalent>) combining the asymmetric <then> and <if>.
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: connective module)

133 <Time>

Explicit generic Time construct. A time can be defined:
  • with positional arguments (with <arg>)
  • with unpositional slots (with <slot>)
  • by a time expression function (with <Expr>)
  • as a frame object (with <oid> and <slot>)
  • by <content>, which acts as an extension point to embed one of the many existing XML serializations of times
  • by external reference using the @type and @iri attributes
  • by internal reference using the @key @keyref attributes on existing time definitions
  • by an absolute or relative time algebra operator (<After>, <Before>, <Every>, <Any>, <Timer>, <Operator>)

The optional @type attribute defines the type of the time, e.g. the RuleML Metamodel predefines "TimeInstant" (linear continuous time model with points in time called time instants) or "TimePoint" and "TimeInterval" (discrete time interval model with time points and time intervals). The default time semantics is a discrete time model. A time can be defined absolute or relative.

Attributes: @vocab @type @arity @iri @node @prefix @key @keyref @xml:id @xml:base

134 @type

An attribute for optionally referencing a (user-defined) type leading to a sorted rule program. Types can be defined locally, e.g. as a frame (object) <signature> or in terms of a description logic program (DLP) or externally, e.g. in object-oriented class hierarchies (e.g. Java type system), common logic ontologies, description logic t-box models (RDFS, OWL ontologies), etc. Allowed values are Terms (local references), Curies or IRIs which are syntactically mapped into absolute IRIs by using term vocabularies (@vocab) and prefixes (@prefix). The semantics for the interpretation of types and reasoning in sorted logics can be defined by a semantic <Profile>, e.g. multi-sorted, order-sorted etc.
(See: attribute module)

135 <Update>

An update action which executes an update of the knowledge base. Update actions can be used as performatives and as complex actions in the <do> role of a reaction rule. The optional @card @minCard @maxCard attributes define the exact, minimum, maximum number of internal action executions with the default value -1 = unlimited. With the optional @safety attribute it can be defined if the complex action execution should be transactional (i.e. an atomic execution), interrupting or non-interrupting. A transactional update (<Update safety="transactional">) is equivalent to an atomic execution of retract (<Retract>) followed by assert (<Assert>).

The following examples updates a rulebase "kb1" with another rulebase "kb2".

<Update>
  <Rulebase keyref="kb1"/>
  <Rulebase keyref="kb2"/>
</Update>

The next examples replaces a rule with another rule.

<Update>
  <Rule>
    <if><Atom><Rel>likes</Rel><Var>X</Var><Ind>wine</Ind></Atom></if>
    <then><Atom><Rel>likes</Rel><Ind>John</Ind><Var>X</Var></Atom></then>
  </Rule>
  <Rule>
    <if><Atom><Rel>likes</Rel><Var>X</Var><Ind>beer</Ind></Atom></if>
    <then><Neg><Atom><Rel>likes</Rel><Ind>John</Ind><Var>X</Var></Atom></Neg></then>
  </Rule>
</Update>

The third examples uses place holder variables which are substituted by variable bindings defined in the equations of the update rulebase.

<Update>
  <Rule>
    <if><Atom><Rel>likes</Rel><Var>_1</Var><Var>_2</Var></Atom></if>
    <then><Atom><Rel>likes</Rel><Var>_3</Var><Var>_1</Var></Atom></then>
  </Rule>
  <Rulebase>
    <Equal oriented="yes"><Var>_1</Var><Var>X</Var></Equal>
    <Equal oriented="yes"><Var>_2</Var><Ind>wine</Ind></Equal>
    <Equal oriented="yes"><Var>_3</Var><Ind>John</Ind></Equal>
  </Rulebase>
</Update>

And the last example shows an update of the "likes" slot value of a an existing frame modifying it from "wine" (the existing value; not shown here) to "beer".

<Update>
 <Atom>
  <oid><Ind>Mary</Var></oid>
  <slot><Ind>likes</Ind><Ind>beer</Ind></slot>
 </Atom>
</Update>

Scoped reasoning (see <scope>) can be used in Update to constrain the update to a particular scope (constructed view) of the knowledge base.

Attributes: @safety @card @minCard @maxCard @direction @closure @material @node @prefix @key @keyref @xml:id @xml:base
(See: performative module)

136 @vocab

an Internationalized Resource Identifier (IRI) that defines the mapping to be used when a term is referenced in an @type attribute value. This makes the @type attribute term values fully "webized", even in case of the use of local type definitions such as frame type signatures (<signature>). A default vocabulary can be explicitly defined on the top level <RuleML> element. If no vocabulary is defined it will use the @xml:base which will usually be the IRI of the document if no explicit XML base is defined. The default vocabulary can be overwritten by vocabulary definitions on all elements where the @type can be used and on the extensible <content> role, which are used to embed arbitrary XML code as content into RuleML. The processing rules for the mapping of terms into IRIs using the @vocab attribute follow the RDFa processing model:
  • If the value is a term then it is evaluated as a term as follows:
    • If there is a local default vocabulary the IRI is obtained by concatenating that value and the term.
    • Otherwise, check if the term matches a type name in the type signature definitions (<signature>). If there is a match, use the base IRI.
  • If the value is a valid CURIE, then use the prefix (or the XML base IRI if there is no default prefix) to map the Curie into an IRI.
  • If the value is an absolute IRI, that value is used.
  • Otherwise, the value is ignored.

The following example defines a time frame signature "Datetime" (<oid><Ind>Datetime</Ind></oid>'), where the Time frame is of type type="TimePoint", which maps into the default RuleML vocabulary and the two frame slots "date" and "time" have a value space of type type="date" and type="time", where the used type terms are mapped by the vocab="http://www.w3.org/2001/XMLSchema/" into the XML schema vocabulary.

<signature>
	<Time type="TimePoint">
		<oid><Ind>Datetime</Ind></oid>
		<slot><Ind>date</Ind><Var vocab="http://www.w3.org/2001/XMLSchema/" type="date"/></slot>
		<slot><Ind>time</Ind><Var vocab="http://www.w3.org/2001/XMLSchema/" type="time"/></slot>
	</Time>
</signature>
(See: attribute module and RDFa processing model)

137 <vvi>

a "Verification-Validation-Integrity" (vvi) role used in the test action/primitive (<Test>) and in test suites (<TestSuite>) for VVI tests (integrity entailments (<Entails>), single test items (<TestItem>) or possibly nested test suites (<TestSuite>).
Attributes: @index @prefix @key @keyref @xml:id @xml:base
(See: test module)

138 <weak>

A role used for negation as failure (<Naf>).
Attributes: @prefix @key @keyref @xml:id @xml:base
(See: negation module)

139 @weight

An attribute optionally specifying a <slot>'s relative weight.
(See: slot module)

140 <Xor>

An event algebra operator ("event 1 xor event 2") defining a mutual exclusive set of events (<Event>, <Sequence>, <Disjunction>, <Xor>, <Conjunction>, <Concurrent>, <Not>, <Any>, <Aperiodic>, <Periodic>, <AtMost>, <AtLeast>, <Operator>).
Attributes: @safety @card @minCard @maxCard @closure @iri @node @prefix @key @keyref @xml:id @xml:base
(See: event algebra module and Snoop Event Algebra)