Skip to content
nbros edited this page Sep 13, 2010 · 3 revisions

The O’Caml AST can be represented as an EMF model (described by an Ecore metamodel).

This has several advantages:

  • EMF generates the AST classes
  • EMF is a robust, proven technology
  • AST can be serialized to XMI
  • could use CDO for scalability (for very big code bases that cannot be represented in memory)
  • The code representation can be manipulated by all the existing modeling tools:
    • code refactoring as a model transformation
    • code analysis becomes easier :
      • existing tools that understand EMF
      • easier to reason about a well-defined model
      • possible to provide code visualizations
  • The AST can be visualized easily in a model browser
    • Bugs in the AST construction code are easier to spot
    • Pedagogically useful to be able to browse the AST in a graphical way
Clone this wiki locally