SlideShare a Scribd company logo
1 of 39
Eugene Syriani
Introductory Tutorial
• Create a domains-specific language for modeling finite state automata
(FSA)
• Synthesize a modeling environment for designing FSA models
• Design a simulator for FSA
For that, we will:
– Define the abstract syntax
– Define the concrete syntax
– Define a model transformation for simulation
2
Introductory Tutorial
• The first step is to build the metamodel
• We can use class diagrams to do that
3
Introductory Tutorial
Load the SimpleClassDiagram formalism toolbar
4
Introductory Tutorial
• Click on the Class icon in the toolbar
• Right click on the canvas to create a class
• To edit its properties, middle click on the class with no selection, or select the class and
press <INSERT>
• Click OK to apply the changes
• To create an association, right click on the source class and drag your mouse to the target
class (which can be the same class), then release your mouse
• Select the association and press <SHIFT> to move its control points
• Select an element and press <CTRL> to scale or rotate the element
– Move the cursor to the icon corresponding to the action you want to perform
– Scroll down or up on that icon. When you are satisfied, click on the checkbox
Canvas actions
5
Introductory Tutorial
Draw the metamodel
6
Introductory Tutorial
Save as your model under a new folder FSA
7
The file name must be NAME+“MM.model”
Introductory Tutorial
Load the CompileMenu toolbar
8
Introductory Tutorial
Generate the metamodel from this class diagram
9
The file name must be NAME+“.metamodel”
Introductory Tutorial
• Then we assign one possible concrete syntax model to the metamodel
• We can do that by drawing some shapes
10
Introductory Tutorial
Load the ConcreteSyntax formalism toolbar
11
Introductory Tutorial
Draw the concrete syntax model
12
Introductory Tutorial
• Create an Icon instance on the canvas for classes of your metamodel
• Its typename attribute must be in the form: CLASSNAME+“Icon”
• Create the shape you want outside the icon
• Modify resize it using its SVG attributes
• You may have multiple shapes for the same class icon
• Select the (group of) shape(s) and drag-n-drop it inside the icon close to the top
left corner
• For associations, create a Link instance on the canvas
• To display some text, create a Text instance
Drawing steps
13
Introductory Tutorial
Draw the concrete syntax model
14
Introductory Tutorial
Display the name of the state
15
Introductory Tutorial
Display the event on the transition
16
Introductory Tutorial
Display the event list
17
Introductory Tutorial
Change the color of the current state to yellow
18
Introductory Tutorial
Save as the concrete syntax
19
The file name must be METAMODELNAME+“.”+“CONCRETESYNTAXNAME”+“Icons.model”
Introductory Tutorial
Generate a modeling environment
20
The file name must be METAMODELNAME+“.”+“CONCRETESYNTAXNAME”+“Icons.metamodel”
Introductory Tutorial
Load the FSA formalism toolbar
21
Introductory Tutorial
22
The file name must be NAME+“.”+“model”
Introductory Tutorial
• Now that we have defined the syntax of the language,
we shall define its behavior
• With a model transformation that serves as simulation
• So how to do that?
– Define the rules
– Define the scheduling of the rules (control flow)
23
Introductory Tutorial
Generate a modeling environment for designing patterns of FSA
24
Select the file NAME+“.metamodel”
Introductory Tutorial
Load the TransformationRule formalism toolbar
25
Introductory Tutorial
Load the FSA.pattern formalism toolbar
26
Introductory Tutorial
• In this simple FSA example, we can assume that
– An event is specified by one character
– There is exactly one state that is current
– This is a deterministic FSA so it is a DFA
• We can therefore define the behavior of such FSAs with only one rule:
If there are two states connected by a transition such that
the event on the transition is equal to
the first input in the event list
and the incoming state is the current state,
then remove the first event from the event list
and set the current state to be the outgoing state only
27
Introductory Tutorial
28
Introductory Tutorial
Save as the transformation rule
29
The file name must be “R_”+NAME+“.model”
Introductory Tutorial
Load the MoTif formalism toolbar
30
Introductory Tutorial
• Using the MoTif language, we can execute our simulate rule as an
SRule
• SRule: Apply the rule recursively as long as possible
– Find a match, rewrite the model, then re-match, rewrite the model, etc.
31
Introductory Tutorial
• ARule: (atomic) Applies the rule on one match
• FRule: (for all) Applies the rule on all matches found in parallel
• SRule: (star) Applies the rule recursively as long as matches can be found
32
Introductory Tutorial
• QRule: (query) Finds a match for the LHS
• CQRule2,3: (composite queries) Nested query for 2 or 3 levels
• Sequence: Applies a set of rules in ordered sequence
• CRule: (composite) Refers to another (sub-)transformation
33
Introductory Tutorial
• BRule: (branch) non-deterministically selects one successful branch of execution
• BSRule: (branch star) Recursive BRule
• LRule: (loop) For each match of the base rule, apply the loop rule
• Start, EndSuccess, EndFail pseudo-states
34
Introductory Tutorial
Save as the MoTif model
35
The file name must be “T_”+NAME+“.model”
Introductory Tutorial
Load the TransformationController toolbar
36
Introductory Tutorial
Build/open an FSA model & load the T_FSA_simulation transformation
37
Introductory Tutorial
Press <SHIFT>+<CTRL>+i to view the chrome console
38
Introductory Tutorial
Execute the transformation
39
Continuously or step-by-step

More Related Content

What's hot

Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan GoleChetan Gole
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction DiagramNiloy Rocker
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 
Entity Framework Core
Entity Framework CoreEntity Framework Core
Entity Framework CoreKiran Shahi
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design patternMindfire Solutions
 
