Analysis of a Metamodel to Estimate Complexity of Using a Domain-Specific Language Jonathan Sprinkle
This work is supported by AFOSR under award #FA9550-091-0519, and NSF under awards CNS-0915010 and CNS-0930919.
Analysis of a Metamodel to Estimate Complexity of Using a - - PowerPoint PPT Presentation
Analysis of a Metamodel to Estimate Complexity of Using a Domain-Specific Language This work is supported by AFOSR Jonathan Sprinkle under award #FA9550-091-0519, and NSF under awards CNS-0915010 and CNS-0930919. You might have seen this
This work is supported by AFOSR under award #FA9550-091-0519, and NSF under awards CNS-0915010 and CNS-0930919.
Electrical and Computer Engineering
18 October 2010
You might have seen this before...
2
T.J. McCabe. “A Complexity Measure”. Software Engineering, IEEE Transactions on, SE-2(4):308-320.
Electrical and Computer Engineering
18 October 2010
And this...
3
Karsten Ehrig, Jochen Malte Küster, Gabriele Taentzer. “Generating instance models from meta models” Softw. Syst.
Electrical and Computer Engineering
18 October 2010
What do these papers have in common?
4
Electrical and Computer Engineering
18 October 2010
How to apply to DSM?
– Raise the level of abstraction
– Improve expressivity
– Restrict the programmer/modeler
– Enable a “correct by construction” approach
– Given a metamodel, how hard is it to create an instance of every potential object in the metamodel? – Given a metamodel, what is the minimum set of elements required to create a syntactically valid model? – Given a modeling language (metamodel, plus semantic mapping) what is the minimum set of elements required to create a semantically valid model? – Given a modeling language, what is the complexity of creating a new syntactically and semantically valid model?
5
Electrical and Computer Engineering
18 October 2010
What is covered in this paper?
6
Electrical and Computer Engineering
18 October 2010
(Semi-)related Work
7
* This is unlikely to provoke an argument with anyone attending the workshop.
Electrical and Computer Engineering
18 October 2010
Related Work
8
* M. Rossi, S. Brinkkemper. “Complexity Metrics for Systems Development Methods and Techniques.” Information Systems, 21(2):209-227, 1996.
Electrical and Computer Engineering
18 October 2010
Approach
9
Proposed Style
Electrical and Computer Engineering
18 October 2010
Approach
– Types – Containment – Inheritance – Association
– Reference/pointers – N-ary associations or aggregation association (e.g., <<Set>> in GME) – Aspects/visualization – Attribute value setting/insetting – Composition and association constraints from the diagram – General OCL constraints – Module interconnection (component association between ports)
10
Electrical and Computer Engineering
18 October 2010
Start with an example
11
A *
Metamodel
start NULL A create(A)
Creates at least one ‘A’ model Missing: The containment association that permits hierarchical composition of ‘A’
Electrical and Computer Engineering
18 October 2010
Start with an example
12
A *
Metamodel Creates at least one ‘A’ model, and exercises the containment association
start NULL A create(A) A_{A} createIn(A,A)
Electrical and Computer Engineering
18 October 2010
A more complex example
13
X Z T * * W src dst * Y * src dst S *
Electrical and Computer Engineering
18 October 2010
State model for the metamodel
14
start NULL X create(X) X_{T} createIn(X,T) X_{T_{S}} createIn(T,S) X_{T_{Z}} createIn(T,Z) createIn(T,S) X_{T_{SZ}} createIn(T,Z) X_{T_{SYZ}} createIn(T,Y) X_{T_{SYZ}W} createIn(X,W) end
Electrical and Computer Engineering
18 October 2010
Some actually well-established metamodels, next: HFSM
15
Hierarchical Finite State Models (HFSM) Paradigm From GME10, Available: http://www.isis.vanderbilt.edu/projects/gme/
Electrical and Computer Engineering
18 October 2010
Some actually well-established metamodels, next: SF
16
Signal Flow (SF) Paradigm From GME10, Available: http://www.isis.vanderbilt.edu/projects/gme/
Electrical and Computer Engineering
18 October 2010
Some actually well-established metamodels, next: SF (p2)
17
Electrical and Computer Engineering
18 October 2010
Rudimentary Metric: Complexity of Exercise
– The number of instantiation elements that must be done in order (O), minus the number of instantiation elements that can be done in any order (C), for “choice”
– O=8 – C=2
18
Analogous to McCabe’s linearly independent paths.
Electrical and Computer Engineering
18 October 2010
Rudimentary Metric: Expansion of Cardinality
– Number of elements in the metamodel whose final cardinality is greater than 1, when counted over the entire metamodel
State must be created twice
Folder and Compound must be created twice
19
Ec(HFSM) = 1 Ec(SF) = 2 Analogous to expressivity (the lower, the better).
Electrical and Computer Engineering
18 October 2010
Conclusions
– Incorporate constraints (through guards on transitions between states) – A natural analog, but now requires extensions to McCabe’s unguarded transitions – However, easily permits transition constraints that involve attributes, etc. – Considerations of the necessary minimum set required in order to have a semantically meaningful model, rather than a fully exercised set.
20
This work is supported by AFOSR under award #FA9550-091-0519, and NSF under awards CNS-0915010 and CNS-0930919. The author is grateful to the anonymous reviewers for their kind and insightful comments that led to improvements in the final version of this paper.