AIR to RIF-PRD

From TAMI

Jump to: navigation, search

Representing AIR in RIF interchange format, using RIF-PRD dialect.

Authors: Ankesh Khandelwal

Contents

AIR Overview

The AIR production rule system has two components- the AIR language and the AIR reasoner. The AIR reasoner computes the closure (AIR-closure) for given facts, in N3, with respect to AIR rules. The AIR language has separate ontologies for rules and justification. Please refer to PML based AIR justification for justification ontology. We give a brief overview of the rule language (ontology) and AIR reasoning.

Figure 1 gives a template for expressing AIR rules (referred to by AIR program). All AIR programs can be expressed using the template below and choice for a template over say BNF syntax was because it is convenient for showing the translation to RIF. For more details please see here.

Rules in AIR are grouped into rule sets. Rules included in the rule set are linked by air:rule property and are called top rules. Rules are defined in if condition then actions else actions where condition are expressed as basic graph patterns, and action could either assert graph patterns or activate another rule. The function COND returns the condition as a set of triples (example usage COND(ruleid)). When a rule is activated conditionally from other rule, the latter is referred to as the parent of former and the bindings of (universal) variables appearing in the parent and its ancestors are retained (ie. effectively an instance of the rule is activated). A rule may have more than one parents, ie. it may be activated by more than one rules. The function FIXED_VARIABLES_BEFORE (FVB in short), example usage FVB(ruleid), returns sets of list of universal variables appearing both in the ancestors (including parents), a list per unique ancestors of the rule. New variables may be bound after a rule fires. The function FIXED_VARIABLES_AFTER (FVA in short), example usage FVA(ruleid, vars), returns union of variables in rule ruleid and those in the list vars.

A. RULE SET
# m1 ≥ 0, m2 > 0
@forAll <u_var1>, ..., <u_varm1> .
<setid> a air:RuleSet ;

air:rule <ruleid1>, ..., <ruleidm2> .

B. RULE
# n1, n2, n3, n4 ≥ 0, n3 + n4 > 0
<ruleid> a air:BeliefRule ;

#alternatively air:HiddenRule, air:EllipsedRule
air:if {
@forSome <e_var1>, ..., <e_varn1> .
s1 <p1> o1 .
...
sn2 <pn2> on2 . } ;
air:then <t_action1>, ..., <t_actionn3> ;
air:else <e_action1>, ..., <e_actionn4> .

C. ACTIVATING NEW RULE
<action> air:description (list_of_var_and_str) ;

air:rule <ruleid> .



D. ASSERTING A GRAPH PATTERN
# n > 0
<action> air:description (list_of_var_and_str) ;

air:assert {
s1 <p1> o1 .
...
sn <pn> on . } .

Fig 1. AIR-program template

AIR Reasoning

