[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.technology.ldt] Re: Beyond textual represenations...

I put my replies below. Note: I have not digged in internals of CDT. So my guesses are just guesses.

Ted Carroll wrote:
I agree that a typical AST parsed from source would underutilize the capabilities of EMF.

I think that most underutilzed facility would be noncomposite and bidirectional relationships. "T" in "AST" stands for "Tree" after all.


From my use of EMF I see the major benefits as being:

1) Model Specification
This is a great feature when modelling tool is used. It is much easier to understand and fix model in rational rose or other modelling tool where structure of model is obvious.

2) Persistence/Interchange
Really great help during debugging, abitlity to dump program state to xml and analyze it later is just too useful.

Also results of parsing might be cached on disk for very big sources and complex grammars.

3) Notification
If AST is in EMF, the events might be used to maintain the mapping between AST and semantic model of the project.

For example CDT might build internal compiler independent semantic model that references source code. If semantic model changes, source should notice it. If source changes, semantic model needs to notice this. Also it would simplify auxilary views like outlines, project browsers etc.

So notifications would help implement incremental checking of source code without recompilation. And this might allow more granular recompilation and rechecking with less problmes.

4) Undo/Redo
I think it will be underused. The text editors will likely rely on own text undo/redo and semantic model will track changes in text editors rather than use native redo/undo mechanisms.

5) Rich Metadata API
This might be useful for configuration generic algorithms (for example scope rule checking) and creation of auxilary models that complement main AST model and used in additional code generators. For example see XSD mapping support in EMF.


What aspects of these (or other things that I've missed) do you see as particularly useful in the mainline case of the JDT/CDT/WTP supported languages?


Ability of sematic model to interact with AST model in interesting ways.

I actually would like if LDT will contain components that will help integrating text and EMF in the same way as GMF project tries to provide components that help integrating EMF and graphics. The biggest differnce is that in LDT text is primary artifact and AST is secondary. In GMF it is reverse. The model is primiary artifact and diagram is secondary.

And, what languages and/or features do you think would be easier to support using EMF?

I think I answered it.

Constantine