I came across this paper by chance while searching for material on Z notation and RDF. It's an interesting read on the use of RDF for expressing languages used for formal methods.
While reading it, something occured to me (I'm sure it's not an original idea, but I haven't seen any implementations): It would be great to generate an RDF representation of source code. I'm tempted to spend some time considering if there's an easy way of bolting RDF generation support on to my parser assembler.
It would enable a rapidly growing number of tools that understand RDF to manipulate the code, and would be an interesting way of achieving some of the same as GCC-XML.
With RDF mappings for UML and Z or similar formal languages, I'm sure someone could come up with interesting data mining tools based on combining various data (specifications, models, source) and cross referencing extracted data...
Listed below are links to weblogs that reference Semantic Web for Extending and Linking Formalisms:
» RDF representation from Between the Devil and the Deep Blue Sea
I had been thinking a while back on the uses of generating RDF from java source or runtime classes, and seeing whether it might be useful it developing tools for their analysis or manipulation. Just been pointed to this post by my co-phder Rich. Could be [Read More]
I think someone's done some work on it... I'll forward this post to my mate Tim, who may have some refs.
Hi there, Rich (see comment above) contacted me and told me about your post. Sounds very interesting, I'd love to discuss it more with you. I've also perused this idea, and started building an RDF generator that works on Java runtime classes, and also fiddled with doing one from source using a JDK1.5 parser. Hope to be in touch!
I'd be very interested in discussing the idea further. I'm actually mostly thinking about adding RDF output support to my parser assembler (see lots of other posts...) in some form, but of course the source of the RDF doesn't really matter, what is important is what can be done with it.
I see three immediate areas that are of interest to me:
- Combining RDF from source code (or bytecode) analysis with RDF representations of UML, Z notation etc. in some way to give you richer visualisation of relationships in the code. I don't have a clear idea of how or what you'd get out of it - that's what makes it interesting ;)
- Using RDF representations of the source code to manipulate it - for instance as a tool for instrumenting the code before generating object code
- Using RDF representations as a basis for building code analysis tools.
Btw. I'm in London - it seems from the e-mail address you left you're not too far away, so perhaps it'd be interesting to get together and kick some ideas around some time.
Feel free to e-mail me on [email protected]
This is one of the things I pointed Tim to a while ago.
Might be of interest to get some source material out of Java classes.
Well, that didn't come out! Stick these back together: