Title: AToM3: A Tool for Multi-Formalism and Meta-Modelling
1AToM3 A Tool for Multi-Formalism and
Meta-Modelling
- Juan de Lara(1,2)
- Hans Vangheluwe(2)
(2) School of Computer Science McGill
University Montreal, Canada
(1) ETS Informática Universidad Autónoma de
Madrid Madrid, Spain
2Problems
- To model and simulate complex systems
- Many components
- Each one is better described in a particular
formalism. - To transform models between formalisms
preserving behaviour.
3Goals
- We propose Meta-Modelling Graph-Rewriting to
solve these problems. - To be able to automatically generate tools for
the processing of models. - Common framework for all these tools.
4Index
- Problems
- Goals
- Background.
- Multi-Formalism Modelling
- Meta-Modelling.
- Graph Grammars.
- AToM3.
- Transforming NFA into DFA.
- Conclusions and Future work.
5Multi-Formalism Modelling
Formalism Transformation Graph
6Meta-Modelling (i)
- Need of multiple, heterogeneous tools for
multi-formalism modelling? - We solve it with Meta-Modelling
- Modelling the formalism...
- And generating automatically a tool for
processing models in the described formalism.
7Meta-Modelling (ii)
- Introduce higher modelling layers to model the
formalisms themselves.
Order
Description
Example
Meta-Meta Model
Models of (meta-) formalisms, which can be used
to describe other formalisms
- Models of
- Entity-Relationship Diagrams
- UML class Diagrams
- ...
- Models of
- Deterministic Finite Automata
- DFD, Structure Charts
- Ordinary Differential Equations
- ...
Models of formalisms.
Meta- Model
- f(x) -sin(x), f(0) 0 (in the
- ODEs formalism).
- ...
The description of an object in a
certain formalism.
Model
8Meta-Modelling (iii)
0..N
1..1
1
State Name String Type (I, R,
F) StateTransition.forAll(t1, t2t1.Conditionltgtt
2.Condition)
1
S0
S1
Transition Condition String
0..N
1
1..1
0
0
S2
S3
Constraints distinctStateNames State.forAll(p,
qp.Nameltgtq.Name) uniqueInitial
State.exists(nn.TypeI and State.forAll(mnltgtm
and m.TypeltgtI) existsFinal State.exists(nn.Type
F)
0
- Model Even binary numbers (DFA)
- Meta-Model DFA formalism (UML class diagram
OCL)
9Meta-Modelling (iv)
E-R
E-R
(meta-meta-model)
E-R
DFA
(meta-model)
Meta-Modelling Tool (AToM3 Kernel)
- User Input
- Create entities
- Delete entities
- Verify conditions
- (local, global)
DFA
Even Binary Numbers
Meta-Modelling Tool (AToM3 Kernel)
- User Input
- Create entities
- Delete entities
- Verify conditions
- (local, global)
(model)
10Graph Grammars (i)
- A (meta-) model is a graph.
- Just like string grammars, but rules have graphs
in LHSs and RHSs. - If a matching is found between a LHS and a zone
in the graph, this subgraph is substituted by the
RHS. - A Graph Rewriting System tries each rule in
sequence until none of them is applicable.
11Graph Grammars (ii)
- We use graph grammars to
- Express operational semantics (simulator
specification) - Transform models into behaviourally equivalent
models expressed in another formalism. - Optimize models.
- Generate code for a particular tool ( ?
denotational semantics).
12Index
- Problems
- Goals
- Background.
- AToM3.
- Meta-Modelling the DFA Formalism.
- Transforming NFAs into DFAs.
- Conclusions and Future work.
13AToM3(i)
Graphical Icons
User Interface Model
ASG Nodes Structure
ASG Structure
(meta-meta-model)
E-R
E-R
Graph Rewriting Processor
Graphical Model
Abstract Syntax Graph
(meta-model)
Meta-Modelling Tool (AToM3 Kernel)
User Interface
E-R
DFA
Constraint Manager
Code Generator
- User Input
- Create entities
- Delete entities
- Verify conditions
- (local, global)
DFA
Even Binary Numbers
Meta-Modelling Tool (AToM3 Kernel)
(model)
- User Input
- Create entities
- Delete entities
- Verify conditions
- (local, global)
14AToM3(ii)
- Types is another formalism.
- Atomic (integer, boolean, ...) or composite.
- A composite type is a model in the types
formalism. - Regular or Generative
- ATOM3Attribute
- ATOM3Constraint
- ATOM3Link
- ATOM3Appearance
15AToM3(iii)
- DFA Meta-Model
- Semantic information
Edit Cardinalities
Edit Properties
16AToM3(iii)
- DFA Meta-Model
- Semantic information
Constraints
17AToM3(iv)
- DFA Meta-Model
- Graphical information
Edit Appearance
18AToM3(v)
- DFA Meta-Model
- Global Semantic Information and Constraints.
Edit Model Attributes
19AToM3(vi)
- Configuring the DFA User Interface (In the
Buttons formalism). - Automatically generated by a Graph-Grammar
- Transforms a Model in the Eentity Relationship
formalism into a Model in the Buttons Formalism.
Edit Entity
Config. Action
20AToM3(vii)
- The Tool to Process DFA Models.
- Create, Edit, Verify...
- Other manipulations can be defined by means of
graph grammars - Simulate.
- Optimize.
- Transform.
- Generate Code.
- ...
21Index
- Problems
- Goals
- Background.
- AToM3.
- Transforming NFAs into DFAs.
- Example
- Conclusions and Future work.
22Transforming NFAs into DFAs (i)
Eliminates unreachable states Joins equivalent
states Eliminates non determinism between two
different states Eliminates non determinism with
self-loops.
23Transforming NFAs into DFAs (ii)
Rule 3 Eliminates non determinism between two
different states
RHS
LHS
Condition node(2).condition
node(3).condition Action Copy inputs and outpus
from node(4) and node(5) into node(7)
24Transforming NFAs into DFAs (ii)
Example (i)
Rule 1
Rule 3
25Transforming NFAs into DFAs (ii)
Example (ii)
Rule 1
Rule 3
Rule 1
26Transforming NFAs into DFAs (ii)
Example (iii)
Rule 1
Rule 1
Rule 3
27Transforming NFAs into DFAs (ii)
Example (iv)
28Index
- Problems
- Goals
- Background.
- AToM3.
- Transforming NFAs into DFAs.
- Conclusions and Future work.
29Conclusions
- Meta-Modelling Graph Transformation is a
powerful combination for Multi-Paradigm
Modelling. - AToM3 implements such a combination
- Meta-Modelling facilitates the generation of
modelling tools. - Graph Transformation facilitates the processing
of models (transformation, simulation,
optimization, code generation).
30Future Work
- Extend AToM3
- Hierarchy. Hierarchical Graph Grammars.
- Meta-Model Inheritance. Formalism inheritance.
- Collaborative Modelling. XML representation.
- Meta-Model UML Class Diagrams.
- Implement all the Formalisms and Transformations
in the Formalism Transformation Graph. - AToM3 is available at
- http//moncs.cs.mcgill.ca/MSDL/research/projects/A
ToM3/