SlideShare a Scribd company logo
1 of 17
Download to read offline
The Epsilon Pattern Language
Dimitris Kolovos, Richard Paige
May 22, 2017
Department of Computer Science
University of York
9th Workshop on Modelling in Software Engineering (MiSE)
ICSE 2017, Buneos Aires, Argentina
Pattern Matching
• In general: finding sub-structures of interest within more
complex structures
• e.g. character sequences that look like email addresses
• In modelling: finding sets of model elements that have certain
properties and/or are connected in interesting ways
1
Example: Attributes to Pull Up
• Find pairs of attributes that can be moved up to a common
supertype
2
Declarative Pattern Matching
• Describe patterns declaratively
• Let the pattern matching engine figure out the optimal
execution plan
1
1
from Arend et. al. – Henshin: Advanced Concepts and Tools for In-Place
EMF Model Transformations, ACM/IEEE MoDELS 2010
3
Declarative Pattern Matching Languages
Strengths
• Lots of room for behind-the-scene optimisation
• Can be executed incrementally (speed/memory trade-off)
Weaknesses
• Complex patterns can be challenging/verbose to express
graphically
• Falling back to complex expressions can reduce the scope for
optimisation/incrementality
• Current execution planners are not great
4
Practical Considerations
• Bound to a particular modelling technology / model
representation format
• Non-negligible conversion cost
• No support for patterns that involve elements from different
(heterogeneous) models
• e.g. UML activities and Simulink blocks
• No out-of-the-box support for “exporting” the results of
pattern matching to downstream activities (e.g. M2M, M2T)
5
Epsilon Pattern Language
• Hybrid OCL-based pattern matching language
• Modelling-technology independent
• Support for patterns that involve elements from multiple
heterogeneous models
• Support for “exporting” detected pattern instances to M2T,
M2M transformations etc.
6
Epsilon Organisation
eclipse.org/epsilon
7
Example: Attributes to Pull Up
• Find pairs of attributes that can be moved up to a common
supertype
8
Finding Attributes to Pull Up using EPL
pattern AttributesToPullUp
c : EClass ,
a1 , a2 : EAttribute {
match :
a1.name = a2.name
and a1.eType = a2.eType
and a1 <> a2
and a1. eContainingClass . eAllSuperTypes .includes(c)
and a2. eContainingClass . eAllSuperTypes .includes(c)
}
9
A More Performant Version
pre {
var attributes = EAttribute.all.mapBy(a|a.name );
}
pattern AttributesToPullUp
c : EClass ,
a1 : EAttribute ,
a2 : EAttribute
from : attributes.get(a1.name ). excluding(a1) {
match :
a1.eType = a2.eType
and a1. eContainingClass . eAllSuperTypes .includes(c)
and a2. eContainingClass . eAllSuperTypes .includes(c)
}
10
Adding a Second Model
• To specify attributes which should be ignored during pattern
detection
• The second model is an Excel spreadsheet with one worksheet
called “Ignore”
M
class attribute
. . . . . .
Employee name
. . . . . .
C
11
Pattern Matching on Two Models
pre { var attributes = M!EAttribute.all.mapBy(a|a.name ); }
pattern AttributesToPullUp
c : M!EClass ,
a1 : M!EAttribute ,
a2 : M!EAttribute
from : attributes.get(a1.name ). excluding(a1)
guard : not a1.isIgnored() and not a2.isIgnored() {
match :
a1.eType = a2.eType
and a1. eContainingClass . eAllSuperTypes .includes(c)
and a2. eContainingClass . eAllSuperTypes .includes(c)
}
operation M!EAttribute isIgnored() {
return C!Ignore.all.exists(i|i.attribute = self.name
and i.class = self. eContainingClass .name );
}
12
Consuming Pattern Instances
• Pattern instances are wrapped as an EMC-compatible
in-memory “model”
• Patterns become types (e.g. AttributesToPullUp)
• Roles become fields (e.g. c, a1, a2)
• Other Epsilon programs can query and navigate them
• To transform, validate them etc.
• . . . even to detect patterns of patterns
13
Pattern Matching in a Workflow
<project default="main"> <target name="main">
<epsilon.emf.loadModel name="M" modelfile="model.ecore"
metamodeluri="http://www.eclipse.org/emf/2002/Ecore"/>
<epsilon.loadModel name="C" type="ExcelModel">
<parameter name="SPREADSHEET FILE" file="config.xlsx"/>
</epsilon.loadModel>
<epsilon.epl src="patterns.epl" exportas="P">
<model ref="M"/> <model ref="C"/>
</epsilon.epl>
<epsilon.eol>
for (atp in P!AttributesToPullUp.all) { atp.c.name.println(); }
<model ref="M"/><model ref="C"/><model ref="P"/>
</epsilon.eol>
</target > </project >
14
Future Work
• Experimental evaluation against GrGen.NET, Henshin,
VIATRA/EMF-IncQuery, AGG etc.
• Static analysis
• Parallel and incremental pattern matching
15
Summary
• Hybrid OCL-based pattern matching language
• Modelling-technology independent
• Support for “exporting” detected patterns to downstream
model management programs
eclipse.org/epsilon
16

