SlideShare une entreprise Scribd logo
1  sur  28
Embedded OCL Integration and 
Debugging 
Edward Willink 
Willink Transformations Ltd 
Eclipse Foundation 
MMT Component co-Lead 
OCL Project Lead 
QVTd Project Lead 
QVTo Committer 
OMG (Model Driven Solutions) 
OCL 2.3, 2.4 (2.5) RTF Chair 
QVT 1.2, 1.3 RTF Chair 
OCL 2014 @ MODELS 2014 
30th September 2014 
Made available under EPL 1.0
Overview 
OCL Debugging 
source code stepping / visualization 
OCL Integration 
use of OCL as part of a (much) larger application 
Integrated OCL Debugging 
diagnosing OCL problems in the larger application 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 2
OCL Debugger 
2013: Dresden OCL debugger 
2014: Eclipse OCL/QVTi debugger (Luna) 
Ecore OCL 
Acceleo Eclipse QVTo 
Pivot OCL 
QVTi 
QVTs 
QVTp 
QVTm 
QVTu 
Eclipse QVTr 
Debugger 
Debugger 
Eclipse QVTc 
Debugger 
Debugger 
Eclipse Tools 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 3
Launching a Debugger 
Java etc, new process 
start program in debug mode (with arguments) 
program acquires its data 
Independent OCL, new process 
start OCL debugger (launch dialog) 
select (load) a Constraint / Expression 
select (load) some model objects 
Integrated OCL, ongoing process 
select (re-use) a Constraint / Expression 
select (re-use) some model objects 
start debugger 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 4
OCL Context 
Models OCL 
Complete OCL 
Parser Evaluator Editor Debugger 
OCL useless by itself - no model access 
Complete OCL - provides model access 
Useful for learning / practice 
Real models, real problems, real applications? 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 5
Applications with embedded OCL 
Model API Models 
OCL API 
Embedded 
OCL 
Application 
Parser Evaluator 
EMF model API - de facto standard 
Embedded OCL 
UML - via Constraints 
(EMOF - via magic) 
Ecore - via EAnnotations 
OCL API - tool/vendor-specific 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 6
Debugging approaches 
Application 
Model API Models 
OCL API 
? 
Parser Evaluator OCL Debugger 
Host Debugger 
Use host debugger 
verbose/semi-readable tooling code 
Use 'printf' - e.g. oclLog() 
massive log files 
Embedded 
OCL 
Practice expressions in an independent console 
replicate application content externally 
Use independent debugger 
replicate application content externally 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 7
Independent Debugger 
Model API Models 
OCL API 
Embedded 
OCL 
Evaluator 
Models OCL 
Complete OCL 
reload 
transcribe 
Parser, Evaluator, Editor, Debugger 
Real Application Independent Debugger 
Application 
Reload models, transcribe OCL 
No break points to help locate problem 
Hard to select code to debug 
Different evaluator/models/... 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 8
Debugging Use Cases 
Simple Object Re-use 
OCL injection 
OCL constraints 
Alternate validation 
Embedded execution 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 9
Simple Object Reuse(1) 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 10
Simple Object Reuse(2) 
Modeling ResourceSet Resources EObjects 
Application 
Resources EObjects 
selectionChanged 
setSelection 
OCL ISelection 
Application 
EMF Modeling Applications use EMF EObjects 
UI applications share selections 
e.g. editor selection to outline view 
OCL application can listen to selection changes 
reuse EObject 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 11
Simple Object Reuse Debugging 
Modeling ResourceSet Resources EObjects 
Application 
Resources EObjects 
selectionChanged 
setSelection 
OCL ISelection 
Application 
OCL 
Debugger 
OCL application (Console) 
reuses application objects 
reloads/retypes constraint 
Debug button to execute constraint 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 12
OCL injection (1) 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 13
OCL Injection(2) 
EPackage 
ResourceSet RReessoouurrcceess EEOObbjejecctsts Modeling 
Application Resources EObjects 
Validation 
Registry 
Diagnostian Validators 
install 
use Action 
iterate 
over 
OCL Menu 
Ecore 
constraints 
OCL 
EEEOOObbbjejjeeccctsttss 
constraints 
OCL 
Validators 
click 
Modeling 
ResourceSet Resources EObjects 
Application 
RReessoouurrcceess Resources EEOObbjejecctsts EObjects 
EMF Modeling Applications use Diagnostician 
per-EPackage Validation Registry Java code 
Additional menu actions can be contributed 
OCL action can add additional OCL constraints 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 14
OCL Injection Debugging 
No OCL application for debugger to extend 
see later 
explain OCL constraints first 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 15
OCL Constraints (1) 
Ecore Constraint 
hand-coded Java - compiled models only 
EMF Delegated Constraint 
code replaced by two strings 
delegate URI - selects the delegate technology 
e.g. "http://www.eclipse.org/emf/2002/Ecore/OCL" 
technology-specific constraint body 
e.g. "loans->size() <= 2" 
at run-time 
delegate registry provides relevant language support 
language support parses and executes the body 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 16
OCL Constraints (2) 
<eClassifiers xsi:type="ecore:EClass" name="Member"> 
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> 
<details key="constraints" value="AtMostTwoLoans UniqueLoans"/> 
</eAnnotations> 
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL"> 
<details key="AtMostTwoLoans" value="loans->size() &lt;= 2"/> 
<details key="UniqueLoans" value="loans->isUnique(book)"/> 
</eAnnotations> 
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" lowerBound="1" 
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 17
OCL Constraints (3) 
OCLinEcore editor 
unified view of model and constraints 
hides the underlying integration complexities 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 18
OCL Constraint debugging 
EObject 
eClass 
EClass 
validateUniqueLoans(...) 
EAnnotation 
eAnnotations 
role: 'Ecore constraint' 
name: 'UniqueLoans' 
URI: 'http://www.eclipse.org/emf/2002/Ecore/OCL' 
body: 'loans->isUnique(book)' 
Delegate 
Registry 
OCL Delegate 
Registration 
OCL Parser 
Evaluator 
OCL 
Debugger 
EMF validation uses generated validateXXX(...) 
hand-coded Java 
or delegated Strings to e.g. OCL support 
which may include debugging 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 19
Alternate Validation (1) 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 20
Alternate Validation(2) 
use 
Modeling 
Application ResourceSet Validation 
RReessoouurrcceess Resources CoEnOsbtrjaeicnttss 
EEOObbjejecctsts Diagnostian Registry Validators 
iterate over 
Validating 
Application 
use 
Modeling 
ResourceSet Resources EObjects 
Application 
RReessoouurrcceess Resources EEOObbjejecctsts EObjects 
Alternate validation, not necessarily OCL 
discovers ResourceSet by shared selection 
performs some or all validations 
presents more detailed results more helpfully 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 21
Alternate Validation Debugging 
use 
OCL 
Debugger 
Modeling 
Application ResourceSet Validation 
RReessoouurrcceess Resources CoEnOsbtrjaeicnttss 
EEOObbjejecctsts Diagnostian Registry Validators 
iterate over 
Validating 
Application 
use 
Modeling 
ResourceSet Resources EObjects 
Application 
RReessoouurrcceess Resources EEOObbjejecctsts EObjects 
Validating application is 'our' application 
can use 'our' API to interact with debugger 
just need to add a 'Debug' button 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 22
Integrated OCL Debugger (1) 
Model API Models 
OCL API 
Embedded 
OCL 
Application 
OCL Evaluator 
Application exploits OCL API 
vendor-specific 
no sign of any standard 
Vendor has not supplied a debugger 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 23
Integrated OCL Debugger (2) 
Model API Models 
OCL API 
Embedded 
OCL 
Application 
Evaluator 
OCL Evaluator, 
OCL Debugger 
Uses EMF de facto API 
Evaluator/Interpreter can watch for breakpoints 
even if application not in debug mode 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 24
Integrated OCL Debugger (3) 
Model API Models 
Embedded 
OCL 
Application 
Generated 
OCL code 
Host Debugger 
OCL Debugger 
Interpreted OCL is inefficient 
generated (Java) code much better 
but only semi-readable 
Must enhance host debugger 
shoud be possible in Eclipse 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 25
Integrated debugging summary 
Add debug button to OCL application 
Simple Object Re-use (Eclipse OCL Luna) 
Alternate validation (Eclipse OCL Luna) 
OCL evaluator enhanced by debug capabilities 
OCL injection (experimental) 
OCL constraints (experimental) 
Integrated interpreted execution (experimental) 
Host debugger enhanced with OCL relevance 
Integrated compiled execution (one day) 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 26
Integration enablers 
Eclipse platform 
multiple applications 
shared menu selection 
plugin registrations and extension points 
additional menu actions 
EMF 
de facto modeling API 
selection -> EObject -> Resource -> ResourceSet traversal 
standard extensible validation 
delegation of validate, get, invoke for model objects 
(Eclipse) OCL (Ecore/UML or Pivot) 
implements delegation plugin 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 27
Summary 
Integration 
non-extra-tooling support for OCL 
Debugging 
independent 
dependent 
reuse models 
reuse constraints 
reuse activation 
Future:... OCL enhanced Host Debugger 
30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 28