PATTERNS02 - Creational Design Patterns
PATTERNS02 - Creational Design PatternsPATTERNS02 - Creational Design Patterns
PATTERNS02 - Creational Design PatternsMichael Heron
 
Prototype design patterns
Prototype design patternsPrototype design patterns
Prototype design patternsThaichor Seng
 
Introducing Eclipse MoDisco
Introducing Eclipse MoDiscoIntroducing Eclipse MoDisco
Introducing Eclipse MoDiscoHugo Bruneliere
 
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE PrinciplesModel-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE PrinciplesMarco Brambilla
 
XML Document Object Model (DOM)
XML Document Object Model (DOM)XML Document Object Model (DOM)
XML Document Object Model (DOM)BOSS Webtech
 
UML Class Diagram G-3-122139
UML Class Diagram G-3-122139UML Class Diagram G-3-122139
UML Class Diagram G-3-122139Hansi Thenuwara
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented TestingAMITJain879
 

What's hot (20)

Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Entity Framework Core
Entity Framework CoreEntity Framework Core
Entity Framework Core
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
Factory Method Pattern
Factory Method PatternFactory Method Pattern
Factory Method Pattern
 
Facade pattern
Facade patternFacade pattern
Facade pattern
 
JAVA AWT
JAVA AWTJAVA AWT
JAVA AWT
 
Flyweight pattern
Flyweight patternFlyweight pattern
Flyweight pattern
 
Jsp with mvc
Jsp with mvcJsp with mvc
Jsp with mvc
 
PATTERNS02 - Creational Design Patterns
PATTERNS02 - Creational Design PatternsPATTERNS02 - Creational Design Patterns
PATTERNS02 - Creational Design Patterns
 
Prototype_pattern
Prototype_patternPrototype_pattern
Prototype_pattern
 
Prototype design patterns
Prototype design patternsPrototype design patterns
Prototype design patterns
 
Introducing Eclipse MoDisco
Introducing Eclipse MoDiscoIntroducing Eclipse MoDisco
Introducing Eclipse MoDisco
 
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE PrinciplesModel-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
 
XML Document Object Model (DOM)
XML Document Object Model (DOM)XML Document Object Model (DOM)
XML Document Object Model (DOM)
 
UML Class Diagram G-3-122139
UML Class Diagram G-3-122139UML Class Diagram G-3-122139
UML Class Diagram G-3-122139
 
Facade Design Pattern
Facade Design PatternFacade Design Pattern
Facade Design Pattern
 
Facade Pattern
Facade PatternFacade Pattern
Facade Pattern
 
Object Oriented Testing
Object Oriented TestingObject Oriented Testing
Object Oriented Testing
 

Similar to AToMPM - Introductory Tutorial

Developing a new EMC Driver for Eclipse Epsilon
Developing a new EMC Driver for Eclipse EpsilonDeveloping a new EMC Driver for Eclipse Epsilon
Developing a new EMC Driver for Eclipse EpsilonEclipseEpsilon
 
P Training Presentation
P Training PresentationP Training Presentation
P Training PresentationGaurav Tyagi
 
The Roassal3 Visualization Engine
The Roassal3 Visualization EngineThe Roassal3 Visualization Engine
The Roassal3 Visualization EngineESUG
 
class as the basis.pptx
class as the basis.pptxclass as the basis.pptx
class as the basis.pptxEpsiba1
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...Daniel Katz
 
Object Oriented Programming (OOP) Introduction
Object Oriented Programming (OOP) IntroductionObject Oriented Programming (OOP) Introduction
Object Oriented Programming (OOP) IntroductionSamuelAnsong6
 
intro-to-eclipse.pdf
intro-to-eclipse.pdfintro-to-eclipse.pdf
intro-to-eclipse.pdfSajeev P
 
Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Vu Tran Lam
 

Similar to AToMPM - Introductory Tutorial (20)

Chapter3
Chapter3Chapter3
Chapter3
 
Developing a new EMC Driver for Eclipse Epsilon
Developing a new EMC Driver for Eclipse EpsilonDeveloping a new EMC Driver for Eclipse Epsilon
Developing a new EMC Driver for Eclipse Epsilon
 
P Training Presentation
P Training PresentationP Training Presentation
P Training Presentation
 
Design Patterns - GOF
Design Patterns - GOFDesign Patterns - GOF
Design Patterns - GOF
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Dynamic modeling
Dynamic modelingDynamic modeling
Dynamic modeling
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
The Roassal3 Visualization Engine
The Roassal3 Visualization EngineThe Roassal3 Visualization Engine
The Roassal3 Visualization Engine
 
class as the basis.pptx
class as the basis.pptxclass as the basis.pptx
class as the basis.pptx
 
Assign3
Assign3Assign3
Assign3
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
 
Introduction to Design Patterns
Introduction to Design PatternsIntroduction to Design Patterns
Introduction to Design Patterns
 
Object Oriented Programming (OOP) Introduction
Object Oriented Programming (OOP) IntroductionObject Oriented Programming (OOP) Introduction
Object Oriented Programming (OOP) Introduction
 
OOM Unit I - III.pdf
OOM Unit I - III.pdfOOM Unit I - III.pdf
OOM Unit I - III.pdf
 
Ch-2ppt.pptx
Ch-2ppt.pptxCh-2ppt.pptx
Ch-2ppt.pptx
 
intro-to-eclipse.pdf
intro-to-eclipse.pdfintro-to-eclipse.pdf
intro-to-eclipse.pdf
 
13 inheritance
13   inheritance13   inheritance
13 inheritance
 
Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)
 
Chapter8
Chapter8Chapter8
Chapter8
 
Refactoring Chapter11
Refactoring Chapter11Refactoring Chapter11
Refactoring Chapter11
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 

AToMPM - Introductory Tutorial