More Related Content

What's hot

What every Eclipse developer should know about EMF
What every Eclipse developer should know about EMFWhat every Eclipse developer should know about EMF
What every Eclipse developer should know about EMFPhilip Langer
 
Basics of Object Oriented Programming
Basics of Object Oriented ProgrammingBasics of Object Oriented Programming
Basics of Object Oriented ProgrammingAbhilash Nair
 
Metamodeling - Advanced Software Engineering Course 2014/2015
Metamodeling - Advanced Software Engineering Course 2014/2015Metamodeling - Advanced Software Engineering Course 2014/2015
Metamodeling - Advanced Software Engineering Course 2014/2015Luca Berardinelli
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015Luca Berardinelli
 
What every Eclipse developer should know about EMF - Tutorial at EclipseCon
What every Eclipse developer should know about EMF - Tutorial at EclipseConWhat every Eclipse developer should know about EMF - Tutorial at EclipseCon
What every Eclipse developer should know about EMF - Tutorial at EclipseConJonasHelming
 
UML: Once More with Meaning
UML: Once More with MeaningUML: Once More with Meaning
UML: Once More with MeaningEd Seidewitz
 
Code Generation 2014 - ALF, the Standard Programming Language for UML
Code Generation 2014  - ALF, the Standard Programming Language for UMLCode Generation 2014  - ALF, the Standard Programming Language for UML
Code Generation 2014 - ALF, the Standard Programming Language for UMLJürgen Mutschall
 
How to Make Robust and Scalable Modeling Workbenches with Sirius - EclipseCon...
How to Make Robust and Scalable Modeling Workbenches with Sirius - EclipseCon...How to Make Robust and Scalable Modeling Workbenches with Sirius - EclipseCon...
How to Make Robust and Scalable Modeling Workbenches with Sirius - EclipseCon...mporhel
 
C# Summer course - Lecture 1
C# Summer course - Lecture 1C# Summer course - Lecture 1
C# Summer course - Lecture 1mohamedsamyali
 
MDD with Executable UML Models
MDD with Executable UML ModelsMDD with Executable UML Models
MDD with Executable UML ModelsRafael Chaves
 
Object Oriented Programming lecture 1
Object Oriented Programming lecture 1Object Oriented Programming lecture 1
Object Oriented Programming lecture 1Anwar Ul Haq
 
UML: This Time We Mean It!
UML: This Time We Mean It!UML: This Time We Mean It!
UML: This Time We Mean It!Ed Seidewitz
 
Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programmingHaris Bin Zahid
 
Representing Design Patterns In Uml Andy Bulka Oct2006
Representing Design Patterns In Uml Andy Bulka Oct2006Representing Design Patterns In Uml Andy Bulka Oct2006
Representing Design Patterns In Uml Andy Bulka Oct2006tcab22
 
Re-implementing Thrift using MDE
Re-implementing Thrift using MDERe-implementing Thrift using MDE
Re-implementing Thrift using MDESina Madani
 
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesDurgesh Singh
 

What's hot (20)

What every Eclipse developer should know about EMF
What every Eclipse developer should know about EMFWhat every Eclipse developer should know about EMF
What every Eclipse developer should know about EMF
 
Eugenia
EugeniaEugenia
Eugenia
 
oop Lecture 3
oop Lecture 3oop Lecture 3
oop Lecture 3
 
Basics of Object Oriented Programming
Basics of Object Oriented ProgrammingBasics of Object Oriented Programming
Basics of Object Oriented Programming
 
Metamodeling - Advanced Software Engineering Course 2014/2015
Metamodeling - Advanced Software Engineering Course 2014/2015Metamodeling - Advanced Software Engineering Course 2014/2015
Metamodeling - Advanced Software Engineering Course 2014/2015
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
 
What every Eclipse developer should know about EMF - Tutorial at EclipseCon
What every Eclipse developer should know about EMF - Tutorial at EclipseConWhat every Eclipse developer should know about EMF - Tutorial at EclipseCon
What every Eclipse developer should know about EMF - Tutorial at EclipseCon
 