Contenu connexe

Tendances

Prospector Osq 2004 Final
Prospector Osq 2004 FinalProspector Osq 2004 Final
Prospector Osq 2004 Final
kurniawan.kuga
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!
melbats
 
Chapter 11 Function
Chapter 11 FunctionChapter 11 Function
Chapter 11 Function
Deepak Singh
 
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
JonasHelming
 
Functional programming in scala
Functional programming in scalaFunctional programming in scala
Functional programming in scala
Stratio
 

Tendances (20)

Java 8 new features
Java 8 new featuresJava 8 new features
Java 8 new features
 
JDT Embraces Lambda Expressions - EclipseCon North America 2014
JDT Embraces Lambda Expressions - EclipseCon North America 2014JDT Embraces Lambda Expressions - EclipseCon North America 2014
JDT Embraces Lambda Expressions - EclipseCon North America 2014
 
Eclipse and Java 8 - Eclipse Day India 2013
Eclipse and Java 8 - Eclipse Day India 2013Eclipse and Java 8 - Eclipse Day India 2013
Eclipse and Java 8 - Eclipse Day India 2013
 
A Brief Conceptual Introduction to Functional Java 8 and its API
A Brief Conceptual Introduction to Functional Java 8 and its APIA Brief Conceptual Introduction to Functional Java 8 and its API
A Brief Conceptual Introduction to Functional Java 8 and its API
 
