<?xml version="1.0" ?>
<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/pr.daml#"
>


<!-- Comments:  Change Notes on versions:

- doc: in pr-v2.daml in this paper directory, I fixed three bugs in the labels
of exceptions (didn't affect functionality)
- doc:  in pr-v4-commented.daml, I fixed the ff. apparent bugs:
 eliminated mention of CoordinationMechanism:
    CoordinationMechanism : Process;
    Buy : CoordinationMechanism;
      /* ?? todo:  is this last one right? i.e., should it be? seems it should
        be a Process or Activity */
 instead replaced those two with:
    Buy : Process;

 -->

<!-- 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 generic DAML+OIL,
and will be further built upon by file sd.daml.

Here's what's defined in this file:

hasException ::  Process -~ Exception;
isHandledBy ::  Exception -~ ExceptionHandler;
Process : ;
Exception : (exists isHandledBy . NotifyAboutException);
ExceptionHandler : Process;
Buy : Process;
Buy : (exists hasException . SubcontractorIsLate);
Buy : (exists hasException . LowQualityResult);
Buy : (exists hasException . SubcontractorDropsTask);
Buy : (exists hasException . SubcontractorChangesCost);
Buy : (exists hasException . ContractorDoesNotPay);
Buy : (exists hasException . ContractorCancelsTask);
BuyOverInternet : Buy;
BuyinElectronicStore : BuyOverInternet;
BuyInElectronicStoreUsingAuction : BuyinElectronicStore;
BuyInElectronicStoreUsingPostedPrices : BuyinElectronicStore;
SystemCommitmentViolation : Exception;
  /* Violations of commitments made by the system operator to create an
     environment well-suited to the task at hand. */
AgentCommitmentViolation : Exception;
  /* Violations of commitments agents make to each other. */
InfrastructureCommitmentViolation : Exception;
  /* Violations of commitments made by the infrastructure to provide 
     Dependable communication and computation. */
MatchmakerViolation : AgentCommitmentViolation;
ContractorMatchmakerCollusion : MatchmakerViolation;
  /* collusion between contractor (ex. buyer) and 
     matchmaker (ex. auctioneer) */
ContractorViolation : AgentCommitmentViolation;
ContractorDoesNotPay : ContractorViolation;
ContractorDoesNotPay : (exists isHandledBy . CheckCreditLine);
ContractorDoesNotPay : (exists isHandledBy . DetectPrerequisiteViolation);
ContractorDoesNotPay : (exists isHandledBy . ProvideSafeExchangeProtocols);
FraudulentCreditPayment : ContractorDoesNotPay;
ContractorCancelsTask : ContractorViolation;
ContractorCancelsTask : (exists isHandledBy . DetectViaNotification);
ContractorCancelsTask : (exists isHandledBy . PenalizeForDecommitment);
SubcontractorViolation : AgentCommitmentViolation;
  /* subcontractor (seller) violates commitments */
SubcontractorIsLate : SubcontractorViolation;
SubcontractorIsLate : (exists isHandledBy . DetectPrerequisiteViolation);
SubcontractorIsLate : (exists isHandledBy . PenalizeForContingency);
SubcontractorIsLate : (exists isHandledBy . PenalizeUsingRiskPayments);
LowQualityResult : SubcontractorViolation;
LowQualityResult : (exists isHandledBy . DetectPrerequisiteViolation);
LowQualityResult : (exists isHandledBy . PenalizeForContingency);
LowQualityResult : (exists isHandledBy . PenalizeUsingRiskPayments);
SubcontractorDropsTask : SubcontractorViolation;
SubcontractorDropsTask : (exists isHandledBy . PenalizeForDecommitment);
SubcontractorDropsTask : (exists isHandledBy . DetectViaNotification);
SubcontractorChangesCost : SubcontractorViolation;
FindException : ExceptionHandler;
FixException : ExceptionHandler;
AnticipateException : FindException;
MaintainReputationInformation : AnticipateException;
CheckCreditLine : AnticipateException;
DetectException : FindException;
DetectPrerequisiteViolation : DetectException;
DetectTimeout : DetectException;
MonitorUsingSentinels : DetectException;
DetectViaNotification : DetectException;
ResolveException : FixException;
NotifyAboutException : ResolveException;
NotifyAboutExceptionUsingEmail : NotifyAbouException;
NotifyAboutExceptionUsingPager : NotifyAbouException;
AvoidException : FixException;
ProvideSafeExchangeProtocols : AvoidException;
ProvideEscrowService : ProvideSafeExchangeProtocols;
ProvideEscrowServiceWithBuyerCertification : ProvideEscrowService;
ProvideEscrowServiceWithThirdParty : ProvideEscrowService;
ProvideIncentives : AvoidException;
ProvidePenalties : ProvideIncentives;
PenalizePoorBehavior : ProvidePenalties;
PenalizeForDecommitment : PenalizePoorBehavior;
PenalizeForContingency : PenalizePoorBehavior;
PenalizeUsingRiskPayments : PenalizePoorBehavior;

 -->



<daml:Ontology rdf:about="">
  <rdfs:comment>
An ontology of some process knowledge from the MIT Process Handbook.
  </rdfs:comment>
  <daml:imports rdf:resource="http://www.daml.org/2001/03/daml+oil"/>
</daml:Ontology>

<daml:ObjectProperty rdf:ID="hasException">
  <rdfs:domain rdf:resource="#Process" /> 
  <rdfs:range rdf:resource="#Exception" /> 
</daml:ObjectProperty>

<daml:ObjectProperty rdf:ID="isHandledBy">
  <rdfs:domain rdf:resource="#Exception" /> 
  <rdfs:range rdf:resource="#ExceptionHandler" /> 
</daml:ObjectProperty>

<daml:Class rdf:ID="Process">
  <rdfs:label>Process</rdfs:label>
  <rdfs:comment>A process</rdfs:comment>
</daml:Class>

<daml:Class rdf:ID="Exception">
  <rdfs:label>Exception</rdfs:label>
  <rdfs:comment>
    A violation of an inter-agent dependency (i.e. commitment)
  </rdfs:comment>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#NotifyAboutException"/>	
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>

<daml:Class rdf:ID="ExceptionHandler">
  <rdfs:subClassOf rdf:resource="#Process"/>
  <rdfs:label>Exception Handler</rdfs:label>
  <rdfs:comment>
    A process that deals with exceptions
  </rdfs:comment>
</daml:Class>

<daml:Class rdf:ID="Buy">
  <rdfs:subClassOf rdf:resource="#Process"/>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#hasException"/>
      <daml:hasClass rdf:resource="#SubcontractorIsLate"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#hasException"/>
      <daml:hasClass rdf:resource="#LowQualityResult"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#hasException"/>
      <daml:hasClass rdf:resource="#SubcontractorDropsTask"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#hasException"/>
      <daml:hasClass rdf:resource="#SubcontractorChangesCost"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#hasException"/>
      <daml:hasClass rdf:resource="#ContractorDoesNotPay"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#hasException"/>
      <daml:hasClass rdf:resource="#ContractorCancelsTask"/>
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>

<daml:Class rdf:ID="BuyOverInternet">
  <rdfs:subClassOf rdf:resource="#Buy"/>
</daml:Class>

<daml:Class rdf:ID="BuyInElectronicStore">
  <rdfs:subClassOf rdf:resource="#BuyOverInternet"/>
</daml:Class>

<daml:Class rdf:ID="BuyInElectronicStoreUsingAuction">
  <rdfs:subClassOf rdf:resource="#BuyInElectronicStore"/>
</daml:Class>

<daml:Class rdf:ID="BuyInElectronicStoreUsingPostedPrices">
  <rdfs:subClassOf rdf:resource="#BuyInElectronicStore"/>
</daml:Class>

<daml:Class rdf:ID="BuyUsingBilateralNegotiation">
  <rdfs:subClassOf rdf:resource="#BuyInElectronicStore"/>
</daml:Class>

<daml:Class rdf:ID="SystemCommitmentViolation">
  <rdfs:subClassOf rdf:resource="#Exception"/>
  <rdfs:label>system commitment violation</rdfs:label>
  <rdfs:comment>
Violations of commitments made by the system operator to create an
environment well-suited to the task at hand.
  </rdfs:comment>
</daml:Class>

<daml:Class rdf:ID="AgentCommitmentViolation">
  <rdfs:subClassOf rdf:resource="#Exception"/>
  <rdfs:label>agent commitment violation</rdfs:label>
  <rdfs:comment>
Violations of commitments agents make to each other.
  </rdfs:comment>
</daml:Class>

<daml:Class rdf:ID="InfrastructureCommitmentViolation">
  <rdfs:subClassOf rdf:resource="#Exception"/>
  <rdfs:label>infrastructure commitment violation</rdfs:label>
  <rdfs:comment>
Violations of commitments made by the infrastructure to provide 
Dependable communication and computation.
  </rdfs:comment>
</daml:Class>

<daml:Class rdf:ID="MatchmakerViolation">
  <rdfs:subClassOf rdf:resource="#AgentCommitmentViolation"/>
</daml:Class>

<daml:Class rdf:ID="ContractorMatchmakerCollusion">
  <rdfs:subClassOf rdf:resource="#MatchmakerViolation"/>
  <rdfs:label>
collusion between contractor (ex. buyer) and matchmaker (ex. auctioneer)
  </rdfs:label>
</daml:Class>

<daml:Class rdf:ID="ContractorViolation">
  <rdfs:subClassOf rdf:resource="#AgentCommitmentViolation"/>
  <rdfs:label>contractor (buyer) violates commitments</rdfs:label>
</daml:Class>

<daml:Class rdf:ID="ContractorDoesNotPay">
  <rdfs:subClassOf rdf:resource="#ContractorViolation"/>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#CheckCreditLine"/>
    </daml:Restriction>
  </rdfs:subClassOf>    
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#DetectPrerequisiteViolation"/>
    </daml:Restriction>
  </rdfs:subClassOf>    
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#ProvideSafeExchangeProtocols"/>      
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>

<daml:Class rdf:ID="FradulentCreditPayment">
  <rdfs:subClassOf rdf:resource="#ContractorDoesNotPay"/>
</daml:Class>

<daml:Class rdf:ID="ContractorCancelsTask">
  <rdfs:subClassOf rdf:resource="#ContractorViolation"/>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#DetectViaNotification"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#PenalizeForDecommitment"/>
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>

<daml:Class rdf:ID="SubcontractorViolation">
  <rdfs:subClassOf rdf:resource="#AgentCommitmentViolation"/>
  <rdfs:label>subcontractor (seller) violates commitments</rdfs:label>
</daml:Class>

<daml:Class rdf:ID="SubcontractorIsLate">
  <rdfs:subClassOf rdf:resource="#SubcontractorViolation"/>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#DetectPrerequisiteViolation"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#PenalizeForContingency"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#PenalizeUsingRiskPayments"/>
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>

<daml:Class rdf:ID="LowQualityResult">
  <rdfs:subClassOf rdf:resource="#SubcontractorViolation"/>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#DetectPrerequisiteViolation"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#PenalizeUsingRiskPayments"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#PenalizeForContingency"/>
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>

<daml:Class rdf:ID="SubcontractorDropsTask">
  <rdfs:subClassOf rdf:resource="#SubcontractorViolation"/>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#PenalizeForDecommitment"/>
    </daml:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <daml:Restriction>
      <daml:onProperty rdf:resource="#isHandledBy"/>
      <daml:hasClass rdf:resource="#DetectViaNotification"/>
    </daml:Restriction>
  </rdfs:subClassOf>
</daml:Class>

<daml:Class rdf:ID="SubcontractorChangesCost">
  <daml:subClassOf rdf:resource="#SubcontractorViolation"/>
</daml:Class>

<daml:Class rdf:ID="FindException">
  <rdfs:subClassOf rdf:resource="#ExceptionHandler"/>
  <rdfs:label>find exception</rdfs:label>
</daml:Class>

<daml:Class rdf:ID="FixException">
  <rdfs:subClassOf rdf:resource="#ExceptionHandler"/>
  <rdfs:label>fix exception</rdfs:label>
</daml:Class>

<daml:Class rdf:ID="AnticipateException">
  <rdfs:subClassOf rdf:resource="#FindException"/>
  <rdfs:label>anticipate exception</rdfs:label>
</daml:Class>

<daml:Class rdf:ID="MaintainReputationInformation">
  <rdfs:subClassOf rdf:resource="#AnticipateException"/>
</daml:Class>

<daml:Class rdf:ID="CheckCreditLine">
  <rdfs:subClassOf rdf:resource="#AnticipateException"/>
</daml:Class>

<daml:Class rdf:ID="DetectException">
  <rdfs:subClassOf rdf:resource="#FindException"/>
  <rdfs:label>detect exception</rdfs:label>
</daml:Class>

<daml:Class rdf:ID="DetectPrerequisiteViolation">
  <rdfs:subClassOf rdf:resource="#DetectException"/>
</daml:Class>

<daml:Class rdf:ID="DetectTimeout">
  <rdfs:subClassOf rdf:resource="#DetectException"/>
</daml:Class>

<daml:Class rdf:ID="MonitorUsingSentinels">
  <rdfs:subClassOf rdf:resource="#DetectException"/>
</daml:Class>

<daml:Class rdf:ID="DetectViaNotification">
  <rdfs:subClassOf rdf:resource="#DetectException"/>
</daml:Class>

<daml:Class rdf:ID="ResolveException">
  <rdfs:subClassOf rdf:resource="#FixException"/>
  <rdfs:label>resolve exception</rdfs:label>
</daml:Class>

<daml:Class rdf:ID="NotifyAboutException">
  <rdfs:subClassOf rdf:resource="#ResolveException"/>
</daml:Class>

<daml:Class rdf:ID="NotifyAboutExceptionUsingEmail">
  <rdfs:subClassOf rdf:resource="#NotifyAboutException"/>
</daml:Class>

<daml:Class rdf:ID="NotifyAboutExceptionUsingMail">
  <rdfs:subClassOf rdf:resource="#NotifyAboutException"/>
</daml:Class>

<daml:Class rdf:ID="NotifyAboutExceptionUsingPager">
  <rdfs:subClassOf rdf:resource="#NotifyAboutException"/>
</daml:Class>

<daml:Class rdf:ID="AvoidException">
  <rdfs:subClassOf rdf:resource="#FixException"/>
  <rdfs:label>avoid exception</rdfs:label>
</daml:Class>

<daml:Class rdf:ID="ProvideSafeExchangeProtocols">
  <rdfs:subClassOf rdf:resource="#AvoidException"/>
</daml:Class>

<daml:Class rdf:ID="ProvideEscrowService">
  <rdfs:subClassOf rdf:resource="#ProvideSafeExchangeProtocols"/>
</daml:Class>

<daml:Class rdf:ID="ProvideEscrowServiceWithBuyerCertification">
  <rdfs:subClassOf rdf:resource="#ProvideEscrowService"/>
</daml:Class>

<daml:Class rdf:ID="ProvideEscrowServiceWithThirdParty">
  <rdfs:subClassOf rdf:resource="#ProvideEscrowService"/>
</daml:Class>

<daml:Class rdf:ID="ProvideIncentives">
  <rdfs:subClassOf rdf:resource="#AvoidException"/>
</daml:Class>

<daml:Class rdf:ID="ProvidePenalties">
  <rdfs:subClassOf rdf:resource="#ProvideIncentives"/>
</daml:Class>

<daml:Class rdf:ID="PenalizePoorBehavior">
  <rdfs:subClassOf rdf:resource="#ProvidePenalties"/>
</daml:Class>

<daml:Class rdf:ID="PenalizeForDecommitment">
  <rdfs:subClassOf rdf:resource="#PenalizePoorBehavior"/>
</daml:Class>

<daml:Class rdf:ID="PenalizeForContingency">
  <rdfs:subClassOf rdf:resource="#PenalizePoorBehavior"/>
</daml:Class>

<daml:Class rdf:ID="PenalizeUsingRiskPayments">
  <rdfs:subClassOf rdf:resource="#PenalizePoorBehavior"/>
</daml:Class>

</rdf:RDF>
