Made available under EPL 1.0
At last an OCL Debugger
EclipseCon Europe, Ludwigsburg
4th November 2015
Edward Willink
(Eclipse MMT co-lead)
Eclipse OCL lead
Eclipse QVTd lead
Eclipse QVTo committer
OMG OCL 2.5 RTF chair
OMG QVT 1.3 RTF chair
4-Nov-2015 At last an OCL Debugger 2Made available under EPL 1.0
Overview
OCL Context
Why a debugger is hard
EMF/Eclipse techniques
30-Sept-2014 OCL Integration and Debugging 3Made available under EPL 1.0
Models - Structure
Rich Models - Behavior
Applications
OCL Context
Ecore UML
OCLOCLinEcoreXcore
Ecore
+ Java
Programs
Declarative
Transformations
e.g. ATL, QVTr
Implementation Specification
Xtext
Xbase
Imperative
Transformations
e.g. QVTo
4-Nov-2015 At last an OCL Debugger 4Made available under EPL 1.0
Launching a Java Debugger
Java etc, new process
start program in debug mode (with arguments)
program acquires its data
single mouse selection + action
Java
Debugger
User
Program
Command Line
Debug Launcher
User
Data
loads
reads
4-Nov-2015 At last an OCL Debugger 5Made available under EPL 1.0
Launching an OCL Debugger
Independent OCL, new process
start OCL debugger (launch dialog)
select (load) a Constraint / Expression
select (load) some model objects
OCL
Debugger
OCL
constraint
Command Line
Debug Launcher
User
Models
4-Nov-2015 At last an OCL Debugger 7Made available under EPL 1.0
ResourceSet Discovery
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
EObjectsResourceSet ResourcesModeling
Application
ISelectionOCL
Application
selectionChanged
setSelection
4-Nov-2015 At last an OCL Debugger 8Made available under EPL 1.0
OCL
constraints
Ecore
constraints
EPackage
Validators
Validation
Registry
Diagnostian
OCL Injection
EMF Modeling Applications use Diagnostician
per-EPackage Validation Registry Java code
Additional menu actions can be contributed
OCL action can add additional OCL constraints
EObjectsResourceSet ResourcesModeling
Application
iterate
over
EObjectsResourceSet ResourcesModeling
Application
OCL Menu
Actionuse
OCL
Validators
install
click
4-Nov-2015 At last an OCL Debugger 10Made available under EPL 1.0
ResourceSet Discovery Demo
4-Nov-2015 At last an OCL Debugger 11Made available under EPL 1.0
OCL injection Demo
30-Sept-2014 OCL Integration and Debugging 12Made available under EPL 1.0
ConstraintsValidators
Validation
Registry
Diagnostian
Alternate Validation
Alternate validation, not necessarily OCL
discovers ResourceSet by shared selection
performs some or all validations
presents more detailed results more helpfully
EObjectsResourceSet ResourcesModeling
Application
iterate over
EObjectsResourceSet ResourcesModeling
Application
Validating
Application
use
use
30-Sept-2014 OCL Integration and Debugging 13Made available under EPL 1.0
EObjectsResources
Constraints
Validation
Registry
ValidatorsDiagnostian
Alternate Validation Debugging
Validating application is 'our' application
can use 'our' API to interact with debugger
just need to add a 'Debug' button
ResourceSet
Modeling
Application
iterate over
ResourceSet
Modeling
Application
Validating
Application
use
use
OCL
Debugger
30-Sept-2014 OCL Integration and Debugging 14Made available under EPL 1.0
Alternate Validation Demo
30-Sept-2014 OCL Integration and Debugging 15Made available under EPL 1.0
OCL Debugger Demo
4-Nov-2015 At last an OCL Debugger 16Made available under EPL 1.0
OCL Debugger
2013: Dresden OCL debugger
2014: Eclipse OCL/QVTi debugger (Luna)
Ecore OCL
Acceleo Eclipse QVTo
Pivot OCL
QVTi
Eclipse QVTr
QVTs
QVTp
QVTm
QVTu
Eclipse QVTc
Debugger
Debugger
Debugger
Eclipse Tools
Debugger
4-Nov-2015 At last an OCL Debugger 17Made available under EPL 1.0
Summary
OCL useless by itself
needs to complement something else
OCL Debugger useless by itself
needs to start in conjunction with something else
Eclipse / EMF provide helpful mechanisms
4-Nov-2015 At last an OCL Debugger 18Made available under EPL 1.0
OCL Overview
Executable specification language
used for the hard bits of UML, ...
simple model ops
if self <> null then self.name else 'no-self' endif
powerful collection operations
self.children->isUnique(name)
Side effect free
contributes to strong analysis and optimisation
Useless
needs a model providing environment