Prospector Osq 2004 Final
Prospector Osq 2004 FinalProspector Osq 2004 Final
Prospector Osq 2004 Final
 
Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...
Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...
Developing a new Epsilon Language through Grammar Extension: The Epsilon Dem...
 
Automatic Migration of Legacy Java Method Implementations to Interfaces
Automatic Migration of Legacy Java Method Implementations to InterfacesAutomatic Migration of Legacy Java Method Implementations to Interfaces
Automatic Migration of Legacy Java Method Implementations to Interfaces
 
SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!SiriusCon 2015 - Breathe Life into Your Designer!
SiriusCon 2015 - Breathe Life into Your Designer!
 
Developing a new Epsilon Language through Annotations: TestLang
Developing a new Epsilon Language through Annotations: TestLangDeveloping a new Epsilon Language through Annotations: TestLang
Developing a new Epsilon Language through Annotations: TestLang
 
EclipseCon France 2016 - Sirius 4.0: Let me Sirius that for you!
EclipseCon France 2016 - Sirius 4.0: Let me Sirius that for you!EclipseCon France 2016 - Sirius 4.0: Let me Sirius that for you!
EclipseCon France 2016 - Sirius 4.0: Let me Sirius that for you!
 
Java 8 - An Overview
Java 8 - An OverviewJava 8 - An Overview
Java 8 - An Overview
 
Eclipse Tips & Tricks - EclipseCon North America 2014
Eclipse Tips & Tricks - EclipseCon North America 2014Eclipse Tips & Tricks - EclipseCon North America 2014
Eclipse Tips & Tricks - EclipseCon North America 2014
 
Introduction To Functional Programming
Introduction To Functional ProgrammingIntroduction To Functional Programming
Introduction To Functional Programming
 
Pure functions and usage in Angular
Pure functions and usage in AngularPure functions and usage in Angular
Pure functions and usage in Angular
 
Chapter 11 Function
Chapter 11 FunctionChapter 11 Function
Chapter 11 Function
 
