Presentation is loading. Please wait.

Presentation is loading. Please wait.

AToM 3 : A Tool for Multi- Formalism and Meta-Modelling Juan de Lara (1,2) Hans Vangheluwe (2) (1) ETS Informática Universidad Autónoma de Madrid Madrid,

Similar presentations


Presentation on theme: "AToM 3 : A Tool for Multi- Formalism and Meta-Modelling Juan de Lara (1,2) Hans Vangheluwe (2) (1) ETS Informática Universidad Autónoma de Madrid Madrid,"— Presentation transcript:

1 AToM 3 : A Tool for Multi- Formalism and Meta-Modelling Juan de Lara (1,2) Hans Vangheluwe (2) (1) ETS Informática Universidad Autónoma de Madrid Madrid, Spain (2) School of Computer Science McGill University Montreal, Canada

2 Problems n To model and simulate complex systems: – Many components – Each one is better described in a particular formalism. n To transform models between formalisms preserving behaviour.

3 Goals n We propose Meta-Modelling + Graph- Rewriting to solve these problems. n To be able to automatically generate tools for the processing of models. n Common framework for all these tools.

4 Index n Problems n Goals n Background. –Multi-Formalism Modelling –Meta-Modelling. –Graph Grammars. n AToM 3. n Transforming NFA into DFA. n Conclusions and Future work.

5 Multi-Formalism Modelling Formalism Transformation Graph

6 Meta-Modelling (i) n Need of multiple, heterogeneous tools for multi-formalism modelling? n We solve it with Meta-Modelling: – Modelling the formalism... –And generating automatically a tool for processing models in the described formalism.

7 Meta-Modelling (ii) f´(x) = -sin(x), f(0) = 0 (in the ODEs formalism).... The description of an object in a certain formalism. Models of: Deterministic Finite Automata DFD, Structure Charts Ordinary Differential Equations... Models of formalisms. n Introduce higher modelling layers to model the formalisms themselves. Model Meta- Model Meta-Meta Model Models of (meta-) formalisms, which can be used to describe other formalisms Models of: Entity-Relationship Diagrams UML class Diagrams... OrderDescriptionExample

8 Meta-Modelling (iii) n Example: S0S1 1 S2 0 1 0 S3 0 1 Model: Even binary numbers (DFA) State Name: String Type: (I, R, F) StateTransition.forAll(t1, t2|t1.Condition<>t2.Condition) Transition Condition: String 1..1 0..N 1..1 0..N Constraints distinctStateNames: State.forAll(p, q|p.Name<>q.Name) uniqueInitial: State.exists(n|n.Type==I and State.forAll(m|n<>m and m.Type<>I) existsFinal: State.exists(n|n.Type==F) Meta-Model: DFA formalism (“UML” class diagram + OCL)

9 Meta-Modelling (iv) E-R Meta-Modelling Tool (AToM 3 Kernel) User Input: Create entities Delete entities Verify conditions (local, global) DFA Meta-Modelling Tool (AToM 3 Kernel) User Input: Create entities Delete entities Verify conditions (local, global) Even Binary Numbers Even Binary Numbers (meta-meta-model) (meta-model) (model) E-R DFA

10 Graph Grammars (i) n A (meta-) * model is a graph. n Just like string grammars, but rules have graphs in LHSs and RHSs. n If a matching is found between a LHS and a zone in the graph, this subgraph is substituted by the RHS. n A Graph Rewriting System tries each rule in sequence until none of them is applicable.

11 Graph Grammars (ii) n 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).

12 Index n Problems n Goals n Background. n AToM 3. – Meta-Modelling the DFA Formalism. n Transforming NFAs into DFAs. n Conclusions and Future work.

13 AToM 3 (i) E-R Meta-Modelling Tool (AToM 3 Kernel) User Input: Create entities Delete entities Verify conditions (local, global) DFA Meta-Modelling Tool (AToM 3 Kernel) User Input: Create entities Delete entities Verify conditions (local, global) Even Binary Numbers Even Binary Numbers (meta-meta-model) (model) User Interface Model Constraint Manager Code Generator Graph Rewriting Processor ASG Structure ASG Nodes Structure Graphical Model Graphical Icons Abstract Syntax Graph E-R DFA (meta-model)

14 AToM 3 (ii) n Types is another formalism. n Atomic (integer, boolean,...) or composite. n A composite type is a model in the “types” formalism. n Regular or Generative: –ATOM3Attribute –ATOM3Constraint –ATOM3Link –ATOM3Appearance

15 AToM 3 (iii) n DFA Meta-Model n Semantic information Edit Properties Edit Cardinalities

16 AToM 3 (iii) n DFA Meta-Model n Semantic information Constraints

17 AToM 3 (iv) n DFA Meta-Model n Graphical information Edit Appearance

18 AToM 3 (v) n DFA Meta-Model n Global Semantic Information and Constraints. Edit Model Attributes

19 AToM 3 (vi) n Configuring the DFA User Interface (In the Buttons formalism). n 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

20 AToM 3 (vii) n The Tool to Process DFA Models. n Create, Edit, Verify... n Other manipulations can be defined by means of graph grammars: –Simulate. –Optimize. –Transform. –Generate Code. –...

21 Index n Problems n Goals n Background. n AToM 3. n Transforming NFAs into DFAs. –Example n Conclusions and Future work.

22 Transforming NFAs into DFAs (i) Eliminates unreachable states Joins equivalent states Eliminates non determinism between two different states Eliminates non determinism with self- loops.

23 Condition: node(2).condition == node(3).condition Action: Copy inputs and outpus from node(4) and node(5) into node(7) Condition: node(2).condition == node(3).condition Action: Copy inputs and outpus from node(4) and node(5) into node(7) Transforming NFAs into DFAs (ii) Rule 3: Eliminates non determinism between two different states LHS RHS

24 Transforming NFAs into DFAs (ii) Example (i) Rule 1 Rule 3

25 Transforming NFAs into DFAs (ii) Example (ii) Rule 1 Rule 3 Rule 1

26 Transforming NFAs into DFAs (ii) Example (iii) Rule 3 Rule 1

27 Transforming NFAs into DFAs (ii) Example (iv)

28 Index n Problems n Goals n Background. n AToM 3. n Transforming NFAs into DFAs. n Conclusions and Future work.

29 Conclusions n Meta-Modelling + Graph Transformation is a powerful combination for Multi-Paradigm Modelling. n AToM 3 implements such a combination : –Meta-Modelling facilitates the generation of modelling tools. –Graph Transformation facilitates the processing of models (transformation, simulation, optimization, code generation).

30 Future Work n Extend AToM 3 : –Hierarchy. Hierarchical Graph Grammars. –Meta-Model Inheritance. Formalism inheritance. –Collaborative Modelling. XML representation. –Meta-Model UML Class Diagrams. n Implement all the Formalisms and Transformations in the Formalism Transformation Graph. n AToM 3 is available at: http://moncs.cs.mcgill.ca/MSDL/research/projects/AToM3/


Download ppt "AToM 3 : A Tool for Multi- Formalism and Meta-Modelling Juan de Lara (1,2) Hans Vangheluwe (2) (1) ETS Informática Universidad Autónoma de Madrid Madrid,"

Similar presentations


Ads by Google