SlideShare a Scribd company logo
Made available under EPL 2.0
OCL Visualization
A Reality Check
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, 1.4 RTF Chair
OCL 2019 @ MODELS 2019
16th September 2019
16-September-2019 OCL Visualization - A Reality Check 2Made available under EPL 2.0
Overview
Background
Traditional AST visualization
vOCL 2018 problems
Fixed vOCL
Eclipse QVTs visualization
Constraint Diagram
Visual OCL
Summary / Conclusion
16-September-2019 OCL Visualization - A Reality Check 3Made available under EPL 2.0
Background
Text can be good
Pictures can be good
Text can be better
Pictures can be better
Text dominant for expressions (except SDL)
UML graphical – why no graphical OCL ?
OCL 2018 => vOCL paper worth discussion
reviewer's / audience criticisms not rebutted
16-September-2019 OCL Visualization - A Reality Check 4Made available under EPL 2.0
Running Example
Example constraint
context Hospital
inv uniquePatientId:
self.patients->forAll(p1, p2 |
p1 <> p2 implies p1.id <> p2.id)
Equivalent to
context Hospital
inv uniquePatientId:
self.patients->isUnique(id)
16-September-2019 OCL Visualization - A Reality Check 5Made available under EPL 2.0
Traditional AST
Visualization
UML-like
solid containment
dashed references
18 nodes, 22 edges
16-September-2019 OCL Visualization - A Reality Check 6Made available under EPL 2.0
vOCL
Traditional AST is instance-based
instances of OCL metamodel
requires knowledge of OCL internals
references by name to user metamodel
vOCL is class-based
re-uses user metamodel to define variables
mnemonic icons for common OCL operations
vOCL constraint is a doodle on the class diagram
new doodling semantics
16-September-2019 OCL Visualization - A Reality Check 7Made available under EPL 2.0
vOCL example from 2018 paper
blob is the self instance of the not-grayed class
ellipses use Class-typed reference properties
rounded rectangles use DataType properties
additional icons for OCL operations
arrows denote 'reading order'
vague semantics
16-September-2019 OCL Visualization - A Reality Check 8Made available under EPL 2.0
AST visualization
of vOCL example
green reading order
markup
blob - self - ok
....patients - ok
....size() - ok
....<= - lhs ok
<= ... - rhs inverted
pragmatic
self.beds backwards
16-September-2019 OCL Visualization - A Reality Check 9Made available under EPL 2.0
Fixed vOCL example
Multiple paths for multiple instances/evaluations
Blob now starts two paths
black path as in original paper to read the LHS
self.patients.size() <=
new green path to read the RHS
self.beds >=
both paths read towards the binary <= operation
16-September-2019 OCL Visualization - A Reality Check 10Made available under EPL 2.0
AST visualization
of fixed vOCL example
two blobs
two bottom-up paths
'reading order' is
now AST evaluation
blob defines 'self' value
edge passes value
node computes value
16-September-2019 OCL Visualization - A Reality Check 11Made available under EPL 2.0
Running example using Fixed vOCL
Blobs identify three variables starting five paths
self.patients
self.patients.id <> implies
self.patients.id <> implies
self.patients <> implies
self.patients <> implies
Nested rounded rectangles for multiple uses
9 nodes + 12 edges (AST: 18 nodes, 22 edges)
16-September-2019 OCL Visualization - A Reality Check 12Made available under EPL 2.0
Eclipse QVTs OCL visualization
AST visualization
Object Diagram: instances of OCL metamodel
vOCL
Class Diagram: doodle on user metamodel
Eclipse QVTs patterns
Object Diagram: instances of user metamodel
auto-generated debug aid for matching schedule
example embedded in QVTr
16-September-2019 OCL Visualization - A Reality Check 13Made available under EPL 2.0
Running Example using Eclipse QVTs
Rectangles
=> class instances
Rounded rectangles
=> DataType values
Ellipses
=> OCL operations
edges have <<roles>>
Solid edges
=> unit value matching
Dashed edges
=> [0..*] values matching
11 nodes and 15 edges
16-September-2019 OCL Visualization - A Reality Check 14Made available under EPL 2.0
Constraint Diagrams
Stuart Kent, OOPSLA 1997
Constraint Diagrams: Visualizing Invariants in Object-Oriented Models.
Visual Set membership
blobs for members
shapes for types
blobs within shapes for membership
edges for relationships
... Venn Diagrams
Not OCL
related concepts ... better perspective
16-September-2019 OCL Visualization - A Reality Check 15Made available under EPL 2.0
Running example - Constraint Diagram
Ellipses - user metamodel types
Blobs - distinct instances typed by background
Edges - metamodel relationships
Powerful set concepts align well to OCL
some OCL concepts hard to represent
8 nodes, 4 edges
16-September-2019 OCL Visualization - A Reality Check 16Made available under EPL 2.0
Visual OCL
Christiane Kiesner, Gabriele Taentzer, Jessica
Winkelmann TU Berlin Technical Report 2002/23
Visual OCL: A Visualization of the Object Constraint Language
A new 'UML' diagram
re-uses statechart idioms
hierachy of decorated compartments
16-September-2019 OCL Visualization - A Reality Check 17Made available under EPL 2.0
Running Example - Visual OCL
? Draw as:
12 nodes /
compartments
3 edges
10 text tokens
16-September-2019 OCL Visualization - A Reality Check 18Made available under EPL 2.0
Summary / Comparison
Naive AST - verbose, uses OCL metamodel
vOCL - user-friendly, may become cluttered
QVTs - patterns, variables avoid clutter
Constraint Diagram - can be very good
beware: running example hits a 'sweet spot'
Visual OCL - adequate
16-September-2019 OCL Visualization - A Reality Check 19Made available under EPL 2.0
Summary / Reality
Text can be better, Pictures can be better
Text dominant for expressions
Complex expressions need the 'best' exposition
patterns
Text tooling unavoidable - ASCII compatibility
Visual tooling specialized - UMLDI is a 'future'
AST / QVTs visualization - a helpful debug aid
Other Visual OCL editors unlikely to happen
16-September-2019 OCL Visualization - A Reality Check 20Made available under EPL 2.0
Future Work ?
Eclipse QVTs - adequate, complete
node => metamodel instance / operation
edge => metamodel relationship / operation role
Constraint Diagram - compact, partial
node => metamodel instance
edge => metamodel relationship
background => set membership / typing
?? Merge the two ??
?? Questions ??

