I want to translate and query the anonymous super classes of ontology into datalog rules. For instance I have an axiom like "Chair subclassOf (headOf some Department)
" and I have translated this axiom like this
Chair(x) <- headOf(x,y)
Deaprtment(y) <- headOf(x,y)
Because I do not want conjunction in a head like this: headOf(x,y), Department(y) <- Chair(x)
or existential variables in the headof the rules. so I break and translate it like above.
My question is, Is there any better way to handle the existential restriction in datalog rules without having existential variables in head of rule? For reference this example is from LUBM Ontology.
Basically I wanted to read this query in prolog. The benchmark data do not produce any instances of class Chair. Instead, each Department individual is linked to the chair professor of that department by property headOf. Hence this query requires realization, i.e., inference that that professor is an instance of class Chair because he or she is the head of a department.
SELECT ?X, ?Y WHERE {?X rdf:type ub:Chair . ?Y rdf:type ub:Department . ?X ub:worksFor ?Y . ?Y ub:subOrganizationOf <http://www.University0.edu> }
I do not understand how to handle the existnetial in rules so it give me the instances of chair.
Thankyou.