Journal mdupont's Journal: GCC Ontology
Basically this is a high level class model for the GCC internal tree structures as used by the c and (not complete C++) compiler.
The file are based on the OWL[1] vocabulary, which is an RDF[2] application that allows the syntax to be described in RDF/XML[3], n3[4] or ntriples[5] format.
""""The Web Ontology Language OWL is a semantic markup language for publishing and sharing ontologies on the World Wide Web. OWL is developed as a vocabulary extension of RDF (the Resource Description Framework) and is derived from the DAML+OIL Web Ontology Language. """"
This file is describing the data extracted by the introspector [0] from the gcc. The format of the file is closly related to the -fdump-translation-units format, but more usable. I patched the gcc using the Redland RDF Application framework [8] to serialize these tree dump statements into RDF statements using the berkley db backend for fast storage.
The DB is then available for querying using C/C++, JAVA, PERL, Python, and many other interfaces via the Redland Swig interface. Even more you can filter out interesting statements into RDF/XML format for interchanging with other tools.
You can find an example file extracted from the source code of internals of the pnet runtime engine here [9].
The ontology file is basically a powerful class model, you can use many tools to edit and view them, (which i have not tried most of them) TWO of them are the rdfviz tool and owl validator[10]
I used the Closed World Machine [6] from Tim Berners-Lee to process and check this file, that tool along with the EulerSharp[7] that I am working on will allow you to run queries, filters and proof over the data extracted from the gcc.
Futher still, my intent is to embedded a small version of the Euler machine into the gcc and dotgnu/pnet to allow proofs to be made at compile time.
mike
[0] Introspector - introspector.sf.net
[1] OWL - http://www.w3.org/TR/owl-ref/
[2] RDF - http://www.w3.org/RDF/
[3] RDF/XML http://www.w3.org/TR/rdf-syntax-grammar/
[4] n3 http://www.w3.org/2000/10/swap/Primer
[5] ntriples http://www.w3.org/2001/sw/RDFCore/ntriples/
[6] CWM from timbl http://www.w3.org/2000/10/swap/doc/cwm.html
[7] Eulersharp http://eulersharp.sourceforge.net/2003/03swap/
[8] Redland http://www.redland.opensource.ac.uk/
[9] Example n3 file http://demo.dotgnu.org/~mdupont/introspector/cwm.rdf.gz
[10] RDFVIZ and validator http://www.ilrt.bristol.ac.uk/discovery/rdf-dev/rudolf/rdfviz/
http://owl.bbn.com/cgi-bin/vowlidator.pl
GCC Ontology More Login
GCC Ontology
Slashdot Top Deals