More Related Content

PDF
An OCL Map Type
PDF
Coupled Cfd-Dem Modeling: Formulation, Implementation and Application to Mu...
PDF
Self-Adaptive Cloud Infrastructures with Bidirectional Programming
PPTX
portfolio
PDF
OCL 2019 Keynote Retrospective and Prospective
ODP
The OCLforUML Profile
ODP
OCL 2.5 plans
PDF
Enriching your models with OCL
An OCL Map Type
Coupled Cfd-Dem Modeling: Formulation, Implementation and Application to Mu...
Self-Adaptive Cloud Infrastructures with Bidirectional Programming
portfolio
OCL 2019 Keynote Retrospective and Prospective
The OCLforUML Profile
OCL 2.5 plans
Enriching your models with OCL

More from Edward Willink (20)

ODP
A text model - Use your favourite M2M for M2T
ODP
Shadow Objects
ODP
Commutative Short Circuit Operators
ODP
Deterministic Lazy Mutable OCL Collections
ODP
The Micromapping Model of Computation
ODP
Optimized declarative transformation First Eclipse QVTc results
ODP
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
ODP
The Importance of Opposites
ODP
OCL Specification Status
ODP
At Last an OCL Debugger
ODP
QVT Traceability: What does it really mean?
ODP
Safe navigation in OCL
ODP
OCL 2.4. (... 2.5)
ODP
Embedded OCL Integration and Debugging
ODP
OCL Integration and Code Generation
ODP
Yet Another Three QVT Languages
ODP
OCL - The Bigger Picture
PPT
UMLX and QVT and ATL
PPT
Model Transformation A Personal Perspective
ODP
Fast, Faster and Super-Fast Queries
A text model - Use your favourite M2M for M2T
Shadow Objects
Commutative Short Circuit Operators
Deterministic Lazy Mutable OCL Collections
The Micromapping Model of Computation
Optimized declarative transformation First Eclipse QVTc results
Local Optimizations in Eclipse QVTc and QVTr using the Micro-Mapping Model of...
The Importance of Opposites
OCL Specification Status
At Last an OCL Debugger
QVT Traceability: What does it really mean?
Safe navigation in OCL
OCL 2.4. (... 2.5)
Embedded OCL Integration and Debugging
OCL Integration and Code Generation
Yet Another Three QVT Languages
OCL - The Bigger Picture
UMLX and QVT and ATL
Model Transformation A Personal Perspective
Fast, Faster and Super-Fast Queries
Ad

