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

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
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
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
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
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

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