W3C home > Mailing lists > Public > public-sws-ig@w3.org > November 2003

Re: Attempt to use Owl rule language to express preconditions in Congo

From: Drew McDermott <drew.mcdermott@yale.edu>
Date: Tue, 11 Nov 2003 16:16:18 -0500 (EST)
Message-Id: <200311112116.hABLGIu20564@pantheon-po04.its.yale.edu>
To: public-sws-ig@frink.w3.org


   [Monika Solanki]
   Would <drs:And> be the top-level element?

   I guess this says that the atoms are to be treated in conjunction, do we 
   have something on top of all this that classifies it as a formula?

Yes, the DRS ontology, which states that Ands are a subclass of
Connective_formulas, which are a subclass of Formulas.

I append the latest, OWL-compatible, version of the ontology because
it really isn't that long.  I haven't validated this, and it might
have a couple of bugs, because I haven't fully grokked how
"parseType=Collection" works in OWL.

I really should send out an updated version of the DRS overview to
include Burstein-style atomic formulas plus influences from OWL Rules.

                                             -- Drew
 
<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     ="http://www.w3.org/2002/07/owl#"
  xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#"
  xmlns:drs ="http://www.cs.yale.edu/~dvm/daml/drsonto.owl#"
>

<Ontology rdf:about="">
   <rdfs:comment>
      This ontology describes formulas in logical languages.
   </rdfs:comment>
</Ontology>

<Class rdf:ID="Type"/>

<Class rdf:ID="Function"/>

<Class rdf:ID="Prop">
   <rdfs:comment>
      The class of Propositions
   </rdfs:comment>
</Class>

<ObjectProperty rdf:ID="FunctionDomain">
   <rdfs:domain resource="#Function"/>
   <rdfs:range resource="http://www.w3.org/2002/07/owl#Thing"/>
</ObjectProperty>

<ObjectProperty rdf:ID="FunctionRange">
   <rdfs:domain resource="#Function"/>
   <rdfs:range resource="http://www.w3.org/2002/07/owl#Thing"/>
</ObjectProperty>

<Class rdf:ID="Predicate">
   <rdfs:subClassOf rdf:resource="#Function"/>
   <rdfs:subClassOf>
      <Restriction>
         <onProperty resource="#FunctionRange"/>
         <toClass resource="#Prop"/>
      </Restriction>
   </rdfs:subClassOf>
</Class>

<Class rdf:ID="Term"/>

<!-- Every resource can be a term, but we don't try to say that;
     it sounds too dangerous, since everything is a resource.
  -->

<Class rdf:ID="Var">
   <rdfs:subClassOf rdf:resource="#Term"/>
</Class>

<Class rdf:ID="Literal">
   <rdfs:subClassOf rdf:resource="#Term"/>
</Class>

<ObjectProperty rdf:ID="declare">
   <rdfs:domain resource="#Type"/>
</ObjectProperty>

<Class rdf:ID="Formula">
   <rdfs:subClassOf rdf:resource="#Term"/>
   <rdfs:subClassOf>
      <Restriction>
         <onProperty rdf:resource="#declare"/>
         <allValuesFrom rdf:resource="#Prop"/>
      </Restriction>
   </rdfs:subClassOf>
</Class>

<Class rdf:ID="Functional_term">
   <rdfs:subClassOf rdf:resource="#Term"/>
</Class>

<ObjectProperty rdf:ID="term_function">
   <rdfs:domain rdf:resource="#Functional_term"/>
   <rdfs:range rdf:resource="#Function"/>
</ObjectProperty>

<rdfs:Class rdf:ID="Term_seq">
 <rdfs:subClassOf rdf:resource="&rdf;List"/>
 <rdfs:subClassOf>
   <owl:Restriction>
     <owl:onProperty rdf:resource="&rdf;first"/>
     <owl:allValuesFrom rdf:resource="#Term"/>
   </owl:Restriction>
 </rdfs:subClassOf>
 <rdfs:subClassOf>
   <owl:Restriction>
     <owl:onProperty rdf:resource="&rdf;rest"/>
     <owl:allValuesFrom rdf:resource="#Term_Seq"/>
   </owl:Restriction>
 </rdfs:subClassOf>