Recently uploaded (20)

PDF
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Nekopoi APK 2025 free lastest update
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PPTX
history of c programming in notes for students .pptx
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PDF
Complete Guide to Website Development in Malaysia for SMEs
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
Download FL Studio Crack Latest version 2025 ?
CapCut Video Editor 6.8.1 Crack for PC Latest Download (Fully Activated) 2025
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Monitoring Stack: Grafana, Loki & Promtail
Autodesk AutoCAD Crack Free Download 2025
Nekopoi APK 2025 free lastest update
Computer Software and OS of computer science of grade 11.pptx
Why Generative AI is the Future of Content, Code & Creativity?
history of c programming in notes for students .pptx
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Complete Guide to Website Development in Malaysia for SMEs
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Odoo Companies in India – Driving Business Transformation.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
AutoCAD Professional Crack 2025 With License Key
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
wealthsignaloriginal-com-DS-text-... (1).pdf
Salesforce Agentforce AI Implementation.pdf
Download FL Studio Crack Latest version 2025 ?
Ad

OCL Visualization A Reality Check

  • 1. Made available under EPL 2.0 OCL Visualization A Reality Check 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, 1.4 RTF Chair OCL 2019 @ MODELS 2019 16th September 2019
  • 2. 16-September-2019 OCL Visualization - A Reality Check 2Made available under EPL 2.0 Overview Background Traditional AST visualization vOCL 2018 problems Fixed vOCL Eclipse QVTs visualization Constraint Diagram Visual OCL Summary / Conclusion
  • 3. 16-September-2019 OCL Visualization - A Reality Check 3Made available under EPL 2.0 Background Text can be good Pictures can be good Text can be better Pictures can be better Text dominant for expressions (except SDL) UML graphical – why no graphical OCL ? OCL 2018 => vOCL paper worth discussion reviewer's / audience criticisms not rebutted
  • 4. 16-September-2019 OCL Visualization - A Reality Check 4Made available under EPL 2.0 Running Example Example constraint context Hospital inv uniquePatientId: self.patients->forAll(p1, p2 | p1 <> p2 implies p1.id <> p2.id) Equivalent to context Hospital inv uniquePatientId: self.patients->isUnique(id)
  • 5. 16-September-2019 OCL Visualization - A Reality Check 5Made available under EPL 2.0 Traditional AST Visualization UML-like solid containment dashed references 18 nodes, 22 edges
  • 6. 16-September-2019 OCL Visualization - A Reality Check 6Made available under EPL 2.0 vOCL Traditional AST is instance-based instances of OCL metamodel requires knowledge of OCL internals references by name to user metamodel vOCL is class-based re-uses user metamodel to define variables mnemonic icons for common OCL operations vOCL constraint is a doodle on the class diagram new doodling semantics
  • 7. 16-September-2019 OCL Visualization - A Reality Check 7Made available under EPL 2.0 vOCL example from 2018 paper blob is the self instance of the not-grayed class ellipses use Class-typed reference properties rounded rectangles use DataType properties additional icons for OCL operations arrows denote 'reading order' vague semantics
  • 8. 16-September-2019 OCL Visualization - A Reality Check 8Made available under EPL 2.0 AST visualization of vOCL example green reading order markup blob - self - ok ....patients - ok ....size() - ok ....<= - lhs ok <= ... - rhs inverted pragmatic self.beds backwards
  • 9. 16-September-2019 OCL Visualization - A Reality Check 9Made available under EPL 2.0 Fixed vOCL example Multiple paths for multiple instances/evaluations Blob now starts two paths black path as in original paper to read the LHS self.patients.size() <= new green path to read the RHS self.beds >= both paths read towards the binary <= operation
  • 10. 16-September-2019 OCL Visualization - A Reality Check 10Made available under EPL 2.0 AST visualization of fixed vOCL example two blobs two bottom-up paths 'reading order' is now AST evaluation blob defines 'self' value edge passes value node computes value
  • 11. 16-September-2019 OCL Visualization - A Reality Check 11Made available under EPL 2.0 Running example using Fixed vOCL Blobs identify three variables starting five paths self.patients self.patients.id <> implies self.patients.id <> implies self.patients <> implies self.patients <> implies Nested rounded rectangles for multiple uses 9 nodes + 12 edges (AST: 18 nodes, 22 edges)
  • 12. 16-September-2019 OCL Visualization - A Reality Check 12Made available under EPL 2.0 Eclipse QVTs OCL visualization AST visualization Object Diagram: instances of OCL metamodel vOCL Class Diagram: doodle on user metamodel Eclipse QVTs patterns Object Diagram: instances of user metamodel auto-generated debug aid for matching schedule example embedded in QVTr
  • 13. 16-September-2019 OCL Visualization - A Reality Check 13Made available under EPL 2.0 Running Example using Eclipse QVTs Rectangles => class instances Rounded rectangles => DataType values Ellipses => OCL operations edges have <<roles>> Solid edges => unit value matching Dashed edges => [0..*] values matching 11 nodes and 15 edges
  • 14. 16-September-2019 OCL Visualization - A Reality Check 14Made available under EPL 2.0 Constraint Diagrams Stuart Kent, OOPSLA 1997 Constraint Diagrams: Visualizing Invariants in Object-Oriented Models. Visual Set membership blobs for members shapes for types blobs within shapes for membership edges for relationships ... Venn Diagrams Not OCL related concepts ... better perspective
  • 15. 16-September-2019 OCL Visualization - A Reality Check 15Made available under EPL 2.0 Running example - Constraint Diagram Ellipses - user metamodel types Blobs - distinct instances typed by background Edges - metamodel relationships Powerful set concepts align well to OCL some OCL concepts hard to represent 8 nodes, 4 edges
  • 16. 16-September-2019 OCL Visualization - A Reality Check 16Made available under EPL 2.0 Visual OCL Christiane Kiesner, Gabriele Taentzer, Jessica Winkelmann TU Berlin Technical Report 2002/23 Visual OCL: A Visualization of the Object Constraint Language A new 'UML' diagram re-uses statechart idioms hierachy of decorated compartments
  • 17. 16-September-2019 OCL Visualization - A Reality Check 17Made available under EPL 2.0 Running Example - Visual OCL ? Draw as: 12 nodes / compartments 3 edges 10 text tokens
  • 18. 16-September-2019 OCL Visualization - A Reality Check 18Made available under EPL 2.0 Summary / Comparison Naive AST - verbose, uses OCL metamodel vOCL - user-friendly, may become cluttered QVTs - patterns, variables avoid clutter Constraint Diagram - can be very good beware: running example hits a 'sweet spot' Visual OCL - adequate
  • 19. 16-September-2019 OCL Visualization - A Reality Check 19Made available under EPL 2.0 Summary / Reality Text can be better, Pictures can be better Text dominant for expressions Complex expressions need the 'best' exposition patterns Text tooling unavoidable - ASCII compatibility Visual tooling specialized - UMLDI is a 'future' AST / QVTs visualization - a helpful debug aid Other Visual OCL editors unlikely to happen
  • 20. 16-September-2019 OCL Visualization - A Reality Check 20Made available under EPL 2.0 Future Work ? Eclipse QVTs - adequate, complete node => metamodel instance / operation edge => metamodel relationship / operation role Constraint Diagram - compact, partial node => metamodel instance edge => metamodel relationship background => set membership / typing ?? Merge the two ?? ?? Questions ??