To translate an RDF graph into Lbase, use the following table, and add the axioms corresponding to the level of entailment strength required. Usually, one would expect to add the RDF axioms whenever the RDF vocabulary is used, the RDFS axioms whenever any RDFS vocabulary is used, and similarly for OWL; and the RDF datatyping axioms should be added whenever a typed literal is used.
RDF expression E | Lbase expression E | add axiom |
"s"^^rdf:XMLLiteral where s is well-formed XML |
the XML canonical form of s | Lbase:XMLThing( E) |
"s"@tag^^rdf:XMLLiteral |
the XML canonical form of
|
Lbase:XMLThing( E) |
a plain literal "s" | 's' with all occurrences of the symbols ',\,(,),<,> prefixed by \ | |
a plain literal "s"@tag | ||
a typed literal a^^d | the term L2V( a,d) |
|
a blank node | a variable (one distinct variable per blank node) | |
any uriref a not in the rdf: , rdfs: or owl: namespaces |
a | |
any uriref of the form rdf:_nnn |
rdf-member(nnn) |
|
rdfs:Resource |
T | |
owl:Thing |
T | |
owl:Nothing |
F | |
owl:sameIndividualAs |
= | |
a owl:differentIndividualFrom b |
not a = b |
|
a owl:sameClassAs b . |
a(?u) iff b(?u)
|
|
a owl:samePropertyAs b . |
a(?u
?v) iff b(?u
?v) |
|
a rdfs:SubClassOf b . |
a(?u) implies b(?u)
|
|
a rdfs:subPropertyOf b . |
a(?u
?v) implies b(?u
?v) |
|
a |
a(?u ?v)
iff a(?v ?u) |
|
a |
|
|
a |
( a(?v
?u) and a(?w ?u)) implies ?v=?w |
|
a |
( a(?u
?v) and a(?v ?w)) implies a(?u
?w) |
|
a |
a(?u ?v)
iff b(?v
?u) |
|
a owl:disjointWith b . |
not ( a(?u) and b(?u) ) |
|
a owl:complementOf b . |
a(?u) iff not b(?u)
|
|
a
|
a rdf:List (L1), etc etc) |
|
a owl:oneOf [[ b1 ... bn ]] |
a(?u) iff ( a=b1 or
... or a=bn) |
|
a owl:unionOf [[ b1 ... bn ]] |
a(?u) iff ( b1(?u) or
... or bn(?u) ) |
|
a owl:intersectionOf [[ b1 ... bn ]] |
( a(?u) iff ( b1(?u)
and ... and bn(?u) ) |
|
a owl:onProperty b .a owl:someValuesFrom c . |
a (and also b = |
|
a owl:onProperty b .a owl:allValuesFrom c . |
a(?u) iff (forall (?v)( b(?u
?v) implies c(?v) ) |
|
a owl:onProperty b .a owl:hasValue c . |
a(?u) iff b(?u
c) |
|
a owl:onProperty b .a owl:minCardinality n . |
a(?u) iff b(?u
?x1) and ...and b(?u ?xn) ) |
|
a owl:onProperty b .a owl:maxCardinality n . |
a(?u) iff b(?u
?x1) and ...and b(?u ?xn+1) )) |
|
a owl:onProperty b .a owl:Cardinality n . |
a |
|
any other uriref a | a | |
any other triple of the form a |
b( a) |
rdfs:Class( b) |
any other triple a b c . |
b( a,c) |
rdf:Property( b) |
The Lbase translations of the cardinality constraints are awkward and long-winded. They embody the standard translation of the 'numerical quantifiers' into conventional logical notation. Expressed directly using numerical quantifiers, the translations would be:
a owl:onProperty b .a owl:minCardinality n . |
a(?u) iff (exists- [n] (?x) b(?u
?x) ) |
a owl:onProperty b .a owl:maxCardinality n . |
a(?u) iff (not (exists- [n+1] (?x) b(?u
?x) ) ) |
a owl:onProperty b .a owl:Cardinality n . |
a(?u) iff (exists-[ n] (?x) b(?u
?x) ) and
not (exists- [n+1] (?x) b(?u ?x) ) ) |
Note, all these translations assume that the expression used in the owl:cardinality triples is a simple numeral, or an expression (such as a datatyped literal) which can be evaluated to yierld a numeral at the time of translation. No logical translation is posible for OWL text containing more general arithmetic expressions, such as sums or products, or terms whose numerical value requires inference such as solving equations.