# $Date: 2011-06-28 15:11:30 -0400 (Tue, 28 Jun 2011) $
# $Revision: 31060 $
# $Author: lkagal $

@prefix air: <http://dig.csail.mit.edu/TAMI/2007/amord/air#> .

@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

<> rdfs:comment "Definition of the AIR (AMORD in RDF) policy language version 2.0".

###### RuleSet class ###########
air:RuleSet a rdfs:Class;
    rdfs:label "A collection of rules".

air:rule a owl:ObjectProperty;
    rdfs:comment "activate a rule (belief, hidden, or ellipsed).";
    rdfs:label "Rule (belief, hidden, or ellipsed)";
    rdfs:domain air:RuleSet;
    rdfs:range air:Rule;
    rdfs:domain  [ a owl:Class;
             owl:unionOf  (
            		air:RuleSet
            		air:RuleContainer ) ].


###### Rule class ###########
air:Rule a rdfs:Class;
    rdfs:label "Generalized class of rules";
    rdfs:subClassOf 
    [ a owl:Restriction;
        owl:minCardinality "1"^^xsd:nonNegativeInteger;
        owl:onProperty air:if ],
    [ a owl:Restriction;
        owl:maxCardinality "1"^^xsd:nonNegativeInteger;
        owl:onProperty air:description ],
    [ a owl:Restriction;
        owl:minCardinality "1"^^xsd:nonNegativeInteger;
        owl:onProperty air:action ].

air:if a owl:ObjectProperty;
    rdfs:comment "pattern to be matched against a universe.";
    rdfs:label "Pattern or condition";
    rdfs:domain air:Rule;
    rdfs:range air:Pattern.

air:action a owl:ObjectProperty;
    rdfs:comment "action (rule or assertion) to be taken.";
    rdfs:label "Rule or assertion";
    rdfs:domain air:Rule;
    rdfs:range air:AbstractContainer.

air:then a owl:ObjectProperty;
    rdfs:subPropertyOf air:action;
    rdfs:comment "action (rule or assertion) to be taken when pattern matches.".

air:else a owl:ObjectProperty;
    rdfs:subPropertyOf air:action;
    rdfs:comment "action (rule or assertion) to be taken when pattern does not match.".

air:description a owl:DataTypeProperty;
    rdfs:comment "list of strings and variables used in justification.";
    rdfs:label "Description";
    rdfs:domain  [ a owl:Class;
                     owl:unionOf  (
            		air:Rule
            		air:AbstractContainer ) ] .


###### Rule subclass ###########
air:BeliefRule rdfs:subClassOf air:Abstract-rule;
    rdfs:label "Belief rule";
    rdfs:comment "rules in this class match beliefs.".

air:HiddenRule rdfs:subClassOf air:Abstract-rule;
    rdfs:label "Hidden rule";
    rdfs:comment "similar to Belief rules but its name, description, premises and those of its nested rules do not appear in the justification.".

air:EllipsedRule rdfs:subClassOf air:Abstract-rule;
    rdfs:label "Ellipsed rule";
    rdfs:comment "similar to Belief rules but in the justification only its flow control info appears and not its name, premises, or description.".


###### AbstractContainer class ###########
air:AbstractContainer a rdfs:Class;
    rdfs:label "Abstract class of containers for rules and assertions".


###### AbstractContainer subclass ###########
air:RuleContainer rdfs:subClassOf air:Abstract-container;
    rdfs:label "Rule collection";
    rdfs:subClassOf
    [ a owl:Restriction;
        owl:maxCardinality "1"^^xsd:nonNegativeInteger;
        owl:onProperty air:rule ].

air:AssertionContainer rdfs:subClassOf air:Abstract-container;
    rdfs:label "Assertion collection";
    rdfs:subClassOf
    [ a owl:Restriction;
        owl:maxCardinality "1"^^xsd:nonNegativeInteger;
        owl:onProperty air:assert ].

air:assert a rdf:Property;
    rdfs:label "Statement being asserted";
    rdfs:domain air:AssertionContainer;
    rdfs:range air:N3Formula;
    rdfs:comment "A graph to be asserted.".


###### N3Formula & Pattern class ###########
air:N3Formula a rdfs:Class;
    rdfs:label "N3 Formula";
    rdfs:comment "this the N3 Formula class.".

air:Pattern rdfs:subClassOf air:N3Formula;
    rdfs:label "Pattern";
    rdfs:comment "pattern graph for rules.".

#ends

