The following table shows a (partial) mapping T from ObjectLogic constructs to their RIF/XML representations.The XML entity "rif" refers to the RIF namespace "http://www.w3.org/2007/rif#" and the XML entity and namespace prefix "obld" refer to the namespace "http://www.ontoprise.com/2009/03/rif/obld#".
ObjectLogic |
RIF/XML |
instance:class |
<Member> |
object[] |
<Frame> <object>T(object)</object> </Frame> |
object[property->value] |
<Frame> <object>T(object)</object> <slot ordered="yes"> T(property) T(value) </slot> </Frame> |
object[property] |
<Frame> <object>T(object)</object> <slot ordered="yes"> T(property) <Const type="&rif;iri">&obld;boolean</Const> </slot> </Frame> |
subclass::superclass |
<Subclass> <sub>T(subclass)</sub> <super>T(superclass)</super> </Subclass> |
subclass<<superclass |
<obld:Subproperty> <obld:sub>T(subclass)</obld:sub> <obld:super>T(superclass)</obld:super> </obld:Subproperty> |
class[property{min:max}*=>()] |
<Atom> <op><Const type="&rif;iri">&obld;propertyCardinality</Const></op> <args ordered="yes"> T(class) T(property) T(min) T(max) </args> </Atom> |
class[property*=>range] |
<Atom> <op><Const type="&rif;iri">&obld;propertyRange</Const></op> <args ordered="yes"> T(class) T(property) T(range) </args> </Atom> |
class[property=>range] |
<Atom> <op><Const type="&rif;iri">&obld;nonInheritablePropertyRange</Const></op> <args ordered="yes"> T(class) T(property) T(range) </args> </Atom> |
class[property{inverseOf(inverseProperty)}*=>inverseDomain] |
<Atom> <op><Const type="&rif;iri">&obld;propertyInverseOf</Const></op> <args ordered="yes"> T(class) T(property) T(inverseProperty) T(inverseDomain) </args> </Atom> |
class[property{characteristic}*=>()] |
<obld:PropertyCharacteristic> <obld:object>T(class)</obld:object> <obld:property>T(property)</obld:property> <obld:characteristic><Const type="&rif;iri">obl:reserved:characteristic</Const></obld:characteristic> </obld:PropertyCharacteristic> |
F AND G |
<And> <formula>T(F)</formula> <formula>T(G)</formula> <And> |
F OR G |
<Or> <formula>T(F)</formula> <formula>T(G)</formula> <Or> |
NOT F |
<Naf> <formula>T(F)</formula> <Naf> |
EXIST v1, ..., vN F |
<Exists> <declare>T(v1)</declare> ... <declare>T(vN)</declare> <formula>T(F)</formula> </Exists> |
FORALL v1, ..., vN F |
<Forall> <declare>T(v1)</declare> ... <declare>T(vN)</declare> <formula>T(F)</formula> </Forall> |
F :- G |
<Implies> <if>T(G)</if> <then>T(F)</then> </Implies> |
F <-- G |
<Implies> <if>T(G)</if> <then>T(F)</then> </Implies> |
F --> G |
<Implies> <if>T(F)</if> <then>T(G)</then> </Implies> |
F <--> G |
<obld:Equivalent> <obld:formula1>T(F)</obld:formula1> <obld:formula2>T(G)</obld:formula2> </obld:Equivalent> |
?- F |
<Implies> <if>T(F)</if> <then> <Atom> <op><Const type="&rif;iri">&obld;query/arity</Const></op> <args ordered="yes"> T(id) T(v1) ... T(vN) </args> </Atom> </then> </Implies> where id is the id of "?- F" (or some placeholder constant if the formula has no id), v1,..., vN are the free variables in F and arity is N + 1. Query options are serialized as annotations (not presented here). |
!- F |
<Implies> <if>T(F)</if> <then> <Atom> <op><Const type="&rif;iri">&obld;constraint/arity</Const></op> <args ordered="yes"> T(id) T(v1) ... T(vN) </args> </Atom> </then> </Implies> where id is the id of "!- F" (or some placeholder constant if the formula has no id), v1,..., vN are the free variables in F and arity is N + 1. |
?X |
<Var>X</Var> |
"lexicalValue"^^<datatypeURI> |
<Const type="datatypeURI">lexicalValue</Const> |
[t1, t2, ..., tN] |
<Expr> <op><Const type="&rif;iri">&obld;list/2</Const></op> <args ordered="yes"> T(t1) <Expr> <op><Const type="&rif;iri">&obld;list/2</Const></op> <args ordered="yes"> T(t2) ... <Expr> <op><Const type="&rif;iri">&obld;list/2</Const></op> <args ordered="yes"> T(tN) <Const type="&rif;iri">&obld;list/0</Const> </args> </Expr> ... </args> </Expr> </args> </Expr> |
[t1->v1, t2->v2, ..., tN->vN] |
<Expr> <op><Const type="&rif;iri">&obld;map/1</Const></op> <args ordered="yes"> T([t1,v1_1,...,t1,v1_M1,t2,v2_1,...,t2,v2_M2,...,tN,vN_1,...,vN_MN]) </args> </Expr> where {vi_j | j=1,...,Mi}, i = 1,...,N, is the set of values for key ti |