- From: Drew McDermott <drew.mcdermott@yale.edu>
- Date: Mon, 3 Nov 2003 16:47:50 -0500 (EST)
- To: fellah@pcigeomatics.com, www-rdf-logic@w3.org
[Stephane Fellah] I am working on the design of a OWL ontology for operations and functions (some are spatial and temporal) that can be used by a Rule language (for example current draft OWL Rules). Prior developing the ontology, I am trying to produce some examples in RDF-XML syntax to express these operations/functions. CWM has already some build-in operators. I can distinguish 3 cases for the moment: .... The basic idea behind OWL Rules and other encodings of logic in RDF (although CWM doesn't use this trick) is to make an atomic formula be an object of discussion instead of a triple. Disjunctions, variable bindings, etc., are then RDF trees whose leaves are atomic formulas. So I would represent absolute value thus: <Absolute_value> <operand rdf:datatype="http://www.w3.org/2001/XMLSchema#int">-1</operand> <result rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</result> </Absolute_value> Then one can translate the formula (forall (x x1) (if (and (< x 0) (unaryMinus x x1)) (absolute_value x x1))) into (where "drs:" is the namespace prefix for http://cs-www.cs.yale.edu/homes/dvm/daml/drsonto.owl#) <drs:Forall> <drs:bound_vars> <drs:Var_bag rdf:parseType="collection"> <drs:Var rdf:ID="v199" drs:name="x"/> <drs:Var rdf:ID="v203" drs:name="x1"/> </drs:Var_bag> </drs:bound_vars> <drs:Implies> <drs:antecedent> <drs:And> <drs:conn_args rdf:parseType="collection"> <math:Less> <math:left_arg rdf:resource="#v199"/> <math:right_arg rdf:datatype="http://www.w3.org/2001/XMLSchema#int"> 0 </math:right_arg> </math:Less> <math:Unary_minus> <math:operand rdf:resource="#v199"/> <math:result rdf:resource="#v203"/> </math:Unary_minus> </drs:conn_args> </drs:And> </drs:antecedent> <drs:consequent> <math:Absolute_value> <math:operand rdf:resource="#v199"/> <math:result rdf:resource="#v203"/> </math:Absolute_value> </drs:consequent> </drs:Implies> </drs:Forall> If you love RDF syntax, you gotta love this. -- -- Drew McDermott Yale Computer Science Department
Received on Monday, 3 November 2003 16:47:53 UTC