Functional Programming in Python
Functional Programming in PythonFunctional Programming in Python
Functional Programming in Python
 
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
 
Scilab optimization workshop
Scilab optimization workshop Scilab optimization workshop
Scilab optimization workshop
 
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
 
Functional programming in scala
Functional programming in scalaFunctional programming in scala
Functional programming in scala
 

En vedette

La &amp; edm in practice
La &amp; edm in practiceLa &amp; edm in practice
La &amp; edm in practice
bharati k
 
SysML adoption in France
SysML adoption in FranceSysML adoption in France
SysML adoption in France
Pascal Roques
 
01072013 e governance
01072013 e governance01072013 e governance
01072013 e governance
bharati k
 
Vbisigk
VbisigkVbisigk
Vbisigk
ISIG
 
Environnement de développement de bases de données
Environnement de développement de bases de donnéesEnvironnement de développement de bases de données
Environnement de développement de bases de données
ISIG
 

En vedette (20)

La &amp; edm in practice
La &amp; edm in practiceLa &amp; edm in practice
La &amp; edm in practice
 
Modeling the OCL Standard Library
Modeling the OCL Standard LibraryModeling the OCL Standard Library
Modeling the OCL Standard Library
 
Cvl
CvlCvl
Cvl
 
Ressource numérique Circuit électrique au primaire
Ressource numérique Circuit électrique au primaire Ressource numérique Circuit électrique au primaire
Ressource numérique Circuit électrique au primaire
 
Model Transformation A Personal Perspective
Model Transformation A Personal PerspectiveModel Transformation A Personal Perspective
Model Transformation A Personal Perspective
 
Collaboration and Governance of Open Source Projects
Collaboration and Governance of Open Source ProjectsCollaboration and Governance of Open Source Projects
Collaboration and Governance of Open Source Projects
 
Java vs .Net
Java vs .NetJava vs .Net
Java vs .Net
 
The Importance of Opposites
The Importance of OppositesThe Importance of Opposites
The Importance of Opposites
 
What fUML can bring to MBSE?
What fUML can bring to MBSE?What fUML can bring to MBSE?
What fUML can bring to MBSE?
 
النشاط العلمي - الكهرباء
النشاط العلمي  -   الكهرباءالنشاط العلمي  -   الكهرباء
النشاط العلمي - الكهرباء
 
SysML adoption in France
SysML adoption in FranceSysML adoption in France
SysML adoption in France
 
01072013 e governance
01072013 e governance01072013 e governance
01072013 e governance
 
Vbisigk
VbisigkVbisigk
Vbisigk
 
OCL Specification Status
OCL Specification StatusOCL Specification Status
OCL Specification Status
 
Frame latency evaluation: when simulation and analysis alone are not enough
Frame latency evaluation: when simulation and analysis alone are not enoughFrame latency evaluation: when simulation and analysis alone are not enough
Frame latency evaluation: when simulation and analysis alone are not enough
 
Environnement de développement de bases de données
Environnement de développement de bases de donnéesEnvironnement de développement de bases de données
Environnement de développement de bases de données
 
OCL 2.5 plans
OCL 2.5 plansOCL 2.5 plans
OCL 2.5 plans
 
Yet Another Three QVT Languages
Yet Another Three QVT LanguagesYet Another Three QVT Languages
Yet Another Three QVT Languages
 
Model Transformation: A survey of the state of the art
Model Transformation: A survey of the state of the artModel Transformation: A survey of the state of the art
Model Transformation: A survey of the state of the art
 
Be serious with sirius your journey from first experimentation to large deplo...
Be serious with sirius your journey from first experimentation to large deplo...Be serious with sirius your journey from first experimentation to large deplo...
Be serious with sirius your journey from first experimentation to large deplo...
 

Similaire à Embedded OCL Integration and Debugging

Enriching your models with OCL
Enriching your models with OCLEnriching your models with OCL
Enriching your models with OCL
University of York
 
2010 06 22 omg - obeo
2010 06 22   omg - obeo2010 06 22   omg - obeo
2010 06 22 omg - obeo
Etienne Juliot
 
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test SuiteProcessor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
DVClub
 

Similaire à Embedded OCL Integration and Debugging (20)