UML: Once More with Meaning
UML: Once More with MeaningUML: Once More with Meaning
UML: Once More with Meaning
 
Code Generation 2014 - ALF, the Standard Programming Language for UML
Code Generation 2014  - ALF, the Standard Programming Language for UMLCode Generation 2014  - ALF, the Standard Programming Language for UML
Code Generation 2014 - ALF, the Standard Programming Language for UML
 
How to Make Robust and Scalable Modeling Workbenches with Sirius - EclipseCon...
How to Make Robust and Scalable Modeling Workbenches with Sirius - EclipseCon...How to Make Robust and Scalable Modeling Workbenches with Sirius - EclipseCon...
How to Make Robust and Scalable Modeling Workbenches with Sirius - EclipseCon...
 
Programming paradigms
Programming paradigmsProgramming paradigms
Programming paradigms
 
C# Summer course - Lecture 1
C# Summer course - Lecture 1C# Summer course - Lecture 1
C# Summer course - Lecture 1
 
MDD with Executable UML Models
MDD with Executable UML ModelsMDD with Executable UML Models
MDD with Executable UML Models
 
TextUML Toolkit
TextUML ToolkitTextUML Toolkit
TextUML Toolkit
 
Object Oriented Programming lecture 1
Object Oriented Programming lecture 1Object Oriented Programming lecture 1
Object Oriented Programming lecture 1
 
UML: This Time We Mean It!
UML: This Time We Mean It!UML: This Time We Mean It!
UML: This Time We Mean It!
 
Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programming
 
Representing Design Patterns In Uml Andy Bulka Oct2006
Representing Design Patterns In Uml Andy Bulka Oct2006Representing Design Patterns In Uml Andy Bulka Oct2006
Representing Design Patterns In Uml Andy Bulka Oct2006
 
Re-implementing Thrift using MDE
Re-implementing Thrift using MDERe-implementing Thrift using MDE
Re-implementing Thrift using MDE
 
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modules
 

Similar to The Epsilon Pattern Language

SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfB.T.L.I.T
 
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
MDE=Model Driven Everything (Spanish Eclipse Day 2009)MDE=Model Driven Everything (Spanish Eclipse Day 2009)
MDE=Model Driven Everything (Spanish Eclipse Day 2009)Jordi Cabot
 
Third AssignmentDescribe in 100 – 200 words an application with .docx
Third AssignmentDescribe in 100 – 200 words an application with .docxThird AssignmentDescribe in 100 – 200 words an application with .docx
Third AssignmentDescribe in 100 – 200 words an application with .docxrandymartin91030
 
ATI Courses Professional Development Short Course Engineering Systems Modelin...
ATI Courses Professional Development Short Course Engineering Systems Modelin...ATI Courses Professional Development Short Course Engineering Systems Modelin...
ATI Courses Professional Development Short Course Engineering Systems Modelin...Jim Jenkins
 
Design patterns in_c_sharp
Design patterns in_c_sharpDesign patterns in_c_sharp
Design patterns in_c_sharpCao Tuan
 
Patterns in Python
Patterns in PythonPatterns in Python
Patterns in Pythondn
 
chapter 5 Objectdesign.ppt
chapter 5 Objectdesign.pptchapter 5 Objectdesign.ppt
chapter 5 Objectdesign.pptTemesgenAzezew
 
Excel ways training_course_contents
Excel ways training_course_contentsExcel ways training_course_contents
Excel ways training_course_contentsSai ExcelWays
 
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd semsmumbahelp
 
Cs6301 programming and datastactures
Cs6301 programming and datastacturesCs6301 programming and datastactures
Cs6301 programming and datastacturesK.s. Ramesh
 
Design pattern & categories
Design pattern & categoriesDesign pattern & categories
Design pattern & categoriesHimanshu
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignDr. C.V. Suresh Babu
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languagesppd1961
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)David McCarter
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxanguraju1
 

Similar to The Epsilon Pattern Language (20)

SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
 
UML01
UML01UML01
UML01
 
ALT
ALTALT
ALT
 
MDE in Practice
MDE in PracticeMDE in Practice
MDE in Practice
 
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
MDE=Model Driven Everything (Spanish Eclipse Day 2009)MDE=Model Driven Everything (Spanish Eclipse Day 2009)
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
 
Day5
Day5Day5
Day5
 
Third AssignmentDescribe in 100 – 200 words an application with .docx
Third AssignmentDescribe in 100 – 200 words an application with .docxThird AssignmentDescribe in 100 – 200 words an application with .docx
Third AssignmentDescribe in 100 – 200 words an application with .docx
 
