Accountability in RDF (AIR) is a policy language represented in Turtle + quoting. The vocabulary (classes and properties) used for declaring policies is defined in the AIR ontology. AIR supports generation of explanations for policy decisions and provides efficient and expressive reasoning.

In AIR, policy is modeled as production-rule containers. Rules are encoded as pattern-action pairs. Conditions for a rule is represented in form of graph pattern. The actions, including assertions and triggering of a new rule, can be declared to be executed either when pattern is matched or when no match is found. A matched subgraph can be referenced and reused to generate justifications. Every action is associated with a justification-rule-id and matched pattern at the run-time. A natural language description of the rule can also be included.

Rules are of 2 types: Belief-rules and Hidden-rules. When an explanation for policy decision is generated the justification for actions in Hidden rules are not included. Compliance and non-compliance with policies can be asserted using compliant-with and non-compliant-with predicates.

4.1. Policy Modeling

4.1.1. Syntatic structure of AIR language

Test the code below

@forAll :PERSON, :CITY. 
:ny_state_residency_policy a air:Policy; 
      rdfs:label "NY State residency policy"; 
      air:rule :state-residency-rule. 
:state-residency-rule a air:Belief-rule; 
    rdfs:label "state residency rule"; 
    air:pattern { 
       :PERSON tamip:Lives_in_city :CITY. 
       :CITY tamip:Has_state :NY.     
    }; 
    air:assert {:PERSON air:compliant-with :ny_state_residency_policy.}.