OCL 2019 Keynote Retrospective and Prospective
OCL 2019 Keynote Retrospective and ProspectiveOCL 2019 Keynote Retrospective and Prospective
OCL 2019 Keynote Retrospective and Prospective
 
OCL in EMF
OCL in EMFOCL in EMF
OCL in EMF
 
Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...Applicative Logic Meta-Programming as the foundation for Template-based Progr...
Applicative Logic Meta-Programming as the foundation for Template-based Progr...
 
IncQuery gets Sirius: faster and better diagrams
IncQuery gets Sirius: faster and better diagramsIncQuery gets Sirius: faster and better diagrams
IncQuery gets Sirius: faster and better diagrams
 
A logic foundation for template-based program transformation in Eclipse
A logic foundation for template-based program transformation in EclipseA logic foundation for template-based program transformation in Eclipse
A logic foundation for template-based program transformation in Eclipse
 
Eclipse 2011 Hot Topics
Eclipse 2011 Hot TopicsEclipse 2011 Hot Topics
Eclipse 2011 Hot Topics
 
Enriching your models with OCL
Enriching your models with OCLEnriching your models with OCL
Enriching your models with OCL
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ Rheinjug
 
2010 06 22 omg - obeo
2010 06 22   omg - obeo2010 06 22   omg - obeo
2010 06 22 omg - obeo
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
 
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4
 
OCL - The Bigger Picture
OCL - The Bigger PictureOCL - The Bigger Picture
OCL - The Bigger Picture
 
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformjavagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platform
 
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test SuiteProcessor Verification Using Open Source Tools and the GCC Regression Test Suite
Processor Verification Using Open Source Tools and the GCC Regression Test Suite
 
Fast, Faster and Super-Fast Queries
Fast, Faster and Super-Fast QueriesFast, Faster and Super-Fast Queries
Fast, Faster and Super-Fast Queries
 
Introduction to embedded sql for NonStop SQL
Introduction to embedded sql for NonStop SQLIntroduction to embedded sql for NonStop SQL
Introduction to embedded sql for NonStop SQL
 
Eclipse Day India 2015 - Unleashing the Java 8 Tooling in Eclipse
Eclipse Day India 2015 - Unleashing the Java 8 Tooling in EclipseEclipse Day India 2015 - Unleashing the Java 8 Tooling in Eclipse
Eclipse Day India 2015 - Unleashing the Java 8 Tooling in Eclipse
 
OpenDaylight Developer Experience 2.0
 OpenDaylight Developer Experience 2.0 OpenDaylight Developer Experience 2.0
OpenDaylight Developer Experience 2.0
 
Acceleo Best Practices - Obeo.pdf
Acceleo Best Practices - Obeo.pdfAcceleo Best Practices - Obeo.pdf
Acceleo Best Practices - Obeo.pdf
 

Plus de Edward Willink

Plus de Edward Willink (13)

An OCL Map Type
An OCL Map TypeAn OCL Map Type
An OCL Map Type
 
OCL Visualization A Reality Check
OCL Visualization A Reality CheckOCL Visualization A Reality Check
OCL Visualization A Reality Check
 
A text model - Use your favourite M2M for M2T
A text model - Use your favourite M2M for M2TA text model - Use your favourite M2M for M2T
A text model - Use your favourite M2M for M2T
 
Shadow Objects
Shadow ObjectsShadow Objects
Shadow Objects
 
Commutative Short Circuit Operators
Commutative Short Circuit OperatorsCommutative Short Circuit Operators
Commutative Short Circuit Operators
 
Deterministic Lazy Mutable OCL Collections
Deterministic Lazy Mutable OCL CollectionsDeterministic Lazy Mutable OCL Collections
Deterministic Lazy Mutable OCL Collections
 
The Micromapping Model of Computation
The Micromapping Model of ComputationThe Micromapping Model of Computation
The Micromapping Model of Computation
 
Optimized declarative transformation First Eclipse QVTc results
Optimized declarative transformation First Eclipse QVTc resultsOptimized declarative transformation First Eclipse QVTc results
Optimized declarative transformation First Eclipse QVTc results
 
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
 
UMLX and QVT and ATL
UMLX and QVT and ATLUMLX and QVT and ATL
UMLX and QVT and ATL
 
