Concrete Syntax Definition for Modeling Languages Frédéric Fondement PhD. thesis Private Defense Swiss Federal Institute of Technology in Lausanne Software Engineering Laboratory September 2007
Contents z Introduction • Model Driven Engineering • Language Definition
Abstract Syntax + Concrete Syntax(es) ModelElement name : String
StateMachine source subvertex *
StateVertex
Event
outgoing *
1
*
1 target
trigger 0..1 Transition
*
incoming top 1 State
PseudoState
«enumeration» PseudoStateKind
kind : PseudoStateKind container 0..1
Composite State
Simple State
Final State
initial choice ...
z Interface between concept instances and system architects • Mean to manipulate virtual concept instances • Different points of view, different approaches to visualization • Emphasize different details
Lexicon z Abstract syntax, metamodel, concepts z Abstract syntax tree (AST), ASG, model z Language sentence = model + representation z Concept instance, model element, instance Abstract Syntax (M etam odel) «conform sTo»
StateMachine Door CompositeState { initial State opened CompositeState closed { initial State unlocked State locked Transition from unlocked to locked on lock Transition from locked to unlocked on unlock Transition from unlocked to opened on open } Transition from opened to closed on close } - 26 -
A Textual Representation
:CompositeState
A Graphical Representation
Example
September 2007
Example TCSS start template for StateMachine ::= "StateMachine" self.name self.top:=stateR; rule stateR ::= {OCL| self.oclIsKindOf(SimpleState)}? ssr | {OCL| self.oclIsKindOf(CompositeState)}? csr template csr for CompositeState ::= init "CompositeState" self.name "{" self.state:=(stateR)* "}" Abstract Syntax (Metamodel)
rule init ::= {OCL| self.incoming.source->exists(s| s.oclIsKindOf(PseudoState) and s.oclAsType(PseudoState).kind = initial) «conformsTo» }? "initial" =>{KerMeta| var _init:PseudoState init PseudoState.new var _t:Transition init Transition.new _init.kind := PseudoStateKind#initial Reversible _t.source := _init _t.target := self} Text … Model Processor
Problems z Not limited to connection-based languages z Reversible mapping z Versatile representation language z Clear representation data structure z Library of reusable interactions
↑ z Avoids Relates two things abstract/concrete of same nature syntax pollution
z Improves reusability z Minimizes maintenance points z Mapping can be complex (large gap !)
- 62 -
September 2007
The Representation Language z Render Vector Graphics • Render “Terminal” Symbols • As open as possible
z Controllable by an API (online rendering) • Implementation for interaction library • Possibility to specify variation points • Mean to access the model
The Representation Language 9 Render Vector Graphics 9Not connection-based only 9As open as possible
z Controllable by an API (online rendering) • Implementation for interaction library • Possibility to specify variation points • Mean to access the model
Alternatives Composite state is depicted either by a text showing the name of the composite state, or by a region showing the contents of the composite state, or both. In the latter case, the two regions are separated by a line. Composite me State 1
dm *
Composite StateDM showName showContent
vo SVGComposite State 1 1 0..1 SVGText name 0..1 separator 0..1
SVGLine SVGContents
context CompositeStateDM inv: self.showName = self.vo.name−>notEmpty() and self.showContent = self.vo.contents−>notEmpty() and (self.showName and self.showContent ) = self.vo.separator−>notEmpty() contents
Representation Link: DopiDOM events z Events depend on DopiDOM component z Reaction to events defined in templates • Java JMI or EMF, KerMETA, Xion, etc.
Conclusions z Language proliferation (MDE+DSM) • Language engineering is a key
z Solutions to fill abstract/concrete syntax gap • Abstract syntax provided as a metamodel • Focus on executable specifications • Missing OCL constraint solver… • Human readable/productible ?
Towards “Agile” Language Engineering z Agile MDE Definition • Knowledge from real specialists ! • “off-the-shelf (MDE) components” • Adaptable to each project
Nov 2, 2007 - Models at any abstraction level. ⢠Use cases, Business models, SDL, CCM, B, ⦠.... name : String. StateMachine. StateVertex. Transition. State.
general purpose languages (e.g. UML) when they do not perfectly fit the (modeling) needs. As a matter of fact, an MDE development process, which involves ...
We built our solution to concrete syntax definition as companions of the abstract syn- tax. ...... The correct SQL model (specialized SQL for Oracle, MySQL or.
placeholder for modeling static concepts of a language (i.e. its vocabulary) and theirs ...... that is the lexicon of concepts of the languages (vocabulary), properties.
2. To facilitate collaboration between the many stakeholders involved in the develop- .... Based Information System (IBIS), Questions Options. Criteria (QOC), and ...
a given property by choosing between the rule of the awaited concept (if it exists), and all the rules corresponding to sub-concepts (i.e. rules of inheriting.
Enterprise Architecture (EA) approach consists of a set of models describing ... It can describe integrated models of the enterprise .... At the core of TOGAF is the Architecture ... mantics is implemented, resulting in Java classes, with at- tribute
Permission to make digital or hard copies of all or part of this work for personal .... To answer this concerns, .... Figure 2: The ArchiMate telecom Application layer.
(e.g. it features powerful expressions for model querying) but it addresses only half of the problem. Despite its name, there is no seamless way to transform the ...
Model-based techniques place modeling at the cornerstone of soft- ware development. .... We show here a metamodel to state its abstract syntax (see figure 1 ...
The material presented in this paper is an evolution of a previous work which was limited to ... concrete syntax, and explains the mechanics which are behind. Section 5 ... A model is a kind of graph, so the approach can be applied to make a model ..
advantage of metamodels to generate fully operational tools (such as ... industrial solutions for language engineering that involve specifications used for the .... We have chosen to implement such backtracking algorithm in our prototype .... contrib
Sep 16, 1973 - Hitachi America Ltd . . ..... A C program need not all be translated at the same time. The text of the program is ...... of preprocessing tokens within the list of arguments that would otherwise act as preprocessing directives. the ...
Sep 16, 1973 - Physical source file characters are mapped to the source character set (introducing new-line ..... instructions that comprise the executable representation of a function) on a per-invocation basis. ...... stl u( t-or-ro~ior~spc~ ifret.
In addition to dealing with the basics of form design and construction,. Formwork for Concrete presents chapters devoted to specialized problems of architectural ...
Sep 16, 1973 - 7.5.4 Exponential and logarithmic functions . ...... elrrirOllnze!lr in this International Standard Their characteristics define and ...... Conversions that involve pointers (other than as permitted by the constraints of 6.3.16.1) shal
Japanese is mora-timed. ... (that may be zero) and V may result from the merg- .... English German French Spanish Mandarin Vietnamese Japanese Korean ...
Whereas part of the overall process can be fully automated (envelope opening with ... content is expected (incoming mail document) is one particular example of ..... This training set contains 7008 rejects, 4968 digits, 522 separators and 334.
Concrete Pavements, published by Portland Cement Association. ..... rubberasphalt sealants as well as polymer-type, hot-poured elastomeric sealants meeting ...