At Last an OCL Debugger

  • 1.
    Made available underEPL 1.0 At last an OCL Debugger EclipseCon Europe, Ludwigsburg 4th November 2015 Edward Willink (Eclipse MMT co-lead) Eclipse OCL lead Eclipse QVTd lead Eclipse QVTo committer OMG OCL 2.5 RTF chair OMG QVT 1.3 RTF chair
  • 2.
    4-Nov-2015 At lastan OCL Debugger 2Made available under EPL 1.0 Overview OCL Context Why a debugger is hard EMF/Eclipse techniques
  • 3.
    30-Sept-2014 OCL Integrationand Debugging 3Made available under EPL 1.0 Models - Structure Rich Models - Behavior Applications OCL Context Ecore UML OCLOCLinEcoreXcore Ecore + Java Programs Declarative Transformations e.g. ATL, QVTr Implementation Specification Xtext Xbase Imperative Transformations e.g. QVTo
  • 4.
    4-Nov-2015 At lastan OCL Debugger 4Made available under EPL 1.0 Launching a Java Debugger Java etc, new process start program in debug mode (with arguments) program acquires its data single mouse selection + action Java Debugger User Program Command Line Debug Launcher User Data loads reads
  • 5.
    4-Nov-2015 At lastan OCL Debugger 5Made available under EPL 1.0 Launching an OCL Debugger Independent OCL, new process start OCL debugger (launch dialog) select (load) a Constraint / Expression select (load) some model objects OCL Debugger OCL constraint Command Line Debug Launcher User Models
  • 6.
    4-Nov-2015 At lastan OCL Debugger 7Made available under EPL 1.0 ResourceSet Discovery 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 EObjectsResourceSet ResourcesModeling Application ISelectionOCL Application selectionChanged setSelection
  • 7.
    4-Nov-2015 At lastan OCL Debugger 8Made available under EPL 1.0 OCL constraints Ecore constraints EPackage Validators Validation Registry Diagnostian OCL Injection EMF Modeling Applications use Diagnostician per-EPackage Validation Registry Java code Additional menu actions can be contributed OCL action can add additional OCL constraints EObjectsResourceSet ResourcesModeling Application iterate over EObjectsResourceSet ResourcesModeling Application OCL Menu Actionuse OCL Validators install click
  • 8.
    4-Nov-2015 At lastan OCL Debugger 10Made available under EPL 1.0 ResourceSet Discovery Demo
  • 9.
    4-Nov-2015 At lastan OCL Debugger 11Made available under EPL 1.0 OCL injection Demo
  • 10.
    30-Sept-2014 OCL Integrationand Debugging 12Made available under EPL 1.0 ConstraintsValidators Validation Registry Diagnostian Alternate Validation Alternate validation, not necessarily OCL discovers ResourceSet by shared selection performs some or all validations presents more detailed results more helpfully EObjectsResourceSet ResourcesModeling Application iterate over EObjectsResourceSet ResourcesModeling Application Validating Application use use
  • 11.
    30-Sept-2014 OCL Integrationand Debugging 13Made available under EPL 1.0 EObjectsResources Constraints Validation Registry ValidatorsDiagnostian Alternate Validation Debugging Validating application is 'our' application can use 'our' API to interact with debugger just need to add a 'Debug' button ResourceSet Modeling Application iterate over ResourceSet Modeling Application Validating Application use use OCL Debugger
  • 12.
    30-Sept-2014 OCL Integrationand Debugging 14Made available under EPL 1.0 Alternate Validation Demo
  • 13.
    30-Sept-2014 OCL Integrationand Debugging 15Made available under EPL 1.0 OCL Debugger Demo
  • 14.
    4-Nov-2015 At lastan OCL Debugger 16Made available under EPL 1.0 OCL Debugger 2013: Dresden OCL debugger 2014: Eclipse OCL/QVTi debugger (Luna) Ecore OCL Acceleo Eclipse QVTo Pivot OCL QVTi Eclipse QVTr QVTs QVTp QVTm QVTu Eclipse QVTc Debugger Debugger Debugger Eclipse Tools Debugger
  • 15.
    4-Nov-2015 At lastan OCL Debugger 17Made available under EPL 1.0 Summary OCL useless by itself needs to complement something else OCL Debugger useless by itself needs to start in conjunction with something else Eclipse / EMF provide helpful mechanisms
  • 16.
    4-Nov-2015 At lastan OCL Debugger 18Made available under EPL 1.0 OCL Overview Executable specification language used for the hard bits of UML, ... simple model ops if self <> null then self.name else 'no-self' endif powerful collection operations self.children->isUnique(name) Side effect free contributes to strong analysis and optimisation Useless needs a model providing environment