|KDM Model Creation from C++ code? [message #990924]
||Fri, 14 December 2012 22:27
| Bill White
Registered: September 2012
I'm trying to understand a big C++ program. I'm wondering if I can build a tool which parses the C++ and generates an ecore model. I'm pretty sure I can parse the C++, using either clang or a commercial C++ parser I have available. But I'm not sure what the format the model should take.|
I could generate an ecore model directly, using what seems to be the ecore schema. It's not clear to me if there is a specification for the serialized from of ecore models, and this seems somewhat dubious. I know that Modisco has no C++ discoverer, but it has a KDM discoverer, and that KDM is some very abstract knowledge representation scheme. So maybe it would be possible to traverse the C++ code and write a KDM model, and then extract that with Modisco. But I'm not sure what the steps to create this would be. Clang makes is pretty easy to parse and process the C++, and that seems like it would be the easy part.
I don't need to generate C++ or Java code, or translate it. I just want to
be able to understand the C++ code.
So, I guess my questions are:
- Is there documentation for the serialized format of an ecore model? Could I just write an XML file with the model? If I did that, would I need Modisco at all?
- Does it make sense to write a KDM model, then use Modisco's KDM discoverer to extract the ecore model. Is there something which will do this?
- Does it make even more sense to create a simple XSD schema for my simple-minded C++ model, and dump the C++ data model to my XML schema, then use the EMF schema reading tools somehow (unknown to me) to turn this into an ecore model. I'd have to specify the translation from my XSD schema to ecore, but presumably this is well understood.
Thanks. Hope this is not too confusing.
Powered by FUDForum
. Page generated in 0.01822 seconds