<?xml version='1.0' encoding='ISO-8859-1'?>
<rdf:RDF
  xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
  xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#"
  xmlns     ="http://xmlcontracting.org/sd.daml#"
>


<!-- Comments:

Authors: Benjamin Grosof bgrosof@mit.edu and Terry Poon tpoon@alum.mit.edu

Version of 2002-2003
last edited July 12, 2003

In this file, we define various classes and properties with associated 
subclasses/superclasses and domain and ranges
and property restrictions.  DAML+OIL is based on the knowledge representation
of Description Logic (DL).  

We employ a compressed ASCII syntax, which we call "ADL" syntax, 
for sake of conciseness.
It is defined as follows. ";" indicates the end of a 
(logical) statement.  "/* ... */" encloses a comment (rdfs:comment) that is
associated with the immediately preceding statement.  

  C : ;
means simply that C is a class.

  P :: ;
means simply that P is a property.

  C1 : C2; 
means C1 is a class that is a subclass of (class) C2.

  P :: D -~ R;  
means P is a property with domain (class) D and range (class) R.

  (exists P . C)
means the DL restriction class  (exists P . C), 
where P is a property and C is a class.  
I.e., there exists a value of property P that is in class C.

  (forall P . C)  
means the DL restriction class  (forall bar . wub),
where P is a property and C is a class.  
I.e., every value of property P is in class C.

  (card-1 . P)
means that DL restriction that P has cardinality 1,
i.e., it has exactly one value.

  (mincard-1 . P)  
means that DL restriction that P has minimum cardinality 1,
i.e., it has at least one value.  Note that it is logically
equivalent to 
  (exists P . Top)
where
  Top 
means in DL the most inclusive possibly class, i.e., essentially True.

  C1 and C2 
means the intersection (conjunction) of classes (or complex 
class expressions) C1 and C2.


This file's ontology builds upon the process ontology pr*.daml, 
as well as generic DAML+OIL; for brevity, 
we use the ff. XML namespace abbreviations: 
  pr: for http://xmlcontracting.org/pr.daml# 
  sd: for http://xmlcontracting.org/sd.daml#
  daml: for http://www.daml.org/2001/03/daml+oil#

Here's what's defined in this file:

sd:Contract : (mincard-1 . sd:specFor);
sd:specFor :: sd:Contract -~ pr:Process;
sd:ContractForOneProcess : sd:Contract;
sd:ContractForOneProcess : (card-1 sd:specFor);
sd:ContractResult : ;
sd:result :: sd:Contract -~ sd:ContractResult;
sd:exceptionOccurred :: sd:ContractResult -~ pr:Exception;
sd:exceptionLikely :: sd:ContractResult -~ pr:Exception;
sd:detectsClass :: pr:DetectException -~ daml:Class;
sd:anticipatesClass :: pr:AnticipateException -~ daml:Class;
sd:avoidsClass :: pr:AvoidException -~ daml:Class;
sd:resolvesClass :: pr:ResolveException -~ daml:Class;
sd:handles :: pr:ExceptionHandler -~ pr:Exception;
sd:detects :: pr:DetectException -~ pr:Exception;
sd:anticipates :: pr:AnticipateException -~ pr:Exception;
sd:avoids :: pr:AvoidException -~ pr:Exception;
sd:resolves :: pr:ResolveException -~ pr:Exception;

 -->


<daml:Ontology rdf:about="">
 <daml:versionInfo> </daml:versionInfo>
 <rdfs:comment>
   Defines concepts and relations used by automated contracts in SweetDeal
 </rdfs:comment>
 <daml:imports rdf:resource="http://www.daml.org/2001/03/daml+oil"/>
 <daml:imports rdf:resource="http://xmlcontracting.org/pr.daml"/>
</daml:Ontology>

<daml:Class rdf:ID="Contract">
  <rdfs:subClassOf>
    <daml:Restriction daml:minCardinality="1">
      <daml:onProperty rdf:resource="#specFor"/>
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>    

<daml:ObjectProperty rdf:ID="specFor">
  <rdfs:domain rdf:resource="#Contract" /> 
  <rdfs:range rdf:resource="http://xmlcontracting.org/pr.daml#Process" /> 
</daml:ObjectProperty>

<daml:Class rdf:ID="ContractForOneProcess">
  <rdfs:subClassOf rdf:resouce="#Contract"/>
  <rdfs:subClassOf>
    <daml:Restriction daml:cardinality="1">
      <daml:onProperty rdf:resource="#specFor"/>
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>

<daml:Class rdf:ID="ContractResult"/>

<daml:ObjectProperty rdf:ID="result">
  <rdfs:domain rdf:resource="#Contract" /> 
  <rdfs:range rdf:resource="#ContractResult" /> 
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="exceptionOccurred">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#ContractResult"/>
  <daml:range rdf:resource="http://xmlcontracting.org/pr.daml#Exception"/>
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="exceptionLikely">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#ContractResult"/>
  <daml:range rdf:resource="http://xmlcontracting.org/pr.daml#Exception"/>
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="detectsClass">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#DetectException"/>
  <daml:range rdf:resource="http://www.daml.org/2001/03/daml+oil#Class"/>
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="anticipatesClass">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#AnticipateException"/>
  <daml:range rdf:resource="http://www.daml.org/2001/03/daml+oil#Class"/>
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="avoidsClass">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#AvoidException"/>
  <daml:range rdf:resource="http://www.daml.org/2001/03/daml+oil#Class"/>
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="resolvesClass">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#ResolveException"/>
  <daml:range rdf:resource="http://www.daml.org/2001/03/daml+oil#Class"/>
</daml:ObjectProperty>


<daml:ObjectProperty rdf:ID="handles">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#ExceptionHandler"/>
  <daml:range rdf:resource="http://xmlcontracting.org/pr.daml#Exception"/>
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="detects">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#DetectException"/>
  <daml:range rdf:resource="http://xmlcontracting.org/pr.daml#Exception"/>
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="anticipates">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#AnticipateException"/>
  <daml:range rdf:resource="http://xmlcontracting.org/pr.daml#Exception"/>
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="avoids">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#AvoidException"/>
  <daml:range rdf:resource="http://xmlcontracting.org/pr.daml#Exception"/>
</daml:ObjectProperty>
  
<daml:ObjectProperty rdf:ID="resolves">
  <daml:domain rdf:resource="http://xmlcontracting.org/pr.daml#ResolveException"/>
  <daml:range rdf:resource="http://xmlcontracting.org/pr.daml#Exception"/>
</daml:ObjectProperty>

</rdf:RDF>