Enrich Your Models With OCL
Enrich Your Models With OCLEnrich Your Models With OCL
Enrich Your Models With OCL
 
Re-engineering Eclipse MDT/OCL for Xtext
Re-engineering Eclipse MDT/OCL for XtextRe-engineering Eclipse MDT/OCL for Xtext
Re-engineering Eclipse MDT/OCL for Xtext
 
Enriching Your Models with OCL
Enriching Your Models with OCLEnriching Your Models with OCL
Enriching Your Models with OCL
 

Dernier

IATA GEOGRAPHY AREAS in the world, HM111
IATA GEOGRAPHY AREAS in the world, HM111IATA GEOGRAPHY AREAS in the world, HM111
IATA GEOGRAPHY AREAS in the world, HM111
2022472524
 
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girlsbhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
mountabuangels4u
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
 
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
mountabuangels4u
 
Bhavnagar Escort💋 Call Girl (Komal) Service #Bhavnagar Call Girl @Independent...
Bhavnagar Escort💋 Call Girl (Komal) Service #Bhavnagar Call Girl @Independent...Bhavnagar Escort💋 Call Girl (Komal) Service #Bhavnagar Call Girl @Independent...
Bhavnagar Escort💋 Call Girl (Komal) Service #Bhavnagar Call Girl @Independent...
mountabuangels4u
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
 

Dernier (20)

IATA GEOGRAPHY AREAS in the world, HM111
IATA GEOGRAPHY AREAS in the world, HM111IATA GEOGRAPHY AREAS in the world, HM111
IATA GEOGRAPHY AREAS in the world, HM111
 
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girlsbhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
bhachau Escort💋 Call Girl (Ramya) Service #bhachau Call Girl @Independent Girls
 
Discover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdfDiscover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdf
 
Daman Escorts 🥰 8617370543 Call Girls Offer VIP Hot Girls
Daman Escorts 🥰 8617370543 Call Girls Offer VIP Hot GirlsDaman Escorts 🥰 8617370543 Call Girls Offer VIP Hot Girls
Daman Escorts 🥰 8617370543 Call Girls Offer VIP Hot Girls
 
Kashipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Kashipur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelKashipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Kashipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Overview of Lesotho 's natural beauty tourist attractions
Overview of Lesotho 's natural beauty tourist attractionsOverview of Lesotho 's natural beauty tourist attractions
Overview of Lesotho 's natural beauty tourist attractions
 
Top places to visit, top tourist destinations
Top places to visit, top tourist destinationsTop places to visit, top tourist destinations
Top places to visit, top tourist destinations
 
Siliguri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Siliguri Call Girls 🥰 8617370543 Service Offer VIP Hot ModelSiliguri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Siliguri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
 
Paschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Paschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot ModelPaschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Paschim Medinipur Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
TOURISM ATTRACTION IN LESOTHO 2024.pptx.
TOURISM ATTRACTION IN LESOTHO 2024.pptx.TOURISM ATTRACTION IN LESOTHO 2024.pptx.
TOURISM ATTRACTION IN LESOTHO 2024.pptx.
 
Dimapur‎ Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Dimapur‎ Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDimapur‎ Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Dimapur‎ Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Tehri Garhwal Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Tehri Garhwal Call Girls 🥰 8617370543 Service Offer VIP Hot ModelTehri Garhwal Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Tehri Garhwal Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Jalpaiguri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Jalpaiguri Call Girls 🥰 8617370543 Service Offer VIP Hot ModelJalpaiguri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Jalpaiguri Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Bhavnagar Escort💋 Call Girl (Komal) Service #Bhavnagar Call Girl @Independent...
Bhavnagar Escort💋 Call Girl (Komal) Service #Bhavnagar Call Girl @Independent...Bhavnagar Escort💋 Call Girl (Komal) Service #Bhavnagar Call Girl @Independent...
Bhavnagar Escort💋 Call Girl (Komal) Service #Bhavnagar Call Girl @Independent...
 