</rdfs:Class>

 <rdfs:Class rdf:ID="Var_seq">
  <rdfs:subClassOf rdf:resource="&rdf;Term_seq"/>
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&rdf;first"/>
      <owl:allValuesFrom rdf:resource="#Var"/>
    </owl:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&rdf;rest"/>
      <owl:allValuesFrom rdf:resource="#Var_seq"/>
    </owl:Restriction>
  </rdfs:subClassOf>
 </rdfs:Class>

<ObjectProperty rdf:ID="term_args">
   <rdfs:domain rdf:resource="#Functional_term"/>
   <rdfs:range rdf:resource="#Term_seq"/>
</ObjectProperty>

<Class rdf:ID="Binder">
   <rdfs:subClassOf rdf:resource="#Formula"/>
</Class>

<Class rdf:ID="Atomic_formula">
   <intersectionOf rdf:parseType="daml:collection">
      <Class rdf:about="#Formula"/>
      <Class rdf:about="#Functional_term"/>
      <Restriction>
         <onProperty rdf:resource="#term_function"/>
         <toClass rdf:resource="#Predicate"/>
      </Restriction>
      <Restriction>
         <onProperty rdf:resource="pred"/>
         <toClass rdf:resource="#Predicate"/>
      </Restriction>
   </intersectionOf>
</Class>

<!-- There are two ways to describe any atomic formula, as a
     functional term or as a triple.
     We'd like to say that the args = cons(subj, obj), but that's
     presumably hopeless -->

<ObjectProperty rdf:about="rdf:predicate">
   <rdfs:domain rdf:resource="#Atomic_formula"/>
   <rdfs:range rdf:resource="#Predicate"/>
</ObjectProperty>

<ObjectProperty rdf:about="rdf:subject">
   <rdfs:domain rdf:resource="#Atomic_formula"/>
</ObjectProperty>

<ObjectProperty rdf:about="rdf:object">
   <rdfs:domain rdf:resource="#Atomic_formula"/>
   <rdfs:range rdf:resource="#Term_seq"/>
</ObjectProperty>

<Class rdf:ID="Function_skeleton">
   <rdfs:subClassOf rdf:resource="#Functional_term"/>
   <rdfs:subClassOf>
      <Restriction>
          <onProperty rdf:resource="#term_args"/>
	  <allValuesFrom rdf:resource="#Var_seq"/>
      </Restriction>
   </rdfs:subClassOf>
</Class>

<Class rdf:ID="Predicate_skeleton">
   <intersectionOf rdf:parseType="daml:collection">
      <Class rdf:about="#Atomic_formula"/>
      <Class rdf:about="#Function_skeleton"/>
   </intersectionOf>
</Class>

<Class rdf:ID="Connective_formula">
   <rdfs:subClassOf rdf:resource="#Formula"/>
</Class>

<ObjectProperty rdf:ID="conn_args">
   <rdfs:domain rdf:resource="#Connective_formula"/>
   <rdfs:range rdf:resource="#Term_seq"/>
</ObjectProperty>

<Class rdf:ID="And">
   <rdfs:subClassOf rdf:resource="#Connective_formula"/>
</Class>

<Class rdf:ID="Or">
   <rdfs:subClassOf rdf:resource="#Connective_formula"/>
</Class>

<Class rdf:ID="Not">
   <rdfs:subClassOf rdf:resource="#Connective_formula"/>
</Class>

<ObjectProperty rdf:ID="negated">
   <rdfs:domain rdf:resource="#Not"/>
   <rdfs:range rdf:resource="#Formula"/>
</ObjectProperty>

<Class rdf:ID="Implies">
   <rdfs:subClassOf rdf:resource="#Connective_formula"/>
