OWL2Gra takes profit of the knowledge described by the ontology and automatically generates a grammar for a DSL that allows to discourse about the domain described by that ontology.
The OWL2Gra project is composed of three engines. The main one is OWL2DSL, the component that converts an OWL ontology into an attribute grammar. The two additional modules are Onto2OWL and Ddesc2OWL. The former, Onto2OWL, converts ontologies written in OntoDL (a lightweight DSL to describe ontologies) into standard OWL XML that can be loaded into the well known Protégé system to future editing; the later, Ddesc2OWL, converts domain instances written in the DSL generated by OWL2DSL into the initial OWL ontology.
The figure bellow represents all the processes and modules that are presented in this project showing how an abstract ontology( described in a simple ontology specification language) is transformed into an OWL XML ontology that is then transformed into an AntLR attribute grammar.
Module Onto2OWL is the first layer of this project. Onto2OWL creates a specification file in the standard notation for ontologies specification, OWL-XML, from an ontology specification written in OntoDL, a Domain Specific Language to describe in a simple, easy to use, way the ontologies. This module is composed by two important parts. The first is a parser for the input file written in a DSL that we have specially designed, called OntoDL. The second part is a java class that manipulates the information gathered by the parser and generates the OWL-XML standard file.
The OntoDL file describe the basic information about an ontology: Concepts, Hierarchies, Relations and Links. So, you will find something like this:
This module was created with the objective of generating OWL files from simple ontological descriptions of the domain. It can be used separately from the other components see the API.
With OWL2DSL it is possible to generate a grammar specification and a parser for a DSL to describe elements for the domain.
The main objective of this module was to generate a grammar that represents a certain domain specified by an Ontology written in any OWL standard. This grammar has a set of rules that are responsible for the generation:
DDesc2OWL is the last module of the OWL2Gra. The purpose of this module is to populate the initial ontology that was used to generate the grammar.
This Module is very simple; it receives three parameters, that are files, and processes them in different moments.
This video shows the full process of this project.
Click on the image to enlarge.
This program can also be used by third part using the command line interface( instead of the graphical one shown in Examples described above).