TMF/LongRunPlans - Revision historyhttp://wiki.eclipse.org/index.php?title=TMF/LongRunPlans&action=history
Revision history for this page on the wikienMediaWiki 1.23.2Tue, 03 Mar 2015 21:22:21 GMTSven.efftinge.itemis.de: New page: Here we can discuss our proposals and requests for a single Textual Modeling Framework in future. For now, TMF hosts two sub-projects: Xtext and TCS. TMF architecture and implemen...http://wiki.eclipse.org/index.php?title=TMF/LongRunPlans&diff=127975&oldid=prev
http://wiki.eclipse.org/index.php?title=TMF/LongRunPlans&diff=127975&oldid=prev<p>New page: Here we can discuss our proposals and requests for a single Textual Modeling Framework in future. For now, TMF hosts two sub-projects: <a href="/Xtext" title="Xtext">Xtext</a> and <a href="/TCS" title="TCS">TCS</a>. TMF architecture and implemen...</p>
<p><b>New page</b></p><div>Here we can discuss our proposals and requests for a single Textual Modeling Framework in future.<br />
For now, TMF hosts two sub-projects: [[Xtext]] and [[TCS]].<br />
<br />
TMF architecture and implementation are defined according to the experience gained in the development of these two frameworks.<br />
<br />
==Expected TMF Features==<br />
<br />
This section proposes a list of features to be discussed:<br />
* A Domain-Specific Language (DSL) for textual concrete syntax definition. The abstract syntax of languages is defined as a metamodel (e.g., in [[EMF]] [[Ecore]], in [[KM3]]). The TMF DSL for textual concrete syntax definition will provide means to specify how each metamodel concept is represented textually, similarly to what [[TCS]] currently does. This DSL should support:<br />
** Definition of non context-free elements (e.g., symbol table used for cross-references).<br />
** Declarative definition of operators, and automatic generation of specific grammar rules to handle them.<br />
* Support for definition of TMF textual syntaxes from a grammar. In this case, both a metamodel (abstract syntax), and a TMF textual syntax model (concrete syntax) may be generated from the grammar. This mechanism will enable reuse of existing grammars, as well as accommodate developers with a grammarware background.<br />
** TBD: we may not want to force a one way translation from the grammar, but also support grammar-based development (e.g., like in [http://www.eclipse.org/gmt/oaw/doc/4.2/html/contents/xtext_reference.html xText]). However, supporting this is likely to be more expensive than requiring a transition to metamodel + TMF textual syntax model.<br />
* Parsing and pretty-printing. Using the syntax specification, TMF will provide:<br />
** parsing (or injection) to translate textual programs into models (e.g., in EMF).<br />
** pretty-printing (or extraction) to translate models into program.<br />
* Syntax-aware editors. Using the syntax specification of a given language, TMF will provide a lightweight (e.g., interpretative) language-specific editor with: syntax highlighting, text hovers, hyperlinks, an outline, etc. This editor may integrate with GMF to provide Graphical-Textual hybrid editors. This editor would be similar to:<br />
** the current TCS-based Textual Generic Editor (TGE), as illustrated in the screenshots of the [http://www.eclipse.org/gmt/tcs TCS project page], and on the image [[Image:LOTOS-TGE.png|thumb|TGE screenshot]] at the right of this paragraph.<br />
** the [http://www.eclipse.org/gmt/oaw/doc/4.2/html/contents/xtext_tutorial.html#xtext_tutorial_fill_model xText editor].<br />
* Support for constraints checking in the TMF language-specific editor.<br />
* Support for language extension. Extending a language will consist of:<br />
** extending its metamodel (i.e., abstract syntax), which is going to be based on mechanisms provided by metametamodels (e.g., [[EMF]] [[Ecore]] inter-metamodel references, [[KM3]] metamodel extension).<br />
** extending its concrete syntax, which is going to be based on specific support for extension in the TMF textual concrete syntax DSL.<br />
* A library of TMF-defined languages. This library will illustrate TMF usage, and may serve as a collection of examples, but also as a starting point (e.g., by extending the languages it provides). An example of such a library is the [[TCS/Zoo|TCS zoo]].<br />
<br />
==Flexible Implementation Requirements==<br />
<br />
This section contains a list of requirements regarding the implementation of TMF, and its (relative) independence with respect to specific tools:<br />
* Support for several parsing back-ends. Instead of targeting a single parser generator, TMF will have a flexible architecture (see Figure 1) enabling support for parser generators like: [http://www.antlr.org/ ANTLR], [http://sourceforge.net/projects/lpg/ LPG]. This can be achieved using a mechanism such as the [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/org.eclipse.gmt.tcs/plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/wrappers/ParserWrapper.java?view=markup ParserWrapper] class of [[TCS]].<br />
* Support for several editing back-ends. The TMF architecture will accommodate several kinds of language-specific editors: [http://www.eclipse.org/proposals/imp/ IMP] (formerly known as SAFARI), the lightweight TMF-specific editors, etc.<br />
* Support for several kinds of constraints checking engines.<br />
* Support for several modeling framework. Although EMF is the primary modeling framework on which TMF will be based, some features (such as parsing, and pretty printing) should work with other frameworks (including pure Java ASTs?).<br />
** API-independence may be achieved using a mechanism such as the [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/org.eclipse.gmt.tcs/plugins/org.eclipse.gmt.tcs.injector/src/org/eclipse/gmt/tcs/injector/ModelHandler.java?view=markup ModelHandler] interface of [[TCS]].<br />
** Metametamodel-independence may be achieved using a metametamodel pivot such as the [[KM3|Kernel MetaMetaModel (KM3)]].<br />
<br />
<br />
[[Image:TMF_ArchitectureV1.png|frame|center|Figure 1. Architecture of the TMF grammar generator ([[Media:TMF_ArchitectureV1.zip|zipped Visio source]])]]<br />
<br />
<br />
==Other Considerations==<br />
<br />
This section contains a list of requirements that do not fit in the previous sections:<br />
* A model-based implementation. As far as possible, TMF implementation will use Model Engineering techniques: model-to-model ([M2M]) transformations to create grammars or editor configurations from TMF definitions (i.e., similarly to what TCS and TGE [http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.gmt/org.eclipse.gmt.tcs/dsls/TCS/Compiler/TCS2ANTLR.atl?view=markup currently do]), [[Model to Text (M2T)]] for Java code or documentation generation, etc.<br />
** This requirement will show our confidence in Model Engineering techniques.<br />
** To achieve a model-based implementation, the syntax of the TMF textual concrete syntax definition TCS will have to be bootstrapped. In a first step, it will be defined using either [[TCS]] or xText.<br />
<br />
<br />
[[Category:Modeling]]</div>Tue, 11 Nov 2008 13:58:31 GMTSven.efftinge.itemis.dehttp://wiki.eclipse.org/Talk:TMF/LongRunPlans