ATI Courses Professional Development Short Course Engineering Systems Modelin...
ATI Courses Professional Development Short Course Engineering Systems Modelin...ATI Courses Professional Development Short Course Engineering Systems Modelin...
ATI Courses Professional Development Short Course Engineering Systems Modelin...
 
Design patterns in_c_sharp
Design patterns in_c_sharpDesign patterns in_c_sharp
Design patterns in_c_sharp
 
1 puc programming using c++
1 puc programming using c++1 puc programming using c++
1 puc programming using c++
 
Patterns in Python
Patterns in PythonPatterns in Python
Patterns in Python
 
chapter 5 Objectdesign.ppt
chapter 5 Objectdesign.pptchapter 5 Objectdesign.ppt
chapter 5 Objectdesign.ppt
 
Excel ways training_course_contents
Excel ways training_course_contentsExcel ways training_course_contents
Excel ways training_course_contents
 
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd sem
 
Cs6301 programming and datastactures
Cs6301 programming and datastacturesCs6301 programming and datastactures
Cs6301 programming and datastactures
 
Design pattern & categories
Design pattern & categoriesDesign pattern & categories
Design pattern & categories
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languages
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptx
 

More from Dimitris Kolovos

Picto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T TransformationPicto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T TransformationDimitris Kolovos
 
Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An...
Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An...Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An...
Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An...Dimitris Kolovos
 
Merging Models with the Epsilon Merging Language - A Decade Later
Merging Models with the Epsilon Merging Language - A Decade LaterMerging Models with the Epsilon Merging Language - A Decade Later
Merging Models with the Epsilon Merging Language - A Decade LaterDimitris Kolovos
 
Assessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
Assessing the Use of Eclipse MDE Technologies in Open-Source Software ProjectsAssessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
Assessing the Use of Eclipse MDE Technologies in Open-Source Software ProjectsDimitris Kolovos
 
Eclipse Modellng Forums: Looking at the Data
Eclipse Modellng Forums: Looking at the DataEclipse Modellng Forums: Looking at the Data
Eclipse Modellng Forums: Looking at the DataDimitris Kolovos
 
Adding Spreadsheets to the MDE Toolbox
Adding Spreadsheets to the MDE ToolboxAdding Spreadsheets to the MDE Toolbox
Adding Spreadsheets to the MDE ToolboxDimitris Kolovos
 
Managing XML documents with Epsilon
Managing XML documents with EpsilonManaging XML documents with Epsilon
Managing XML documents with EpsilonDimitris Kolovos
 
COMPASS Early Safety Warning System (ESWS)
COMPASS Early Safety Warning System (ESWS)COMPASS Early Safety Warning System (ESWS)
COMPASS Early Safety Warning System (ESWS)Dimitris Kolovos
 

More from Dimitris Kolovos (8)

Picto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T TransformationPicto: Model Visualisation via M2T Transformation
Picto: Model Visualisation via M2T Transformation
 
Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An...
Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An...Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An...
Re-Implementing Apache Thrift using Model-Driven Engineering Technologies: An...
 
Merging Models with the Epsilon Merging Language - A Decade Later
Merging Models with the Epsilon Merging Language - A Decade LaterMerging Models with the Epsilon Merging Language - A Decade Later
Merging Models with the Epsilon Merging Language - A Decade Later
 
Assessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
Assessing the Use of Eclipse MDE Technologies in Open-Source Software ProjectsAssessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
Assessing the Use of Eclipse MDE Technologies in Open-Source Software Projects
 
Eclipse Modellng Forums: Looking at the Data
Eclipse Modellng Forums: Looking at the DataEclipse Modellng Forums: Looking at the Data
Eclipse Modellng Forums: Looking at the Data
 
Adding Spreadsheets to the MDE Toolbox
Adding Spreadsheets to the MDE ToolboxAdding Spreadsheets to the MDE Toolbox
Adding Spreadsheets to the MDE Toolbox
 
Managing XML documents with Epsilon
Managing XML documents with EpsilonManaging XML documents with Epsilon
Managing XML documents with Epsilon
 
COMPASS Early Safety Warning System (ESWS)
COMPASS Early Safety Warning System (ESWS)COMPASS Early Safety Warning System (ESWS)
COMPASS Early Safety Warning System (ESWS)
 

Recently uploaded

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 

Recently uploaded (20)

ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 