The procedural semantics of AIR is defined here. Figure 2 gives a concise description of the closure computation algorithm as it abstracts away certain implementation details. The COMP_CLOSURE runs until a fixed point is achieved (Step #2). Steps #2.1 and #2.1.x define a positive stage when all the success rules are fired and the activated rules and inferred facts are added to the rule base and fact base respectively. Steps #2.2, #2.2.x, #2.3, and #2.3.x define a negative stage when all the failed rules fire. Until all the failed rules have fired the activated rules and inferred facts are kept separate from RB and FB, in RBF and FBF respectively. Finally, in steps #2.3 and #2.3.x, RBF and FBF are added to RB and FB.

A. Data Structures
RB = set of active rules
FB = set of facts
RBF = set of rules activated by failed rules
FBF = set of facts inserted by failed rules


B. COMP-CLOSURE
INPUT : AIR-program, facts
OUTPUT : closure of facts w.r.t. the AIR-program
1. Initialize FB, RB, FBF, RBF 1.1. FB = facts
1.2. RB = top rules in AIR-program
1.3. FBF = ∅
1.4. RBF = ∅

2. while a rule in RB is fireable and not fired
2.1. while a successful rule in RB that has not fired
2.1.1. fire successful rules in RB
2.1.1.1. FB = FB ∪ {asserted facts}
2.1.1.2. RB = RB ∪ {activated rule instances}
2.2. while failed rule in RB that has not fired
2.2.1. fire failed rules in RB
2.2.1.1. FBF = FBF ∪ {asserted facts}
2.2.2.2. RBF = RBF ∪ {activated rule instances}
2.3. update FB and RB
2.3.1. FBF := FB ∪ FBF
2.3.2. RBF := RB ∪ RBF
2.3.3. FBF := ∅
2.3.4. RBF := ∅

Fig 2. The COMP-CLOSURE algorithm

RIF-PRD Overview

Here we review important features and syntax of RIF-PRD, from the W3C Recommendation specification, used in the translation. Note that we only describe a subset that is relevant to AIR to RIF-PRD translation. Further we use the abstract syntactic constructs.

Production rules are statements of programming logic that specify the execution of one or more actions when their conditions are satisfied. Production rules have an operational semantics, that the OMG Production Rule Representation specification OMG-PRR summarizes as follows:

  • Match: the rules are instantiated based on the definition of the rule conditions and the current state of the data source;
  • Conflict resolution: a decision algorithm, often called the conflict resolution strategy, is applied to select which rule instance will be executed;
  • Act: the state of the data source is changed, by executing the selected rule instance's actions. If a terminal state has not been reached, the control loops back to the first step (Match).

A rule may be one of:

  • an unconditional action block,
  • a conditional action block: if condition is a formula in the RIF-PRD condition language, and if action is a well-formed action block, then If condition, Then action is a rule.

where conditional formula may be:

  1. Atomic formula.
  2. Conjunction. If φ1, ..., φn, n≥0, are conditional formula then And(φ1 ... φn) is a conjunctive formula. And() is treated as tautology, i.e. a formula that is always true.
  3. Negation. If φ is conditional formula, then Not(φ) is a Negation or negative formula.
  4. Existentials. If φ is a condition formula and ?V1, ..., ?Vn, n > 0, are variables then Exists ?V1 ... ?Vn (φ) is an existential formula.

where atomic formula may be:

  1. positional atomic formula. If t is a constant and t1, ..., tn, n ≥ 0, are constants or variables then t(t1 ... tn) is a positional atomic formula. The variable names begin with ?.
  2. Externally defined atomic formulas. If t is a positional atomic formula then External(t) is an externally defined formula. Externally defined atomic formulas are used for representing built-in predicates.
  3. Equality atomic formulas r = s, Class membership atomic formulas i#c, and subclass atomic formulas c##p. These can be equivalently represented as t(r, owl:sameAs, s, ct), t(i, rdf:type, c, ct) and t(c, rdfs:subClassOf, p, ct) where t is defined in AIR to RIF-PRD translation.

where if a1, ..., am, m ≥ 1, are actions then Do(a1 ... am) denotes an action block.
where action may be an atomic action.
where atomic action represents an atomic transaction and may be Assert(φ) or Retract(φ), where φ may be a positional atom. Without being specific, Assert(φ) inserts φ to the fact base, and Retract(φ) removes φ from the fact base. As a result of new fact in the fact base new conditional formulas may be satisfied, and after some facts are removed from the base some conditional formula that were satisfied may not be satisfied now.

The group construct is used to group sets of rules and to associate them with a conflict resolution strategy. A group consists of a, possibly empty, sets of rules and groups, associated with a resolution conflict strategy and, a priority. If rgj, 0≤j≤n, is either a rule or a group then following represents a group: Group strategy priority (rg0 ... rgn), n ≥ 0, where strategy and priority are optional. The strategy is an IRI that identifies a conflict resolution strategy, and priority is an integer.
If a conflict resolution strategy is not explicitly attached to a group, the strategy defaults to rif:forwardChaining.

Conflict resolution algorithms
Most existing production rule systems implement conflict resolution algorithms that are a combination of the following elements :

  • Refraction. Given instance of a rule must not be fired more than once as long as the reasons that made it eligible for firing hold. i.e. if an instance has been fired in a given state of the system, it is no longer eligible for firing as long as it satisfies the states of facts associated to all the subsequent system states (cycle and transitional);
  • Priority. The rule instances are ordered by priority of the instantiated rules, and only the rule instances with the highest priority are eligible for firing;
  • Recency. the rule instances are ordered by the number of consecutive system states, cycle and transitional, in which they have been in the conflict set, and only the most recently fireable ones are eligible for firing. (The recency rule, used alone, results in depth-first processing)

Conflict resolution strategy: rif:forwardChaining
The RIF-PRD keyword rif:forwardChaining denotes the common conflict resolution strategy that can be summarized as follows: given a conflict set

  1. Refraction is applied to the conflict set, that is, all the refracted rule instances are removed from further consideration;
  2. The remaining rule instances are ordered by decreasing priority, and only the rule instances with the highest priority are kept for further consideration;
  3. The remaining rule instances are ordered by decreasing recency, and only the most recent rule instances are kept for further consideration;
  4. Any remaining tie is broken is some way, and a single rule instance is kept for firing.

Note that single rule instance is picked from the conflict set of fireable rules. Steps #1 to #4 are referred by refraction rule, priority rule, recency rule and tie-break rule respectively.

Halting test

By default, a system state is final, given a rule set and conflict resolution strategy, if there is no rule instance available for firing after application of the conflict resolution strategy.

Normative (Operational) Semantics

The description of production rule system as a transition system is used to specify the semantics of production rules and rules sets interchanged using RIF-PRD. The operational semantics of rules is defined through the operational semantics (alternatively the model theoretic semantics) of conditions and the operational semantics of actions.

A RIF-PRD production rule system is defined as a labeled terminal transition system PRS = {S, A, →PRS, T}, where :

  • S is a set of system states, called the system cycle states;
  • A is a set of transition labels, where each transition label is a sequence of ground RIF-PRD atomic actions;
  • The transition relation →PRS ⊆ S × A × S, is defined as follows:
∀ (s, a, s' ) ∈ S × A × S, (s, a, s' ) ∈ →PRS if and only if all of the following hold:
  1. (facts(s), a, facts(s')) ∈ →*RIF-PRD, where →*RIF-PRD denotes the transitive closure of the transition relation RIF-PRD that is determined by the specification of the semantics of the atomic actions supported by RIF-PRD;
  2. a = actions(picked(s));
  • T ⊆ S, a set of final system states.


The semantics of RIF-PRD atomic actions is specified by the transition relation RIF-PRD ⊆ W × L × W. (w, α, w') ∈ →RIF-PRD if and only if w ∈ W, w' ∈ W, α is a ground atomic action, and one of the following is true:

  1. α is Assert(φ), where φ is a ground atomic formula, and w' = w ∪ {φ};
  2. α is Retract(φ), where φ is a ground atomic formula, and w' = w \ {φ};

where actions(ri) denotes the action instance that is associated to a rule instance ri. By extension, given an ordered set of rule instances, ori, actions(ori) denotes the sequence of ground atomic actions that is the concatenation, preserving the order in ori, of the action instances associated to the rule instances in ori.

where given a rule, r ∈ R, and a ground substitution, σ, such that CVar(r) ⊆ Dom(σ), where CVar(r) denotes the set of the rule variables in r, the result, ri = σ(r), of the substitution of the constant σ(?x) for each variable ?x ∈ CVar(r) is a rule instance (or, simply, an instance) of r.

A production rule system state (or, simply, a system state) is either a system cycle state or a system transitional state. Every production rule system state, s, cycle or transitional, is characterized by

  • a state of the fact base, facts(s);
  • if s is not the current state, an ordered set of rule instances, picked(s), defined as follows:
    • if s is a system cycle state, picked(s) is the ordered set of rule instances picked by the conflict resolution strategy, among the set of all the rule instances that matched facts(s);
    • if s is a system transitional state, picked(s) is the empty set;
  • if s is not the initial state, a previous system state, previous(s), defined as follows: given a system cycle state, sc, and given the sequence of system transitional states, s1,...,sn, n ≥ 0, such that the execution of the first ground atomic action in action(picked(sc)) transitioned the system from sc to s1 and ... and the n-th ground atomic action in action(picked(sc)) transitioned the system from sn-1 to sn, then previous(s) = sn if and only if the (n+1)-th ground atomic action in action(picked(sc)) transitioned the system from sn to s.


The input function to a RIF-PRD production rule system is defined as:

Eval(RS, LS, H, w)PRS s ∈ S, such that facts(s) = w and previous(s) = NIL

where RS ⊆ R, LS, H, and w ∈ W are given rule set, associated conflict resolution strategy, halting test and initial state of the fact base,respectively.

Given a rule set, RS ⊆ R, and a system state, s, the conflict set determined by RS in s is the set, conflictSet(RS, s) of all the different instances of the rules in RS that match the state of the fact base, facts(s) ∈ W. The rule instances that are in the conflict set are, sometimes, said to be fireable.

In each non-final cycle state, s, of a production rule system, a subset, picked(s), of the rule instances in the conflict set is selected and ordered; their action parts are instantiated, and the resulting sequence of ground atomic actions is executed. This is sometimes called: firing the selected instances.

Given a set of rule instances, cs, the conflict resolution strategy rif:forwardChaining can now be described with the help of four rules, where ri and ri' are rule instances:

  1. Refraction rule: if ri ∈ cs and lastPicked(ri, s) < recency(ri, s), then cs = cs - ri;
  2. Priority rule: if ri ∈ cs and ri' ∈ cs and priority(ri) < priority(ri'), then cs = cs - ri;
  3. Recency rule: if ri ∈ cs and ri' ∈ cs and recency(ri, s) > recency(ri', s), then cs = cs - ri;
  4. Tie-break rule: if ri ∈ cs, then cs = {ri}. RIF-PRD does not specify the tie-break rule more precisely: how a single instance is selected from the remaining set is implementation specific.

For the conflict strategy rif:forwardChaining, a system state is final if the conflict set after application of the refraction rule to all rules in the conflict set is empty.

Semantics Preserving Transformation

  • A mapping from a RIF-PRDΤ,Ε,C,H, R, to a rule set, RL, expressed in a language L, is semantics-preserving if and only if, for any initial state of the fact base, w, conflict resolution strategy, c, and halting test, h, it also maps each L formula in FL,RL, c, h, w onto a set of RIF-PRD ground formulas in FR,w,c,h;
  • A mapping from a rule set, RL, expressed in a language L, to a RIF-PRDΤ,Ε,C,H, R, is semantics-preserving if an only if, for any initial state of the fact base, w, conflict resolution strategy, c, and halting test, h, it also maps each set of ground RIF-PRD atomic formulas in FR,w,c,h onto an L formula in FL,RL, c, h, w.

where FL,RL, c, h, w denote the set of all the formulas in L that represent a final state of the fact base that an L processor can possibly reach.
where FR,w,c,h denote the set of all the sets, f, of RIF-PRD ground atomic formulas that represent final states of the fact base, w'.
where C is a set of conflict resolution strategies, H is a set of halting tests
where a rule set , R, is a RIF-PRDΤ,Ε,C,H rule set if and only if

  • R contains only RIF-PRDΤ,Ε rules,
  • the conflict resolution strategy that is associated to R is in C, and
  • the halting test that is associated to R is in H.

where a rule r is a RIF-PRDΤ,Ε rule if and only if

  • r is a well-formed RIF-PRD rule,
  • all the datatypes and symbol spaces used in r are in Τ, and
  • all the externally defined functions and predicates used in r are in Ε.

AIR to RIF-PRD Translation

We will define translation using functions Γ, σ, COND and FV. The functions COND and FV are defined in AIR overview. σ(U) returns either ?U (? appended to U) or U depending on whether U is universally quantified IRI or not, respectively. FVBσ(ruleid) = σ(FVB(ruleid)), ie. variable names in returned structures are appended with ?. Figure 3 defines the translation function Γ(ele, fv, contp), contp and fv are optional, for eles defined in Figure 1 to RIF.

Following positional atomic formulas are used (s, p, o, ct can be constants or variables):

  1. t(s p o ct). It corresponds with N3 triple with subject s, predicate p, and object o, ie. {s, p, o}, in context ct.
  2. t'(s p o ct). Is similar to t(s p o ct) .
  3. active_rule(r ?v1 ... ?vm ct). If r is a rule id, m≥0, and ?v1 ... ?vm ∈ FVBσ(r) then this corresponds to the instance of r active in context ct
  4. active_rule'(r ?v1 ... ?vm ct). Is similar to active_rule(r ?v1 ... ?vm, ct).
  5. docC(docid, ct). Is used to associate documents (docid), containing rules or facts, with the context (ct) they belong to.
  6. rulesetD(setid, docid). Is used to associate ruleset (setid) with the document, containing the ruleset, id (docid).
  7. rulesetC(setid, ct). Is used to associate ruleset (setid) with contexts (ct) they are active in.


The translation expects no canonical representation for AIR rules but assumes that RDF blank nodes in the condition of rules have all been replaced appropriately with existentially quantified variables. We use distinct predicate symbols, of active_rule and active_rule', for each rule instances. New symbols are created using a HASH function which maps the tuple of rule id and list of variables, treated as sets (ie. order doesn't matter), to an integer. It is assumed that HASH is a collision free hashing function for keys generated in the translation of AIR program.

A. Γ(setid), where setid is a RULE SET
1. If And(rulesetD(setid ?docid) docC(?docid ?ct)) Then Do(Assert(rulesetC(setid ?ct)))
2. If rulesetC(setid ?ct) Then Do(Assert(active_ruleinst(ruleid1 ?ct)) ... Assert(active_ruleinst'(ruleidm2 ?ct)))
where inst = HASH(ruleid1, ∅) and inst' = HASH(ruleidm2, ∅)

B. Γ(ruleid), where ruleid is a RULE
3. for all fFVBσ(ruleid):
3.1. If And(active_ruleinst(ruleid f ?ct) (EXISTS e_var1 ... e_varn1 Γ(COND(ruleid)) ) Then Do(Γ(t_action1, fva, +) ... Γ( t_actionn3, fva, +))
3.2. If And(active_ruleinst(ruleid f ?ct) Not(EXISTS e_var1 ... e_varn1 Γ(COND(ruleid)) ) Then Do(Γ(e_action1, f, -) ... Γ( e_actionn4, f, -))
where Γ(COND(ruleid)) := And(t(σ(s1) σ(p1) σ(o1) ?ct) ... t(σ(sn2) σ(pn2) σ(on2) ?ct)), fva = FVA(ruleid, f) and inst = HASH(ruleid, f)

C. Γ(action, fv, contp), where action is ACTIVATING NEW RULE
4. Γ(action, fv, +) := Assert(active_ruleinst(ruleid fv ?ct))
5. Γ(action, fv, -)
5.1. := Assert(active_rule'inst(ruleid fv ?ct))
5.2. If active_rule'inst(ruleid fv ?ct) Then Do(Assert(active_ruleinst(ruleid fv ?ct)))
where inst = HASH(ruleid, fv)

D. Γ(action, fv, contp), where action is ASSERTING A GRAPH PATTERN
6. Γ(action, fv, +) := Assert(t(σ(s1) σ(p1) σ(o1) ?ct)) ... Assert(t(σ(sn) σ(pn) σ(on) ?ct))
7. Γ(action, fv, -) := Assert(t'(σ(s1) σ(p1) σ(o1) ?ct)) ... Assert(t'(σ(sn) σ(pn) σ(on) ?ct))

8. If t'(?s ?p ?o ?ct) Then Do(Assert(t(?s ?p ?o ?ct)))

Fig 3. Γ(ele, fv, contp) function definition.

Let ℘1, ℘2, ℘3.1, ℘3.2, and ℘5.2 are production rules generated by Translation steps 1, 2, 3.1, 3.2 and 5.2 respectively. Further, ℘8 is singleton containing rule 8. Then we define groups Gi, 1≤i≤4, and GT as shown in Figure 4. Note than in step 5 a value is returned in step 5.1 (which is used in step 3.2) and a new rule is created in step 5.2.

G1: Group 4 (℘1 ∪ ℘2)
G2: Group 3 (℘3.1)
G3: Group 2 (℘3.2)
G4: Group 1 (℘5.2 ∪ ℘8)
GT: Group rif:forwardChaining (G1 G2 G3 G4)

Fig 4. Grouping translated rules

GT is the RIF-PRD translation of the AIR program.

Proposition 1: Given any AIR program α, GT = Γ(α) is a faithful translation of the AIR program α to RIF-PRD under the normative rif:forwardChaining conflict resolution strategy. By faithful we mean that given any AIR program α, input RDF facts Ι, and their RIF-PRD translation GT (note that now GT also includes RDF to RIF translations of facts in Ι), the extension of predicate t after GT has fired completely will be equivalent to the RDF facts in the AIR closure of α and Ι.

Proof Sketch: There is close similarity between the AIR closure computation algorithm and the corresponding PRD rule construction.

Example

We will use the same example as that for AIR to LP translation showed in Figure 5. The AIR to PRD translation of this AIR program is given in Figure 6. The AIR to LP translation is given in Appendix V (Figure 17).

@prefix air: <http://dig.csail.mit.edu/TAMI/2007/amord/air#> .
@prefix conf: <http://www.conf.org/ontology#> .
@prefix pol: <http://www.conf.org/policies/publication#> .
@prefix: <http://www.conf.org/policies/publication#> .

pol:PubInProcPolicy a air:RuleSet ;

air:rule pol:CheckPubInProc .


@forAll :PUBL .
pol:CheckPubInProc a air:BeliefRule ;

air:if { @forSome :PROC .
<http://www.conf.org> conf:hasProceedings :PROC .
 :PROC conf:hasPaper :PUBL . } ;
air:then [ air:description (:PUBL " published in this conference") ;
air:rule pol:CheckNonCompliance ],
[ air:rule pol:CheckAtLeastOneAuthReg ],
[ air:rule pol:CheckFirstAuthExempted ] .


pol:CheckNonCompliance a air:BeliefRule ;
air:if { :PUBL air:compliant-with pol:PubInProcPolicy . } ;
air:else [ air:description ("the publication of " :PUBL " is questionable
as it did not meet any of the two criteria") ;
air:assert { :PUBL air:non-compliant-with pol:PubInProcPolicy } ] .

@forAll :AUTH .
pol:CheckAtLeastOneAuthReg a air:BeliefRule ;

air:if { :PUBL conf:hasAuthor :AUTH .
<http://www.conf.org> conf:registeredBy :AUTH . } ;
air:then [ air:description ("One of the Authors" :AUTH "registered for
the conference") ;
air:assert { :PUBL air:compliant-with pol:PubInProcPolicy } ] .


@forAll :REASON .
pol:CheckFirstAuthExempted a air:BeliefRule ;

air:if { @forSome :COCHAIR, :EXEMPTION .
 :COCHAIR a conf:Co-Chair .
 :EXEMPTION a conf:PublicationExemption .
 :EXEMPTION conf:exemptedBy :COCHAIR .
 :EXEMPTION conf:exemptee :AUTH .
 :EXEMPTION conf:reason :REASON .
 :PUBL conf:hasFirstAuthor :AUTH . } ;
air:then [ air:description ("the first author " :AUTH " was exempted by one
of the cochairs, because " :REASON) ;
air:assert { :PUBL air:compliant-with pol:PubInProcPolicy } ] .

Fig 5. Example AIR-program describing the publication policy.

Group rif:forwardChaining (

Group 4 (

Do(Assert(rulesetC(pol:PubInProcPolicy def-ctxt)))

If rulesetC(pol:PubInProcPolicy ?ct)
Then Do(Assert(active_rule1(pol:CheckPubInProc ?ct))

)

Group 3 (

If And(active_rule1(pol:CheckPubInProc ?ct) (EXISTS ?PROC And(t(http://www.conf.org conf:hasProceedings ?PROC ?ct) t(?PROC conf:hasPaper ?PUBL ?ct))))
Then Do(Assert(active_rule2(pol:CheckNonCompliance ?PUBL ?ct)) Assert(active_rule3(pol:CheckAtLeastOneAuthReg ?PUBL ?ct)) Assert(active_rule4(pol:CheckFirstAuthExempted ?PUBL ?ct)))

If And(active_rule3(pol:CheckAtLeastOneAuthReg ?PUBL ?ct) And(t(?PUBL conf:hasAuthor ?AUTH  ?ct) t(http://www.conf.org conf:registeredBy ?AUTH ?ct)))
Then Do(Assert(t(?PUBL air:compliant-with pol:PubInProcPolicy ?ct)))

If And(active_rule4(pol:CheckFirstAuthExempted ?PUBL ?ct) (EXISTS ?COCHAIR ?EXEMPTION And(t(?COCHAIR a conf:Co-Chair ?ct) t(?EXEMPTION a conf:PublicationExemption ?ct) t(?EXEMPTION conf:exemptedBy ?COCHAIR ?ct) t(?EXEMPTION conf:exemptee ?AUTH ?ct) t(?EXEMPTION conf:reason ?REASON ?ct) t(?PUBL conf:hasFirstAuthor ?AUTH ?ct))))
Then Do(Assert(t(?PUBL air:compliant-with pol:PubInProcPolicy ?ct)))

)

Group 2 (

If And(active_rule2(pol:CheckNonCompliance ?PUBL ?ct) Not(t(?PUBL air:compliant-with pol:PubInProcPolicy ?ct)))
Then Do(Assert(t'(?PUBL air:non-compliant-with pol:PubInProcPolicy ?ct)))

)

Group 1 (

If t'(?s ?p ?o ?ct)
Then Do(Assert(t(?s ?p ?o ?ct)))

)
)

Fig 6. Translation of example AIR program to RIF-PRD. As noted earlier we use abstract syntactic constructs. (Also constants have not been quoted or typed.)

Personal tools