DanQingShanShui (483K)

Mapping Ontologies to Java

mapping (30K) With the emerge of the semantic web, ontology becomes a more and more important way to represent formal knowledge that machines can use. Although there are many different ontology languages, they are, mostly, knowledge representation languages instead of executable languages. It may be quite valuable if we can directly represent ontologies using existing executable programming languges, such as Java. With such a type of encoding of knowledge specifications, it is easier for programmers to write executable codes that can manipulate the stored ontological information since there is no further needs of parsing and reading ontologies when everything has been already represented in Java classes.

This was a project that I had worked. There are also some other research projects in which I have involved or am involving.
Project Description


OSM-L is an ontology language that represents OSM (Object-oriented Systems Model) application models. It is the preceding version of OSMX, which is current XML version OSM language used for information extraction ontologies. OSM-L ontologies are knowledge specifications written in OSM-L. They provide the database schema, relationship sets and a knowledge base to the extractor, which extracts data instances according to the knowledge specifications in OSM-L ontologies. The extractor is implemented in Java. It takes an ontology as its input and parse it into an internal structure so that they are processable to extract data. This project is to convert the OSM-L declarations direct to Java classes. Therefore, they are more compatible to the extractor and no further parsing of ontologies is needed.

We developed a standard interpreter to translate OSM-L to Java. To do so, we first create a complete grammer figure of OSM-L and do translation on them one-by-one. The right figure shows the rule of complilation unit, which is the entry rule for the interpreter. The complete figure of all grammer rules can be found in here.

Following the grammer rule, we build a parse tree for each input OSM-L ontology. We also design a symbol table structure to hold all of the objects in the ontology and do a type checking. This is especially important for data frames because we need to generate Java procedures that can directly perform extracting rules defined in OSM-L data frames. All the internal and external representation types must match their original declarations and constraints. Finally, we process a code-generation method to build Java source codes that can be complied by Java complier correctly.
complilationunit (3K)

[1] and [2] are two deliverable material for readers' interest.

References:

[1] Yihong Ding and Cui Tao. OSM-L Grammer Handled In Project. [.pdf]

[2] Cui Tao and Yihong Ding. From OSM-L to JAVA. (a presentation) [.ppt]

Collaborators


This was a project that Cui Tao and I worked together under directing by Dr. Aurel Cornell.

Aurel Cornell (Computer Science, BYU)
Cui Tao (Graudate Student, BYU)


Other Research Topics



For interested readers who would like to explore more on this topic with me, send me email at ding@cs.byu.edu. Also, there are some other research projects in which I have involved or am involving.
Last updated: Sep 21st, 2005