Ramnagar Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Ramnagar Call Girls 🥰 8617370543 Service Offer VIP Hot ModelRamnagar Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Ramnagar Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Alipurduar Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Alipurduar Call Girls 🥰 8617370543 Service Offer VIP Hot ModelAlipurduar Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Alipurduar Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
A high-altitude adventure in the mountain kingdom
A high-altitude adventure in the mountain kingdomA high-altitude adventure in the mountain kingdom
A high-altitude adventure in the mountain kingdom
 

Embedded OCL Integration and Debugging

  • 1. Embedded OCL Integration and Debugging Edward Willink Willink Transformations Ltd Eclipse Foundation MMT Component co-Lead OCL Project Lead QVTd Project Lead QVTo Committer OMG (Model Driven Solutions) OCL 2.3, 2.4 (2.5) RTF Chair QVT 1.2, 1.3 RTF Chair OCL 2014 @ MODELS 2014 30th September 2014 Made available under EPL 1.0
  • 2. Overview OCL Debugging source code stepping / visualization OCL Integration use of OCL as part of a (much) larger application Integrated OCL Debugging diagnosing OCL problems in the larger application 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 2
  • 3. OCL Debugger 2013: Dresden OCL debugger 2014: Eclipse OCL/QVTi debugger (Luna) Ecore OCL Acceleo Eclipse QVTo Pivot OCL QVTi QVTs QVTp QVTm QVTu Eclipse QVTr Debugger Debugger Eclipse QVTc Debugger Debugger Eclipse Tools 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 3
  • 4. Launching a Debugger Java etc, new process start program in debug mode (with arguments) program acquires its data Independent OCL, new process start OCL debugger (launch dialog) select (load) a Constraint / Expression select (load) some model objects Integrated OCL, ongoing process select (re-use) a Constraint / Expression select (re-use) some model objects start debugger 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 4
  • 5. OCL Context Models OCL Complete OCL Parser Evaluator Editor Debugger OCL useless by itself - no model access Complete OCL - provides model access Useful for learning / practice Real models, real problems, real applications? 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 5
  • 6. Applications with embedded OCL Model API Models OCL API Embedded OCL Application Parser Evaluator EMF model API - de facto standard Embedded OCL UML - via Constraints (EMOF - via magic) Ecore - via EAnnotations OCL API - tool/vendor-specific 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 6
  • 7. Debugging approaches Application Model API Models OCL API ? Parser Evaluator OCL Debugger Host Debugger Use host debugger verbose/semi-readable tooling code Use 'printf' - e.g. oclLog() massive log files Embedded OCL Practice expressions in an independent console replicate application content externally Use independent debugger replicate application content externally 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 7
  • 8. Independent Debugger Model API Models OCL API Embedded OCL Evaluator Models OCL Complete OCL reload transcribe Parser, Evaluator, Editor, Debugger Real Application Independent Debugger Application Reload models, transcribe OCL No break points to help locate problem Hard to select code to debug Different evaluator/models/... 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 8
  • 9. Debugging Use Cases Simple Object Re-use OCL injection OCL constraints Alternate validation Embedded execution 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 9
  • 10. Simple Object Reuse(1) 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 10
  • 11. Simple Object Reuse(2) Modeling ResourceSet Resources EObjects Application Resources EObjects selectionChanged setSelection OCL ISelection Application EMF Modeling Applications use EMF EObjects UI applications share selections e.g. editor selection to outline view OCL application can listen to selection changes reuse EObject 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 11
  • 12. Simple Object Reuse Debugging Modeling ResourceSet Resources EObjects Application Resources EObjects selectionChanged setSelection OCL ISelection Application OCL Debugger OCL application (Console) reuses application objects reloads/retypes constraint Debug button to execute constraint 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 12
  • 13. OCL injection (1) 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 13
  • 14. OCL Injection(2) EPackage ResourceSet RReessoouurrcceess EEOObbjejecctsts Modeling Application Resources EObjects Validation Registry Diagnostian Validators install use Action iterate over OCL Menu Ecore constraints OCL EEEOOObbbjejjeeccctsttss constraints OCL Validators click Modeling ResourceSet Resources EObjects Application RReessoouurrcceess Resources EEOObbjejecctsts EObjects EMF Modeling Applications use Diagnostician per-EPackage Validation Registry Java code Additional menu actions can be contributed OCL action can add additional OCL constraints 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 14
  • 15. OCL Injection Debugging No OCL application for debugger to extend see later explain OCL constraints first 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 15
  • 16. OCL Constraints (1) Ecore Constraint hand-coded Java - compiled models only EMF Delegated Constraint code replaced by two strings delegate URI - selects the delegate technology e.g. "http://www.eclipse.org/emf/2002/Ecore/OCL" technology-specific constraint body e.g. "loans->size() <= 2" at run-time delegate registry provides relevant language support language support parses and executes the body 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 16
  • 17. OCL Constraints (2) <eClassifiers xsi:type="ecore:EClass" name="Member"> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> <details key="constraints" value="AtMostTwoLoans UniqueLoans"/> </eAnnotations> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL"> <details key="AtMostTwoLoans" value="loans->size() &lt;= 2"/> <details key="UniqueLoans" value="loans->isUnique(book)"/> </eAnnotations> <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 17
  • 18. OCL Constraints (3) OCLinEcore editor unified view of model and constraints hides the underlying integration complexities 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 18
  • 19. OCL Constraint debugging EObject eClass EClass validateUniqueLoans(...) EAnnotation eAnnotations role: 'Ecore constraint' name: 'UniqueLoans' URI: 'http://www.eclipse.org/emf/2002/Ecore/OCL' body: 'loans->isUnique(book)' Delegate Registry OCL Delegate Registration OCL Parser Evaluator OCL Debugger EMF validation uses generated validateXXX(...) hand-coded Java or delegated Strings to e.g. OCL support which may include debugging 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 19
  • 20. Alternate Validation (1) 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 20
  • 21. Alternate Validation(2) use Modeling Application ResourceSet Validation RReessoouurrcceess Resources CoEnOsbtrjaeicnttss EEOObbjejecctsts Diagnostian Registry Validators iterate over Validating Application use Modeling ResourceSet Resources EObjects Application RReessoouurrcceess Resources EEOObbjejecctsts EObjects Alternate validation, not necessarily OCL discovers ResourceSet by shared selection performs some or all validations presents more detailed results more helpfully 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 21
  • 22. Alternate Validation Debugging use OCL Debugger Modeling Application ResourceSet Validation RReessoouurrcceess Resources CoEnOsbtrjaeicnttss EEOObbjejecctsts Diagnostian Registry Validators iterate over Validating Application use Modeling ResourceSet Resources EObjects Application RReessoouurrcceess Resources EEOObbjejecctsts EObjects Validating application is 'our' application can use 'our' API to interact with debugger just need to add a 'Debug' button 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 22
  • 23. Integrated OCL Debugger (1) Model API Models OCL API Embedded OCL Application OCL Evaluator Application exploits OCL API vendor-specific no sign of any standard Vendor has not supplied a debugger 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 23
  • 24. Integrated OCL Debugger (2) Model API Models OCL API Embedded OCL Application Evaluator OCL Evaluator, OCL Debugger Uses EMF de facto API Evaluator/Interpreter can watch for breakpoints even if application not in debug mode 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 24
  • 25. Integrated OCL Debugger (3) Model API Models Embedded OCL Application Generated OCL code Host Debugger OCL Debugger Interpreted OCL is inefficient generated (Java) code much better but only semi-readable Must enhance host debugger shoud be possible in Eclipse 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 25
  • 26. Integrated debugging summary Add debug button to OCL application Simple Object Re-use (Eclipse OCL Luna) Alternate validation (Eclipse OCL Luna) OCL evaluator enhanced by debug capabilities OCL injection (experimental) OCL constraints (experimental) Integrated interpreted execution (experimental) Host debugger enhanced with OCL relevance Integrated compiled execution (one day) 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 26
  • 27. Integration enablers Eclipse platform multiple applications shared menu selection plugin registrations and extension points additional menu actions EMF de facto modeling API selection -> EObject -> Resource -> ResourceSet traversal standard extensible validation delegation of validate, get, invoke for model objects (Eclipse) OCL (Ecore/UML or Pivot) implements delegation plugin 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 27
  • 28. Summary Integration non-extra-tooling support for OCL Debugging independent dependent reuse models reuse constraints reuse activation Future:... OCL enhanced Host Debugger 30-Sept-2014 OCL Integration and Debugging Made available under EPL 1.0 28