The Epsilon Pattern Language

  • 1. The Epsilon Pattern Language Dimitris Kolovos, Richard Paige May 22, 2017 Department of Computer Science University of York 9th Workshop on Modelling in Software Engineering (MiSE) ICSE 2017, Buneos Aires, Argentina
  • 2. Pattern Matching • In general: finding sub-structures of interest within more complex structures • e.g. character sequences that look like email addresses • In modelling: finding sets of model elements that have certain properties and/or are connected in interesting ways 1
  • 3. Example: Attributes to Pull Up • Find pairs of attributes that can be moved up to a common supertype 2
  • 4. Declarative Pattern Matching • Describe patterns declaratively • Let the pattern matching engine figure out the optimal execution plan 1 1 from Arend et. al. – Henshin: Advanced Concepts and Tools for In-Place EMF Model Transformations, ACM/IEEE MoDELS 2010 3
  • 5. Declarative Pattern Matching Languages Strengths • Lots of room for behind-the-scene optimisation • Can be executed incrementally (speed/memory trade-off) Weaknesses • Complex patterns can be challenging/verbose to express graphically • Falling back to complex expressions can reduce the scope for optimisation/incrementality • Current execution planners are not great 4
  • 6. Practical Considerations • Bound to a particular modelling technology / model representation format • Non-negligible conversion cost • No support for patterns that involve elements from different (heterogeneous) models • e.g. UML activities and Simulink blocks • No out-of-the-box support for “exporting” the results of pattern matching to downstream activities (e.g. M2M, M2T) 5
  • 7. Epsilon Pattern Language • Hybrid OCL-based pattern matching language • Modelling-technology independent • Support for patterns that involve elements from multiple heterogeneous models • Support for “exporting” detected pattern instances to M2T, M2M transformations etc. 6
  • 9. Example: Attributes to Pull Up • Find pairs of attributes that can be moved up to a common supertype 8
  • 10. Finding Attributes to Pull Up using EPL pattern AttributesToPullUp c : EClass , a1 , a2 : EAttribute { match : a1.name = a2.name and a1.eType = a2.eType and a1 <> a2 and a1. eContainingClass . eAllSuperTypes .includes(c) and a2. eContainingClass . eAllSuperTypes .includes(c) } 9
  • 11. A More Performant Version pre { var attributes = EAttribute.all.mapBy(a|a.name ); } pattern AttributesToPullUp c : EClass , a1 : EAttribute , a2 : EAttribute from : attributes.get(a1.name ). excluding(a1) { match : a1.eType = a2.eType and a1. eContainingClass . eAllSuperTypes .includes(c) and a2. eContainingClass . eAllSuperTypes .includes(c) } 10
  • 12. Adding a Second Model • To specify attributes which should be ignored during pattern detection • The second model is an Excel spreadsheet with one worksheet called “Ignore” M class attribute . . . . . . Employee name . . . . . . C 11
  • 13. Pattern Matching on Two Models pre { var attributes = M!EAttribute.all.mapBy(a|a.name ); } pattern AttributesToPullUp c : M!EClass , a1 : M!EAttribute , a2 : M!EAttribute from : attributes.get(a1.name ). excluding(a1) guard : not a1.isIgnored() and not a2.isIgnored() { match : a1.eType = a2.eType and a1. eContainingClass . eAllSuperTypes .includes(c) and a2. eContainingClass . eAllSuperTypes .includes(c) } operation M!EAttribute isIgnored() { return C!Ignore.all.exists(i|i.attribute = self.name and i.class = self. eContainingClass .name ); } 12
  • 14. Consuming Pattern Instances • Pattern instances are wrapped as an EMC-compatible in-memory “model” • Patterns become types (e.g. AttributesToPullUp) • Roles become fields (e.g. c, a1, a2) • Other Epsilon programs can query and navigate them • To transform, validate them etc. • . . . even to detect patterns of patterns 13
  • 15. Pattern Matching in a Workflow <project default="main"> <target name="main"> <epsilon.emf.loadModel name="M" modelfile="model.ecore" metamodeluri="http://www.eclipse.org/emf/2002/Ecore"/> <epsilon.loadModel name="C" type="ExcelModel"> <parameter name="SPREADSHEET FILE" file="config.xlsx"/> </epsilon.loadModel> <epsilon.epl src="patterns.epl" exportas="P"> <model ref="M"/> <model ref="C"/> </epsilon.epl> <epsilon.eol> for (atp in P!AttributesToPullUp.all) { atp.c.name.println(); } <model ref="M"/><model ref="C"/><model ref="P"/> </epsilon.eol> </target > </project > 14
  • 16. Future Work • Experimental evaluation against GrGen.NET, Henshin, VIATRA/EMF-IncQuery, AGG etc. • Static analysis • Parallel and incremental pattern matching 15
  • 17. Summary • Hybrid OCL-based pattern matching language • Modelling-technology independent • Support for “exporting” detected patterns to downstream model management programs eclipse.org/epsilon 16