# ARL scenario, violation of Universal Declaration of Human rights, Article 12
# http://www.unhchr.ch/udhr/lang/eng.htm

# more about ARL scenario http://dig.csail.mit.edu/2008/ARL

# $Date: 2008-10-28 10:51:34 -0400 (Tue, 28 Oct 2008) $
# $Revision: 25019 $
# $Author: jacobi $

@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .

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

@prefix :  <http://dig.csail.mit.edu/2008/ARL/policy#> .	

@forAll :COMPLAINT, :SEARCHEVENT, :ACTOR, :ADDRESS, :DEFENDANT.
@forAll :DATA, :PURPOSE, :SPURPOSE, :PEVENT.

:Universal_Declaration_of_Human_Rights_Article12 a air:Policy;
	rdfs:label "Universal Declaration of Human Rights, Article 12";
	rdfs:comment "Under the Universal Declaration of Human Rights no one should be subjected to arbitrary interference with respect to privacy and home. Any search carried out without due process i.e. without giving notice or obtaining consent, violates this.";
#	air:variable :COMPLAINT, :SEARCHEVENT, :ACTOR, :ADDRESS, :DEFENDANT;
#	air:variable :DATA, :PURPOSE, :SPURPOSE, :PEVENT;
	air:rule :UDHR_1.

:UDHR_1 a air:BeliefRule;
       	air:label "Universal Declaration of Human Rights, Article 12 #1";
       	air:pattern {
          :COMPLAINT a tami:PrivacyViolationComplaint;
		tami:prevEvent :SEARCHEVENT;
		tami:actor :ACTOR;
		tami:defendant :DEFENDANT.
           :SEARCHEVENT a tami:SearchEvent.
	   :DEFENDANT a tami:Military.	
       	};
       air:description (:COMPLAINT " was filed by " :ACTOR " about " :SEARCHEVENT " performed by " :DEFENDANT );
	air:rule :UDHR_2.

:UDHR_2 a air:BeliefRule;
	air:label "Universal Declaration of Human Rights, Article 12 #2";
	air:pattern {
            :SEARCHEVENT tami:data :DATA;
		tami:purpose :SPURPOSE.
	    :DATA tami:purpose :PURPOSE.
	};
	air:description("Purpose of " :SEARCHEVENT " was " :SPURPOSE " and it used data meant to be used for " :PURPOSE " purposes ");
	air:rule :UDHR_3.

:UDHR_3 a air:BeliefRule;
        air:label "Universal Declaration of Human rights, Article 12 #4";
        air:pattern {
            :SPURPOSE owl:sameAs :PURPOSE
        };      
        air:description ("The purpose of the SearchEvent is the same as the purpose  of the data that was used for the Search Event");
        air:assert { :SEARCHEVENT air:compliant-with :Universal_Declaration_of_Human_Rights_Article12 };
	air:alt [ air:rule :UDHR_4 ].

:UDHR_4 a air:BeliefRule;
	air:pattern {
       		:SEARCHEVENT tami:prevEvent :PEVENT.
		:PEVENT a tami:Consent; tami:consenter :ACTOR.
        };      
        air:description ("As usage is inconsistent with purpose, consent " :PEVENT " was obtained from " :ACTOR);
        air:assert { :SEARCHEVENT air:compliant-with :Universal_Declaration_of_Human_Rights_Article12 };
	air:alt [ air:description ("No consent was obtained by " :DEFENDANT " before " :SEARCHEVENT " was performed "); 
                  air:rule :UDHR_5 ].

:UDHR_5 a air:BeliefRule;
	air:pattern {
        	:SEARCHEVENT tami:prevEvent :PEVENT.                        
		:PEVENT a tami:Notice; tami:actor :DEFENDANT; tami:notified :ACTOR.
        };
        air:description ("As usage of data was inconsistent with purpose, notice " :PEVENT " was given to  " :ACTOR);                
	air:assert { :SEARCHEVENT air:compliant-with :Universal_Declaration_of_Human_Rights_Article12 };
	air:alt [ air:description ( "No notice was given by " :DEFENDANT " before " :SEARCHEVENT " was performed ");
		  air:rule :UDHR_6 ].

:UDHR_6 a air:BeliefRule;
		air:pattern { };
		air:assert { :SEARCHEVENT air:non-compliant-with :Universal_Declaration_of_Human_Rights_Article12 };
        	air:description (:SEARCHEVENT " was performed without due process, making it incompliant with the Universal Declaration of Human Rights, Article 12").

@forAll :E1, :E2, :E3.

# transitive closure of prevEvent
:trans-prevEvent a air:Policy;
#    air:variable :E1, :E2, :E3;
    air:rule [
        air:label "Transitive closure of prevEvent";
        air:pattern { :E1 tami:prevEvent :E2.
                      :E2 tami:prevEvent :E3.
                     };
        air:assert { :E1 tami:prevEvent :E3 }
    ].



#ends

