Lightweight Semantic Web Motivated Reasoning in Prolog Salman Elahi, s0459408@sms.ed.ac.uk Supervisor: Dr. Dave Robertson Introduction: As the Semantic Web is, currently, in its developmental phase, different approaches are being sought to come up with the solutions for different problems; RDF's simple model is not capable enough of expressing logically complex information such as negation and conditional facts. However, this weakness of RDF could be compromised as we have more expressive languages to put layers on top of RDF i.e. RDF Schema and other ontology languages such as DAML+OIL, OWL etc. RDF S has some missing features [1] that are commonly found in the systems developed by the AI community (i.e. description logics, frame based systems). On the other hand it has some features (i.e. reification) which make it hard for RDF S to provide support for fully automated and efficient inference engines. Fig.1 depicts the hierarchical layers of the Semantic Web. Layers above the RDF Schema are still being researched and going through developmental phases with the aim of providing such mechanisms which could be used for not only making efficient inferences for advanced querying but also to detect any contradictions and erroneous concepts in the underlying ontology language. Ontology languages mentioned above are the result of these research activities. Fig.1 The Layers of the Semantic Web School of Informatics, University of Edinburgh 1
Purpose: Ontologies are the backbone of the Semantic Web playing a key role in laying down a solid infrastructure for further developmental phases. These efforts have resulted in numerous languages for describing ontologies, knowledge bases, and reasoning services. Reasoning is one of the most powerful and ubiquitous features of the Semantic Web applications. So, to put the Semantic Web to real work we need to have efficient inference mechanisms; for this purpose automated reasoners are being built. The core responsibilities of an inference engine or reasoner are to adhere to the the semantics in processing the information encoded in that particular language for which it has been developed. Identifying any inconsistencies and and come up with new information from the known information[4]. The need for such reasoners and the computational power which could be achieved through such reasoner could be demonstrated by a simple example: Steve is looking for some sports car show room who only deals in Ferrari. He uses his PDA to search for such a show room whose business property is sports cars with the value Ferrari. Best cars Inc. advertises themselves as sports cars dealers. These cannot be matched as keywords or even thesaurus, since Ferrari and sports cars are not the same in all contexts. But with the help of Ontology definition, if one defined for Best cars, it is a lot easier to search. Where the only subclass to sports cars is Ferrari; Ferrari rdf:subclassof Sports Car. With the help of an inference engine it would have been quite easy for Steve to locate Best cars Inc. The aim of this project is to use the logic programming language Prolog to reconstruct ( or where appropriate define ) a collection of standard automated reasoners motivated by the languages of the Semantic Web. We aim to define versions of inference methods that are simple and compact, while preserving the essence of the Semantic Web originals the value simply being to provide exemplars of the basic methods. School of Informatics, University of Edinburgh 2
Background: Automated reasoners are, now a days, being built to utilise these ontology languages to make real use of the power of the Semantic Web. Already several efforts have been put in this area with different approaches, which will be discussed here briefly: DL ( Description Logic ) reasoners: DL reasoners are the very first attempts in this field; Pellet, FACT, FACT++, RACER, and Cerebra are the most famous DL reasoners [2]. Pellet is an open source Java based DL reasoner. It can be used to check the consistency of ontologies, to classify the taxonomies, check entailments and answer a subset of RDQL queries (known as ABox queries in DL terminology). It is based on the Tableaux algorithms developed for expressive Description Logics. FACT ++ is an enhancement of FACT and is being built to tackle more complex DLs (like SHIQ and OWL DL) with good performance, improved extensibility and internal data structures that are better able to handle very large knowledge bases. It is being built as part of the EU WonderWeb Project. It has the same tableaux algorithms as of the the FACT but here, they use C++ instead of LISP. RDF Reasoners: Euler, RDF Inference Language, Jena, CWM, Sesame, Metalog are the the prominent efforts in terms of RDF reasoners [3]. Euler: Euler is a backward chaining reasoner; it has been built by the RDFcore working group. It is one of the very early inference tools for RDF, and is kept updated to test the proposed semantics as the research goes on. Metalog: It is SW3C project, they have come up with the idea of reasoning on the web with the aim of making it accessible for the widest possible range of users by providing a Pseudo Natural Language (PNL) interface to the users ( for querying )which is fairly easy for the users to interact with. Even for those who do not have much expertise in the field. It is a backward chaining reasoner and provides PNL expressions to Prolog like rule language over RDF to make inference to satisfy the user'squeries. School of Informatics, University of Edinburgh 3
OWL Reasoner: Although FACT, RACER, and Pellet also support OWL but none of them cover all the three increasingly complex sub languages i.e. OWL DL, OWL Lite, and OWL Full whereas F OWL does most of the times. A brief description of F OWL is [4] : F OWL: It has been built using F logic (Object Oriented Logic Programming) and XSB, it uses frame based system to reason with OWL ontologies. It can check the consistency of ontologies and can extract hidden knowledge through resolution by using rules written in flora 2 language. Methodology: So, far we have seen that reasoners are being built in Description logic based languages but we propose to reconstruct (or where appropriate define) these reasoners by using logic programming language Prolog which will make this mechanism lightweight. By lightweight we mean to provide almost the same type of functionality requiring less effort at the developer end. As the languages already being used are fragments of Full FOL (First Order Logic) which have some significant drawbacks that make it difficult to combine rules with the KR. It is also not very expressive in some cases or rather very difficult to express logically complex statements even at the very basic research level several aspects are not understood how to provide nonmonotonicity and procedural attachments. And most importantly a large number of software developers have conceptual barrier due to these levels of expressive difficulties whereas fairly large amount of them are pro efficient in logic based programming languages such as Prolog [5]. So, we will translate from the chosen Semantic Web language and then perform reasoning in with the predicate logic. This also gives us benefit of Bi directional translational ( Fig.2 )from ontology languages to rules and from rules to ontologies. Which could enable us not only to build rules on top of ontologies but also to build ontologies on top of rules. But this bi directional translation would not be possible in every scenario. It depends upon the complexity of the task on hand. It has been School of Informatics, University of Edinburgh 4
Fig.2 Bi directional Translational mechanism mentioned as an potential research issue. However, in our project we are mainly concerned with translating ontology languages into predicate logic and reasoning on them, we will address the Bi directional issue only if time allows. Targeted Inference Mechanisms: We will choose some exemplar scenarios from the inference mechanisms discussed above, we have identified some of them which are list below: A subsumption reasoner such as those based on Description Logics applied to OWL A semantic net reasoner applied to RDF An OWL reasoner Stages of the Project: Choice of target Inference mechanisms ( defaults given above but others are possible ). Definition of mappings between ( subsets of ) the corresponding Semantic Web oriented languages and predicate logic. Construction of appropriate lightweight inference mechanisms in Prolog. Development of exemplar scenarios that demonstrate the abilities and limitations of each method. School of Informatics, University of Edinburgh 5
Evaluation: The evaluation metric for our methodology and resulting piece of software could be the comparison of our results with the results of those exemplar scenarios which have been mentioned above. Performance could be measured according to the percentage of best results, complexity level dealt with and the efforts required to get that sorted out etc. Output: The output would be in the form a software library which could be called through a command line interpreter. A GUI could be built to make it more user friendly but we will go for this option only if time allows. Work plan: I have divided the project work into four smaller work packages according to the time available ( from 20 th May to 31 st Aug, 2005 ), which are listed below: Background knowledge gathering and clearing the fog Implementation Evaluation Thesis write up Figure 3 illustrates the time allocated to each work package; some of them will be carried out concurrently with others. School of Informatics, University of Edinburgh 6
Fig.3 Workplan for Proposed Project References: [1] Sandro Hawke, Semantic Web Languages: Fundamentals and Combinations, W3C MIT/LCS 200 Technology Square, Cambridge, MA 02139, USA [2] D. Tsarkov and I. Horrocks. DL reasoner vs. first order prover. In Proc. of the 2003 Description Logic Workshop (DL 2003), volume 81 of CEUR (http://ceur ws.org/), pages 152 159, 2003. [3] G. Klyne, Nine by Nine, Using datatype aware inferences with RDF, http://www.ninebynine.org/rdfnotes/rdf Datatype inference.html [4] Youyong Zou, Harry Chan, and Tim Finin. F owl: an inference engine for semantic web. In Third NASA Goddard/IEEE Workshop on Formal Approaches to Agent Based Systems (FAABS III), 26 28 April 2004, Greenbelt MD. [5] Grosof, B.N. and Horrocks, I., Description Logic Programs: Combining Logic Programs with Description Logic. Working paper, version of Oct. 17, 2002. http://www.mit.edu/~bgrosof School of Informatics, University of Edinburgh 7