</Class>

<!-- The following are labels for the two conn_args of Implies -->

<ObjectProperty rdf:ID="antecedent">
   <rdfs:domain rdf:resource="#Implies"/>
   <rdfs:range rdf:resource="#Formula"/>
</ObjectProperty>

<ObjectProperty rdf:ID="consequent">
   <rdfs:domain rdf:resource="#Implies"/>
   <rdfs:range rdf:resource="#Formula"/>
</ObjectProperty>

<ObjectProperty rdf:ID="declaration">
   <rdfs:domain rdf:resource="#Function"/>
   <rdfs:range rdf:resource="#Function_skeleton"/>
</ObjectProperty>

<DatatypeProperty rdf:ID="value">
   <rdfs:domain rdf:resource="#Literal"/>
   <!-- range can be any XSD datatype -->
</DatatypeProperty>
<!-- type restriction: If a term is a Literal and is declared of type
     Y, then the 'value' should be a literal of type Y.
     Can this be expressed in OWL? -->

<!-- There's nothing to say about Null -->
<rdf:Description rdf:about="http://www.cs.yale.edu/~dvm/daml/drsonto.daml#Null"/>

<ObjectProperty ID="type">
  <rdfs:comment>Identifies the Class of a resource</rdfs:comment>
</ObjectProperty>

<Class rdf:ID="Constant">
   <rdfs:domain rdf:resource="#Term"/>
</Class>

<Class rdf:ID="Constant_bag">
   <rdfs:subClassOf
        rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/>
   <rdfs:subClassOf>
      <Restriction>
         <onProperty
             rdf:resource="http://www.w3.org/2002/07/owl#item"/>
         <toClass rdf:resource="#Constant"/>
      </Restriction>
   </rdfs:subClassOf>
</Class>

<Class rdf:ID="Var_bag">
   <rdfs:comment>
      Bag of Vars
   </rdfs:comment>
   <rdfs:subClassOf
        rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/>
   <rdfs:subClassOf>
       <Restriction>
          <onProperty
              rdf:resource="http://www.w3.org/2002/07/owl#item"/>
          <toClass rdf:resource="#Var"/>
       </Restriction>
    </rdfs:subClassOf>
</Class>

<Class rdf:ID="Atomic_formula_bag">
   <rdfs:comment>
      The list of Atomic formula
   </rdfs:comment>
   <rdfs:subClassOf
        rdf:resource="#Term_Bag"/>
   <rdfs:subClassOf>
      <Restriction>
         <onProperty
             rdf:resource="http://www.w3.org/2002/07/owl#item"/>
         <toClass rdf:resource="#Atomic_formula"/>
      </Restriction>
   </rdfs:subClassOf>
</Class>

<Class rdf:ID="Term_bag">
   <rdfs:subClassOf
        rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/>
   <rdfs:subClassOf>
      <Restriction>
         <onProperty
             rdf:resource="http://www.w3.org/2002/07/owl#item"/>
         <toClass rdf:resource="#Term"/>
      </Restriction>
   </rdfs:subClassOf>
</Class>


<Class rdf:ID="Forall">
   <rdfs:subClassOf rdf:resource="#Binder"/>
</Class>

<Class rdf:ID="Exists">
   <rdfs:subClassOf rdf:resource="#Binder"/>
</Class>

<ObjectProperty rdf:ID="bound_vars">
   <rdfs:domain rdf:resource="#Binder"/>
   <rdfs:range rdf:resource="#Var_bag"/>
</ObjectProperty>

<ObjectProperty rdf:ID="body">
   <rdfs:domain rdf:resource="#Binder"/>
   <rdfs:range rdf:resource="#Formula"/>
</ObjectProperty>

</rdf:RDF>

-- 
                                   -- Drew McDermott
                                      Yale Computer Science Department
Received on Tuesday, 11 November 2003 16:16:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 16 March 2008 00:10:53 GMT