SlideShare a Scribd company logo
1 of 61
Download to read offline
Made available under EPL v1.0
Enriching Your Models
with OCL
Adolfo Sánchez-Barbudo Herrera, Open Canarias
Axel Uhl, SAP
Edward Willink, MDT/OCL Project Lead
3rd
November 2010
Enriching your models with OCL 2Made available under EPL v1.0
Overview
MDT/OCL team
● Why and When OCL
● Introduction to OCL
● OCL within Eclipse
● OCL Use Cases, coming soon
SAP
● Scaling up OCL at SAP
Enriching your models with OCL 3Made available under EPL v1.0
Follow Along
http://www.eclipsecon.org/summiteurope2010/sessions/?page=sessions&id=1710
links to slides and to zip file comprising, model,edit,editor,diagram projects
●
Install MDT/OCL 3.0.1 Examples and Editors
● Import ... Existing Projects from Archive
– ESEExampleTree/model/People1.ecore
● Run nested Eclipse, Import ESEExampleTree
– ESEExampleTree/model/default.people_diagram
Enriching your models with OCL 4Made available under EPL v1.0
How Much OCL?
None
● Very simple modeling
● Java augmented modeling
A little
● OCL (and Java) augmented modeling
A lot
● OCL as a powerful formal specification language
– OMG's UML, OCL, QVT, ... specifications
● OCL as the foundation of a transformation language
– MOFM2T (Acceleo), QVT
● OCL as a portable implementation language
Enriching your models with OCL 5Made available under EPL v1.0
UML State Machines
● Need to specify behavior
● amber when End of Stop or Start of Stop
● transition when signal received/time elapsed
Enriching your models with OCL 6Made available under EPL v1.0
UML Solutions
UML 1.x Use your favourite programming language
● Ada/C/...
● Magically inserted by proprietary code generator
UML 2.x Use a neutral specification language
● The Object Constraint Language
– State machine guards/actions
– Class invariants
– Operation bodies, pre/post conditions
– Property initial/derived values
Enriching your models with OCL 7Made available under EPL v1.0
Simple Meta-Modeling
Graphics
● Box
– Class, enumeration
● Compartment
– Property, operation
● Line
– Association
● Decoration
– Composition, navigability
Text
● Name, type, stereotype
● Multiplicity
Example Family Tree Meta-Model
Ecore Diagram
(similar to UML Class Diagram)
Enriching your models with OCL 8Made available under EPL v1.0
Richer Meta-Modelling
● Implicit constraints
● Up to 2 parents
● MALE/FEMALE gender
● Arbitrary constraints
● At least 5 characters in name
● 1 MALE, 1 FEMALE parent
● Self is not an ancestor of self
Enriching your models with OCL 9Made available under EPL v1.0
Example Family Tree Model
Simple GMF Diagram Editor
ESEExampleTree/model/default.people_diagram
Enriching your models with OCL 10Made available under EPL v1.0
Simple Query Evaluation
Window->Show View->Other... Console
Console: New: Interactive OCL
Select Zeus as the Model Context (in any model editor)
Type children then carriage return
Enriching your models with OCL 11Made available under EPL v1.0
OCL Principles
● Natural/Formal Language compromise
– natural language error prone
– formal language unapproachable to many
● Specification (not Programming) Language
– declarative, modeling language
– side effect free, no model changes, atomic execution
– strongly typed, using UML generalization
Enriching your models with OCL 12Made available under EPL v1.0
OCL Object Types
● Primitive Types
– Boolean, String
– Real, Integer, UnlimitedNatural
● unlimited; no float/double etc distinction
● Bottom Types
– OclVoid: any value can be null
– OclInvalid: any value can be invalid
● Top Type
– OclAny: every OCL and user type
conform to OclAny type.
Enriching your models with OCL 13Made available under EPL v1.0
Mathematical Operators
Infix: +, -, *, /
and, or, xor, implies
=, <>, <, >, <=, >= nb =, <>
Prefix: not, -
4.0 * -5
'a' + 'b'
Operators: mod, div, max, min, ...
4.max(5)
Enriching your models with OCL 14Made available under EPL v1.0
OCL Expressions
● If Expressions
if gender = Gender::MALE
then 'he'
else 'she'
endif
● Let Expressions
let jack : Person = child('Jack'),
jill : Person = child('Jill')
in jack <> null and jill <> null
Enriching your models with OCL 15Made available under EPL v1.0
More Complex Query
Selecting Poseidon defines the implicit context variable
self : Person = Poseidon
Enriching your models with OCL 16Made available under EPL v1.0
Object Navigation
Properties
● self.name or just name
(cf. this.getName() or getName())
Operations
● self.child('John') or just child('John')
(cf. this.child('John') or child('John'))
Enriching your models with OCL 17Made available under EPL v1.0
The OCLinEcore Editor
Select model/People1.ecore
Open With... OCLinEcore
Enriching your models with OCL 18Made available under EPL v1.0
Example Validation Failure
Open model/People1.xmi with Sample Reflective Ecore Editor
Select Universe, Right button menu, Validate
Enriching your models with OCL 19Made available under EPL v1.0
Multiplicities and Collections
Meta-models specify multiplicities
– children : Person[*] {ordered,unique}
– parents : Person[0..2] {unique}
● multiplicities are specification concepts; not objects
Implementations (e.g. Ecore) reify multiplicities
– getChildren() returns a UniqueEList<Person>
● 'many' properties have extra implementation objects
– getName() setName(newName)
– getChildren().get(2) getChildren().add(newChild)
OCL needs more than just UML multiplicities
Enriching your models with OCL 20Made available under EPL v1.0
OCL 2.0 Collections
Typed Collections partially reify multiplicities
Collections are different to objects
Navigation from a Collection uses ->
– [Navigation from an Object (OclAny) uses .]
Collections have type parameters
Collections have useful operations
Collections have very useful iterations
Collection(T) Unordered Ordered
Non-Unique Bag(T) Sequence(T)
Unique Set(T) OrderedSet(T)
Enriching your models with OCL 21Made available under EPL v1.0
Example Collection Operations
Collection::size() self.children->size()
'get'
Sequence::at(Integer) self.children->at(1)
– nb 1 is the first index, size() is the last
'add'
Collection(T)::including(T) : Collection(T)
– returns a new collection with added content
'contains'
Collection(T)::includes(T) : Boolean
– tests existing content
Enriching your models with OCL 22Made available under EPL v1.0
Collection::select iteration
● Children
self.children
● Sons
self.children->select(gender = Gender::MALE)
self.children->select(child | child.gender = Gender::MALE)
self.children->select(child : Person | child.gender = Gender::MALE)
● select(iterator : type | body)
– filters to select elements for which the body is true
● reject(iterator : type | body)
– filters to reject elements for which the body is true
● cf multi-line Java loop
Enriching your models with OCL 23Made available under EPL v1.0
Collection::collect iteration
● Children
self.children
● Grandchildren
self.children->collect(children)
self.children->collect(child | child.children)
self.children->collect(child : Person | child.children)
● collect(iterator : type | body)
– creates a new collection comprising all the bodies
● any, exists, forAll, isUnique, iterate, one,
Enriching your models with OCL 24Made available under EPL v1.0
OCL Navigation Operators
anObject. ... object navigation
aCollection-> ... collection navigation
Shorthands
aCollection. ... implicit collect
anObject-> ... implicit collection
Object Collection
. Navigation ?
-> ? Navigation
Enriching your models with OCL 25Made available under EPL v1.0
Implicit Collect Query
parents.parents = parents->collect(parents)
3 symbols, compared to 4 lines of Java
4 grandparents, but not all different!
Enriching your models with OCL 26Made available under EPL v1.0
Cleaned up query
parents.parents->asSet()->sortedBy(name)
->asSet() converts to Set(Person), removes duplicates
->sortedBy(name) alphabeticizes
Enriching your models with OCL 27Made available under EPL v1.0
Implicit Collection Conversion
self->notEmpty()
● Standard OCL idiom
– Converts self (if an object) to a Collection of self
– If self is a defined object
● Implicit collection is not empty - true
– If self is an undefined object (null)
● Implicit collection is empty - false
– If self is an error (invalid)
● Implicit collection is also an error - invalid
Object Collection
. Navigation Implicit collect()
-> Implicit Collection Navigation
Enriching your models with OCL 28Made available under EPL v1.0
Collection::closure iteration
● children, grandchildren, greatgrandchildren etc
self->closure(children)
● Implicit collection of self, then closure of all children
[ closure in MDT/OCL 1.2, probably in OMG OCL 2.3 ]
Enriching your models with OCL 29Made available under EPL v1.0
OCL as Implementation
any(x) iteration selects an arbitrary element for which x is true.
Enriching your models with OCL 30Made available under EPL v1.0
Derived Properties
For Hera
invariant MixedGenderParents:
father.gender <>
mother.gender;
fails because
father is null and
mother is null
Enriching your models with OCL 31Made available under EPL v1.0
Other OCL Capabilities
No time to mention
● Other iterators, operations
● Tuples
● Association Classes/Qualifiers
● @pre values
● Messages
● States
Enriching your models with OCL 32Made available under EPL v1.0
OMG OCL Progress
OCL 2.2 (current) Collections are objects!
– Collection conforms to OclAny
– No need for Collection/Object polymorphic operations
– Collections can mix Object/Collection content
? OCL 2.4 Specification defined by models
– Auto-generated by Acceleo
– Fix too many consistency/typo/realizability issues
– Aligned with UML 2.4, MOF 2.4, XMI 2.4
Eclipse committers active on OMG RTF
Enriching your models with OCL 33Made available under EPL v1.0
Eclipse MDT/OCL
● Original code contribution by IBM
● Java callable API
– Parse/evaluate OCL 1.x against Ecore
meta-models
● Ecore or UML meta-models
● OCL 2.0 (in so far as possible)
● Example Interactive Console
● towards OCL 2.2
● Example Xtext editors (Ecore only)
OMG OCL 1.x
EMFT/OCL 1.0
OMG OCL 2.0
MDT/OCL 1.2
OMG OCL 2.2
MDT/OCL 3.0
Enriching your models with OCL 34Made available under EPL v1.0
Validation History
Use of OCL to define model validation
● EMF Validation Framework
– Embed OCL in XML CDATA
● EMF, OCL EAnnotations
– Embed OCL in EAnnotation
– Genmodel to integrate
● Delegates
– Embed OCL in EAnnotation
– EObject.eInvoke() for dynamic invocation
– OCLinEcore editor for semi-validated editing
Eclipse 3.2
Eclipse 3.3
Eclipse 3.6
EMF 2.6
MDT/OCL 3.0
Enriching your models with OCL 35Made available under EPL v1.0
OCLinEcore Editor
● Open with -> OCLinEcore
● Save As *.ecore
– Loses formatting and comments
● Save As *.oclinecore
– Text file preserves comments
● Useful for plain Ecore too:
– Printable/reviewable text
– Searchable/replaceable text
Enriching your models with OCL 36Made available under EPL v1.0
Validation in Sample Ecore Editor
OCLinEcore editor maintains EAnnotations automatically
OCLinEcore editor provides OCL syntax checking
OCLinEcore editor will provide OCL semantic checking
Enriching your models with OCL 37Made available under EPL v1.0
(Example) Tools and Tips
OCLinEcore editor for Ecore/embedded OCL
CompleteOCL editor for OCL documents
EssentialOCL editor for OCL Expressions (Papyrus)
OCL Interactive Console
– Invaluable ability to practice non-trivial expressions
– Page Up/Page Down to reuse expressions
Meta-model reload after change
Genmodel settings for embedded OCL
Enriching your models with OCL 38Made available under EPL v1.0
EMF Dynamic Instances
Create/update Ecore meta-model
Create XMI instance of EClass in meta-model
Update XMI model, validate OCL constraints
Enriching your models with OCL 39Made available under EPL v1.0
Meta-model Update
Edit UML/Ecore meta-model in UML/Ecore editor
– manual export of UML to Ecore in workspace
– manual save of Ecore to workspace
Create Dynamic Instance/Load Model in editor
– validate/evaluate OCL constraints
EMF does not support meta-model mutation
– Model.eClass() reverts to an unresolved proxy
– must exit and re-enter model editor
UML
meta-model
Ecore
meta-model
Model
realizes conformsTo
My.uml My.ecore data.my
Enriching your models with OCL 40Made available under EPL v1.0
Genmodel settings for OCL
If not set to true
● MDT/OCL 3.0.0 OCL operation bodies not invoked
● MDT/OCL 3.0.1 Error Log as dynamic fallback used
Enriching your models with OCL 41Made available under EPL v1.0
Eclipse MDT/OCL Futures
3.1 Core (Indigo)
– Minor maintenance
3.1 Examples (Indigo)
– New Ecore/UML blind pivot meta-model
– Extensible modelled Standard Library
– Xtext editors
– Super-compliant - anticipating OMG OCL resolutions
4.0 Core + Tools + Examples (Indigo+1)
– 3.1 Examples promoted to Core or Tools
● preserved external APIs, significant revision of internal APIs
– OCL to Java code generation
Enriching your models with OCL 42Made available under EPL v1.0
Which OCL Use Cases work When
Released in Helios Example functionality in Helios
Example functionality in Indigo, release in Indigo+1
Validate Evaluate Console Editor
Static Java
For Ecore
1.0 1.0 1.0
Examples
3.0
Examples
Static Java
For UML
1.2 1.2 3.1
Examples
3.1
Examples
Complete OCL
For Ecore
3.1
Examples
3.1
Examples
3.1
Examples
3.0
Examples
Complete OCL
For UML
3.1
Examples
3.1
Examples
3.1
Examples
3.1
Examples
Embedded
OCL in Ecore
3.0 3.0 3.0
Examples
3.0
Examples
Embedded
OCL in UML
3.1
Examples
3.1
Examples
3.1
Examples
3.1
Examples
Enriching your models with OCL 43Made available under EPL v1.0
OCL 'Standard' Library
Problems: OMG
– library is not a model
– uses non-UML concepts (Iterator)
– no reflection for OclAny::oclType()
Problems: MDT/OCL
– hard coded, difficult to extend
– UML/Ecore differences, long generic template lists
– Ecore/EMOF discrepancies : EClass/Class
Solution: OMG
– library is a model defined by the new OCL meta-model
Benefit: MDT/OCL
– variants, extensible, unified, compliant
Enriching your models with OCL 44Made available under EPL v1.0
OCL Models
Problems: OMG
– OCL is not fully UML-aligned
– OCL modifies UML models (OclAny)
– Complete OCL modifies UML models
– OCL requires a modified sub-UML @ run-time
Problems: MDT/OCL
– UML/Ecore implementation differences, Ecore extension
– Ecore/EMOF discrepancies
Solution: OMG
– Pivot meta-model defines UML @ run-time
– Pivot model realises OCL-defined merges
Benefit: MDT/OCL
– unified, compliant, Ecore/EMOF hidden
Enriching your models with OCL 45Made available under EPL v1.0
Evaluation
Problems: MDT/OCL:
– OCL interpreted by Java
– OperationCallExp visit is very inefficient
– Slightly hard to extend for QVTo, Acceleo
– OCL within genmodelled Java is just a String
● significant first time parsing costs
Solution: MDT/OCL
– OCL to Java code generation
– Library model references a Java class per feature
– Code efficiency
Benefit: MDT/OCL
– extensible, faster (10 to 100 times ... iteration strategies)
– Java in genmodelled Java
Enriching your models with OCL 46Made available under EPL v1.0
Beyond OCL
OMG OCL is a powerful expression language
● Declarative, First Order Predicate Calculus/Logic
● Model-oriented, UML navigation, multiplicities, ...
Formal language supports formal analysis
analysis supports optimisation
OCL's usefulness calls for scalable
implementation
Enriching your models with OCL 47Made available under EPL v1.0
The Re-Evaluation Problem
•
A set of OCL expressions
•
A set of model elements
•
A model change notification
•
Which of the OCL expressions may have
changed its value on which context elements?
•
Naïve approach
●
re-evaluate all expressions for all their contexts
●
takes O(|expressions| * |modelElements|)
Enriching your models with OCL 48Made available under EPL v1.0
Example
self.signature.parameters->size() = self.arguments->size()
Enriching your models with OCL 49Made available under EPL v1.0
Naïve Re-Evaluation Sequence
:Tool:Tool reevaluator:Adapterreevaluator:Adapter e : EObjecte : EObject
1: change
2: notifyChanged(msg)
3: reevaluateAllExpressionsOnAllTheirContexts
|expressions| times
|contexts| times
That's way too slow!
Enriching your models with OCL 50Made available under EPL v1.0
Idea: Find out from Notification which
OCLExpressions may have changed
Example: OCLExpression
self.arguments->size() = self.signature.parameters->size()
generates Notification filter
(containment AND ((new value filter incl subs for: Call) OR
(old value filter incl subs for: Call))) OR
((wantedClass conformsTo: Signature) AND (feature: parameters)) OR
((wantedClass conformsTo: Call) AND (feature: signature)) OR
((wantedClass conformsTo: Call) AND (feature: arguments))
Many expressions cause
– many adapters
– with one (often non-trivial) Notification filter each
– which need evaluation for each change Notification
Enriching your models with OCL 51Made available under EPL v1.0
Filter Events for OCLExpressions
:Tool:Tool reevaluator:Adapterreevaluator:Adapter :ImpactAnalyzer:ImpactAnalyzer :EventManager:EventManager adapterForEventManager
: EventAdapter
adapterForEventManager
: EventAdapter
e : EObjecte : EObject
4: change
5: notifyChanged(msg)
6: handleEMFEvent(msg)
7: notifyChanged(msg)
8: reevaluate(e, allContextObjectsForE)
1: createFilterForExpression(e)
2: returns eventFilter
3: subscribe(eventFilter, reevaluator)
|affected expressions| times
|contexts| times
{
one-timesetup
Enriching your models with OCL 52Made available under EPL v1.0
Scaling up Event Filtering
Effort for event propagation still O(|expressions|)
– slowed down even if no Notification delivered
Number of OCLExpressions Number of OCLExpressions
Notification #1 Notification #2
Enriching your models with OCL 53Made available under EPL v1.0
to map Notification to Set<Adapter>
Notification:
- notifier
- oldValue
- newValue
- feature
- eventType
notifier.eClass() conforms to Set<Adapter> interested
Parameter [a1, a7, a15]
Signature [a1, a3, a9]
… …
feature Set<Adapter> interested
NamedElement.name [a3, a9, a14]
Call.signature [a7, a15]
… …
…
…
Idea: Use HashMaps
Enriching your models with OCL 54Made available under EPL v1.0
Faster delivery for
Notifications matched
by event filters
Effects of HashMap-Based Eventing
Number of OCLExpressions Number of OCLExpressions
Notification #1 Notification #2
No time increase for
expressions whose filters
don't match a Notification
Enriching your models with OCL 55Made available under EPL v1.0
Reducing Contexts for Re-Evaluation
● Use partial evaluation to prove value unchanged
● self.name='abc' not affected by name change
from 'x' to 'y'
● Use Notification object (notifier,
oldValue, newValue) to navigate “backwards” to
affected context objects
● self.children.children.name
● change attribute name on x:Person
● contexts for re-evaluation:
– x.parents.parents
● Tricky for iterators and recursive
operations, but solved.
Enriching your models with OCL 56Made available under EPL v1.0
10: reevaluate(e, contextObjects)
:Tool:Tool reevaluator:Adapterreevaluator:Adapter :ImpactAnalyzer:ImpactAnalyzer :EventManager:EventManager e : EObjecte : EObjectadapterForEventManager
: EventAdapter
adapterForEventManager
: EventAdapter
4: change
5: notifyChanged(msg)
6: handleEMFEvent(msg)
7: notifyChanged(msg)
8: getContextObjects(msg)
9: returns contextObjects
1: createFilterForExpression(e)
2: returns eventFilter
3: subscribe(eventFilter, reevaluator)
Reduce Set of Context Elements
|affected contexts| times
|affected expressions| times
{
one-timesetup
Enriching your models with OCL 57Made available under EPL v1.0
EventManager eventManager =
EventManagerFactory.eINSTANCE.createEventManagerFor(
editingDomain.getResourceSet());
final OCLExpression invariant = OCL.newInstance().createOCLHelper().
createQuery(“self.signature.parameters->size()=self.arguments->size()“);
final ImpactAnalyzer impactAnalyzer =
ImpactAnalyzerFactory.INSTANCE.createImpactAnalyzer(invariant,
/* notifyOnNewContextElements */ true, oppositeEndFinder);
Adapter adapter = new AdapterImpl() {
@Override
public void notifyChanged(Notification msg) {
// revalidate invariant on context objects delivered by impact analysis:
Collection<EObject> revalidateOn = impactAnalyzer.getContextObjects(msg);
if (revalidateOn != null && !revalidateOn.isEmpty()) {
revalidate(invariant, revalidateOn);
}
}
};
eventManager.subscribe(impactAnalyzer.createFilterForExpression(), adapter);
API Usage Example
Enriching your models with OCL 58Made available under EPL v1.0
Benchmark Context Reduction
(Average Case)
Naive
Event-Filtered (*6 Speed-Up)
Event-Filtered and Context-Reduced
(*1300 Speed-Up vs. Naive,
*220 vs. Event-Filtered-Only)
TotalRe-EvaluationTimeinSeconds
Number of Model Elements
Enriching your models with OCL 59Made available under EPL v1.0
Benchmark Context Reduction (Worst Case)
Naive
Event-Filtered (*2.4 Speed-Up)
Event-Filtered and Context-Reduced
(*27 Speed-Up vs. Naive, *11 vs. Event-Filtered-Only)
TotalRe-EvaluationTimeinSeconds
Number of Model Elements
(apply changes to very central elements, referenced by all other model packages)
Enriching your models with OCL 60Made available under EPL v1.0
Summary
MDT/OCL originally focussed on Java API
Interactive Modeling Tools require OCL IDE
● EMF, Xtext, Acceleo, QVTo, OCL support
richer OCL development environment
Extensibility required by QVTo, Acceleo
Efficiency required for serious use
IDE starting to appear
● Console, Editors
Expect/Demand much more
Contributions welcome
Enriching your models with OCL 61Made available under EPL v1.0
OCL Resources
● OCL 2.2 Specification http://www.omg.org/spec/OCL/2.2
– Clause 7 is quite readable (many typos)
● The Object Constraint Language:
Getting Your Models Ready For MDA
Jos B. Warmer, Anneke Kleppe
● Eclipse MDT/OCL project
http://www.eclipse.org/projects/project_summary.php?projectid=modeling.mdt.ocl
● Impact analysis
GIT: http://anonymous@www.furcas.org/furcas.git/
SVN: https://www.hpi.uni-potsdam.de/giese/gforge/svn/bp2009
Accounts: https://www.hpi.uni-potsdam.de/giese/gforge/

More Related Content

What's hot

Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8icarter09
 
New Features in JDK 8
New Features in JDK 8New Features in JDK 8
New Features in JDK 8Martin Toshev
 
Core java concepts
Core java  conceptsCore java  concepts
Core java conceptsRam132
 
Introduction to Kotlin for Android developers
Introduction to Kotlin for Android developersIntroduction to Kotlin for Android developers
Introduction to Kotlin for Android developersMohamed Wael
 
Java 8 presentation
Java 8 presentationJava 8 presentation
Java 8 presentationVan Huong
 
java 8 new features
java 8 new features java 8 new features
java 8 new features Rohit Verma
 
10 Sets of Best Practices for Java 8
10 Sets of Best Practices for Java 810 Sets of Best Practices for Java 8
10 Sets of Best Practices for Java 8Garth Gilmour
 
10 Things I Hate About Scala
10 Things I Hate About Scala10 Things I Hate About Scala
10 Things I Hate About ScalaMeir Maor
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)mircodotta
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Martin Odersky
 
Java 8 - Features Overview
Java 8 - Features OverviewJava 8 - Features Overview
Java 8 - Features OverviewSergii Stets
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to ScalaRahul Jain
 

What's hot (20)

Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
 
Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8
 
New Features in JDK 8
New Features in JDK 8New Features in JDK 8
New Features in JDK 8
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Introduction to Kotlin for Android developers
Introduction to Kotlin for Android developersIntroduction to Kotlin for Android developers
Introduction to Kotlin for Android developers
 
Java 8 Feature Preview
Java 8 Feature PreviewJava 8 Feature Preview
Java 8 Feature Preview
 
Java 8 presentation
Java 8 presentationJava 8 presentation
Java 8 presentation
 
java 8 new features
java 8 new features java 8 new features
java 8 new features
 
Java Tut1
Java Tut1Java Tut1
Java Tut1
 
Core java
Core javaCore java
Core java
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
Scala Intro
Scala IntroScala Intro
Scala Intro
 
10 Sets of Best Practices for Java 8
10 Sets of Best Practices for Java 810 Sets of Best Practices for Java 8
10 Sets of Best Practices for Java 8
 
10 Things I Hate About Scala
10 Things I Hate About Scala10 Things I Hate About Scala
10 Things I Hate About Scala
 
camel-scala.pdf
camel-scala.pdfcamel-scala.pdf
camel-scala.pdf
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)
 
Java8
Java8Java8
Java8
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009
 
Java 8 - Features Overview
Java 8 - Features OverviewJava 8 - Features Overview
Java 8 - Features Overview
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 

Similar to Enriching Your Models with OCL

Enriching your models with OCL
Enriching your models with OCLEnriching your models with OCL
Enriching your models with OCLUniversity of York
 
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: TestLangAntonio García-Domínguez
 
ScalaDays 2013 Keynote Speech by Martin Odersky
ScalaDays 2013 Keynote Speech by Martin OderskyScalaDays 2013 Keynote Speech by Martin Odersky
ScalaDays 2013 Keynote Speech by Martin OderskyTypesafe
 
Computer Science ACW Intro to OOP L7.pptx
Computer Science ACW Intro to OOP L7.pptxComputer Science ACW Intro to OOP L7.pptx
Computer Science ACW Intro to OOP L7.pptxEdmondLabule2
 
OCL Integration and Code Generation
OCL Integration and Code GenerationOCL Integration and Code Generation
OCL Integration and Code GenerationEdward Willink
 
Safe navigation in OCL
Safe navigation in OCLSafe navigation in OCL
Safe navigation in OCLEdward Willink
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxRohitKumar639388
 
Formally Defining and Iterating Infinite Models (MODELS 2012)
Formally Defining and Iterating Infinite Models (MODELS 2012)Formally Defining and Iterating Infinite Models (MODELS 2012)
Formally Defining and Iterating Infinite Models (MODELS 2012)Benoit Combemale
 
flatMap Oslo presentation slides
flatMap Oslo presentation slidesflatMap Oslo presentation slides
flatMap Oslo presentation slidesMartin Odersky
 
Compiling With Eclipse
Compiling With EclipseCompiling With Eclipse
Compiling With Eclipsesatriahelmy
 
Playing with SIMBL - Mobile Jazz Inspirational Talks
Playing with SIMBL - Mobile Jazz Inspirational TalksPlaying with SIMBL - Mobile Jazz Inspirational Talks
Playing with SIMBL - Mobile Jazz Inspirational TalksMobile Jazz
 
Development of Ansible modules
Development of Ansible modulesDevelopment of Ansible modules
Development of Ansible modulesjtyr
 
Design patterns illustrated 010PHP
Design patterns illustrated 010PHPDesign patterns illustrated 010PHP
Design patterns illustrated 010PHPHerman Peeren
 
Introduction to Ecmascript - ES6
Introduction to Ecmascript - ES6Introduction to Ecmascript - ES6
Introduction to Ecmascript - ES6Nilesh Jayanandana
 
Modeling the OCL Standard Library
Modeling the OCL Standard LibraryModeling the OCL Standard Library
Modeling the OCL Standard LibraryEdward Willink
 
O caml2014 leroy-slides
O caml2014 leroy-slidesO caml2014 leroy-slides
O caml2014 leroy-slidesOCaml
 

Similar to Enriching Your Models with OCL (20)

Enriching your models with OCL
Enriching your models with OCLEnriching your models with OCL
Enriching your models with OCL
 
Aligning OCL and UML
Aligning OCL and UMLAligning OCL and UML
Aligning OCL and UML
 
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
 
EduSymp 2022 slides (The Epsilon Playground)
EduSymp 2022 slides (The Epsilon Playground)EduSymp 2022 slides (The Epsilon Playground)
EduSymp 2022 slides (The Epsilon Playground)
 
ScalaDays 2013 Keynote Speech by Martin Odersky
ScalaDays 2013 Keynote Speech by Martin OderskyScalaDays 2013 Keynote Speech by Martin Odersky
ScalaDays 2013 Keynote Speech by Martin Odersky
 
Computer Science ACW Intro to OOP L7.pptx
Computer Science ACW Intro to OOP L7.pptxComputer Science ACW Intro to OOP L7.pptx
Computer Science ACW Intro to OOP L7.pptx
 
OCL Integration and Code Generation
OCL Integration and Code GenerationOCL Integration and Code Generation
OCL Integration and Code Generation
 
Safe navigation in OCL
Safe navigation in OCLSafe navigation in OCL
Safe navigation in OCL
 
pythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptxpythontraining-201jn026043638.pptx
pythontraining-201jn026043638.pptx
 
Python training
Python trainingPython training
Python training
 
Formally Defining and Iterating Infinite Models (MODELS 2012)
Formally Defining and Iterating Infinite Models (MODELS 2012)Formally Defining and Iterating Infinite Models (MODELS 2012)
Formally Defining and Iterating Infinite Models (MODELS 2012)
 
flatMap Oslo presentation slides
flatMap Oslo presentation slidesflatMap Oslo presentation slides
flatMap Oslo presentation slides
 
Flatmap
FlatmapFlatmap
Flatmap
 
Compiling With Eclipse
Compiling With EclipseCompiling With Eclipse
Compiling With Eclipse
 
Playing with SIMBL - Mobile Jazz Inspirational Talks
Playing with SIMBL - Mobile Jazz Inspirational TalksPlaying with SIMBL - Mobile Jazz Inspirational Talks
Playing with SIMBL - Mobile Jazz Inspirational Talks
 
Development of Ansible modules
Development of Ansible modulesDevelopment of Ansible modules
Development of Ansible modules
 
Design patterns illustrated 010PHP
Design patterns illustrated 010PHPDesign patterns illustrated 010PHP
Design patterns illustrated 010PHP
 
Introduction to Ecmascript - ES6
Introduction to Ecmascript - ES6Introduction to Ecmascript - ES6
Introduction to Ecmascript - ES6
 
Modeling the OCL Standard Library
Modeling the OCL Standard LibraryModeling the OCL Standard Library
Modeling the OCL Standard Library
 
O caml2014 leroy-slides
O caml2014 leroy-slidesO caml2014 leroy-slides
O caml2014 leroy-slides
 

More from Edward Willink

OCL Visualization A Reality Check
OCL Visualization A Reality CheckOCL Visualization A Reality Check
OCL Visualization A Reality CheckEdward Willink
 
OCL 2019 Keynote Retrospective and Prospective
OCL 2019 Keynote Retrospective and ProspectiveOCL 2019 Keynote Retrospective and Prospective
OCL 2019 Keynote Retrospective and ProspectiveEdward Willink
 
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 M2TEdward Willink
 
Commutative Short Circuit Operators
Commutative Short Circuit OperatorsCommutative Short Circuit Operators
Commutative Short Circuit OperatorsEdward Willink
 
Deterministic Lazy Mutable OCL Collections
Deterministic Lazy Mutable OCL CollectionsDeterministic Lazy Mutable OCL Collections
Deterministic Lazy Mutable OCL CollectionsEdward Willink
 
The Micromapping Model of Computation
The Micromapping Model of ComputationThe Micromapping Model of Computation
The Micromapping Model of ComputationEdward Willink
 
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 resultsEdward Willink
 
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...Edward Willink
 
The Importance of Opposites
The Importance of OppositesThe Importance of Opposites
The Importance of OppositesEdward Willink
 
OCL Specification Status
OCL Specification StatusOCL Specification Status
OCL Specification StatusEdward Willink
 
At Last an OCL Debugger
At Last an OCL DebuggerAt Last an OCL Debugger
At Last an OCL DebuggerEdward Willink
 
QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?Edward Willink
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEdward Willink
 
Yet Another Three QVT Languages
Yet Another Three QVT LanguagesYet Another Three QVT Languages
Yet Another Three QVT LanguagesEdward Willink
 
OCL - The Bigger Picture
OCL - The Bigger PictureOCL - The Bigger Picture
OCL - The Bigger PictureEdward Willink
 

More from Edward Willink (20)

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
 
OCL 2019 Keynote Retrospective and Prospective
OCL 2019 Keynote Retrospective and ProspectiveOCL 2019 Keynote Retrospective and Prospective
OCL 2019 Keynote Retrospective and Prospective
 
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...
 
The Importance of Opposites
The Importance of OppositesThe Importance of Opposites
The Importance of Opposites
 
OCL Specification Status
OCL Specification StatusOCL Specification Status
OCL Specification Status
 
The OCLforUML Profile
The OCLforUML ProfileThe OCLforUML Profile
The OCLforUML Profile
 
At Last an OCL Debugger
At Last an OCL DebuggerAt Last an OCL Debugger
At Last an OCL Debugger
 
QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?QVT Traceability: What does it really mean?
QVT Traceability: What does it really mean?
 
OCL 2.4. (... 2.5)
OCL 2.4. (... 2.5)OCL 2.4. (... 2.5)
OCL 2.4. (... 2.5)
 
Embedded OCL Integration and Debugging
Embedded OCL Integration and DebuggingEmbedded OCL Integration and Debugging
Embedded OCL Integration and Debugging
 
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
 
OCL - The Bigger Picture
OCL - The Bigger PictureOCL - The Bigger Picture
OCL - The Bigger Picture
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Enriching Your Models with OCL

  • 1. Made available under EPL v1.0 Enriching Your Models with OCL Adolfo Sánchez-Barbudo Herrera, Open Canarias Axel Uhl, SAP Edward Willink, MDT/OCL Project Lead 3rd November 2010
  • 2. Enriching your models with OCL 2Made available under EPL v1.0 Overview MDT/OCL team ● Why and When OCL ● Introduction to OCL ● OCL within Eclipse ● OCL Use Cases, coming soon SAP ● Scaling up OCL at SAP
  • 3. Enriching your models with OCL 3Made available under EPL v1.0 Follow Along http://www.eclipsecon.org/summiteurope2010/sessions/?page=sessions&id=1710 links to slides and to zip file comprising, model,edit,editor,diagram projects ● Install MDT/OCL 3.0.1 Examples and Editors ● Import ... Existing Projects from Archive – ESEExampleTree/model/People1.ecore ● Run nested Eclipse, Import ESEExampleTree – ESEExampleTree/model/default.people_diagram
  • 4. Enriching your models with OCL 4Made available under EPL v1.0 How Much OCL? None ● Very simple modeling ● Java augmented modeling A little ● OCL (and Java) augmented modeling A lot ● OCL as a powerful formal specification language – OMG's UML, OCL, QVT, ... specifications ● OCL as the foundation of a transformation language – MOFM2T (Acceleo), QVT ● OCL as a portable implementation language
  • 5. Enriching your models with OCL 5Made available under EPL v1.0 UML State Machines ● Need to specify behavior ● amber when End of Stop or Start of Stop ● transition when signal received/time elapsed
  • 6. Enriching your models with OCL 6Made available under EPL v1.0 UML Solutions UML 1.x Use your favourite programming language ● Ada/C/... ● Magically inserted by proprietary code generator UML 2.x Use a neutral specification language ● The Object Constraint Language – State machine guards/actions – Class invariants – Operation bodies, pre/post conditions – Property initial/derived values
  • 7. Enriching your models with OCL 7Made available under EPL v1.0 Simple Meta-Modeling Graphics ● Box – Class, enumeration ● Compartment – Property, operation ● Line – Association ● Decoration – Composition, navigability Text ● Name, type, stereotype ● Multiplicity Example Family Tree Meta-Model Ecore Diagram (similar to UML Class Diagram)
  • 8. Enriching your models with OCL 8Made available under EPL v1.0 Richer Meta-Modelling ● Implicit constraints ● Up to 2 parents ● MALE/FEMALE gender ● Arbitrary constraints ● At least 5 characters in name ● 1 MALE, 1 FEMALE parent ● Self is not an ancestor of self
  • 9. Enriching your models with OCL 9Made available under EPL v1.0 Example Family Tree Model Simple GMF Diagram Editor ESEExampleTree/model/default.people_diagram
  • 10. Enriching your models with OCL 10Made available under EPL v1.0 Simple Query Evaluation Window->Show View->Other... Console Console: New: Interactive OCL Select Zeus as the Model Context (in any model editor) Type children then carriage return
  • 11. Enriching your models with OCL 11Made available under EPL v1.0 OCL Principles ● Natural/Formal Language compromise – natural language error prone – formal language unapproachable to many ● Specification (not Programming) Language – declarative, modeling language – side effect free, no model changes, atomic execution – strongly typed, using UML generalization
  • 12. Enriching your models with OCL 12Made available under EPL v1.0 OCL Object Types ● Primitive Types – Boolean, String – Real, Integer, UnlimitedNatural ● unlimited; no float/double etc distinction ● Bottom Types – OclVoid: any value can be null – OclInvalid: any value can be invalid ● Top Type – OclAny: every OCL and user type conform to OclAny type.
  • 13. Enriching your models with OCL 13Made available under EPL v1.0 Mathematical Operators Infix: +, -, *, / and, or, xor, implies =, <>, <, >, <=, >= nb =, <> Prefix: not, - 4.0 * -5 'a' + 'b' Operators: mod, div, max, min, ... 4.max(5)
  • 14. Enriching your models with OCL 14Made available under EPL v1.0 OCL Expressions ● If Expressions if gender = Gender::MALE then 'he' else 'she' endif ● Let Expressions let jack : Person = child('Jack'), jill : Person = child('Jill') in jack <> null and jill <> null
  • 15. Enriching your models with OCL 15Made available under EPL v1.0 More Complex Query Selecting Poseidon defines the implicit context variable self : Person = Poseidon
  • 16. Enriching your models with OCL 16Made available under EPL v1.0 Object Navigation Properties ● self.name or just name (cf. this.getName() or getName()) Operations ● self.child('John') or just child('John') (cf. this.child('John') or child('John'))
  • 17. Enriching your models with OCL 17Made available under EPL v1.0 The OCLinEcore Editor Select model/People1.ecore Open With... OCLinEcore
  • 18. Enriching your models with OCL 18Made available under EPL v1.0 Example Validation Failure Open model/People1.xmi with Sample Reflective Ecore Editor Select Universe, Right button menu, Validate
  • 19. Enriching your models with OCL 19Made available under EPL v1.0 Multiplicities and Collections Meta-models specify multiplicities – children : Person[*] {ordered,unique} – parents : Person[0..2] {unique} ● multiplicities are specification concepts; not objects Implementations (e.g. Ecore) reify multiplicities – getChildren() returns a UniqueEList<Person> ● 'many' properties have extra implementation objects – getName() setName(newName) – getChildren().get(2) getChildren().add(newChild) OCL needs more than just UML multiplicities
  • 20. Enriching your models with OCL 20Made available under EPL v1.0 OCL 2.0 Collections Typed Collections partially reify multiplicities Collections are different to objects Navigation from a Collection uses -> – [Navigation from an Object (OclAny) uses .] Collections have type parameters Collections have useful operations Collections have very useful iterations Collection(T) Unordered Ordered Non-Unique Bag(T) Sequence(T) Unique Set(T) OrderedSet(T)
  • 21. Enriching your models with OCL 21Made available under EPL v1.0 Example Collection Operations Collection::size() self.children->size() 'get' Sequence::at(Integer) self.children->at(1) – nb 1 is the first index, size() is the last 'add' Collection(T)::including(T) : Collection(T) – returns a new collection with added content 'contains' Collection(T)::includes(T) : Boolean – tests existing content
  • 22. Enriching your models with OCL 22Made available under EPL v1.0 Collection::select iteration ● Children self.children ● Sons self.children->select(gender = Gender::MALE) self.children->select(child | child.gender = Gender::MALE) self.children->select(child : Person | child.gender = Gender::MALE) ● select(iterator : type | body) – filters to select elements for which the body is true ● reject(iterator : type | body) – filters to reject elements for which the body is true ● cf multi-line Java loop
  • 23. Enriching your models with OCL 23Made available under EPL v1.0 Collection::collect iteration ● Children self.children ● Grandchildren self.children->collect(children) self.children->collect(child | child.children) self.children->collect(child : Person | child.children) ● collect(iterator : type | body) – creates a new collection comprising all the bodies ● any, exists, forAll, isUnique, iterate, one,
  • 24. Enriching your models with OCL 24Made available under EPL v1.0 OCL Navigation Operators anObject. ... object navigation aCollection-> ... collection navigation Shorthands aCollection. ... implicit collect anObject-> ... implicit collection Object Collection . Navigation ? -> ? Navigation
  • 25. Enriching your models with OCL 25Made available under EPL v1.0 Implicit Collect Query parents.parents = parents->collect(parents) 3 symbols, compared to 4 lines of Java 4 grandparents, but not all different!
  • 26. Enriching your models with OCL 26Made available under EPL v1.0 Cleaned up query parents.parents->asSet()->sortedBy(name) ->asSet() converts to Set(Person), removes duplicates ->sortedBy(name) alphabeticizes
  • 27. Enriching your models with OCL 27Made available under EPL v1.0 Implicit Collection Conversion self->notEmpty() ● Standard OCL idiom – Converts self (if an object) to a Collection of self – If self is a defined object ● Implicit collection is not empty - true – If self is an undefined object (null) ● Implicit collection is empty - false – If self is an error (invalid) ● Implicit collection is also an error - invalid Object Collection . Navigation Implicit collect() -> Implicit Collection Navigation
  • 28. Enriching your models with OCL 28Made available under EPL v1.0 Collection::closure iteration ● children, grandchildren, greatgrandchildren etc self->closure(children) ● Implicit collection of self, then closure of all children [ closure in MDT/OCL 1.2, probably in OMG OCL 2.3 ]
  • 29. Enriching your models with OCL 29Made available under EPL v1.0 OCL as Implementation any(x) iteration selects an arbitrary element for which x is true.
  • 30. Enriching your models with OCL 30Made available under EPL v1.0 Derived Properties For Hera invariant MixedGenderParents: father.gender <> mother.gender; fails because father is null and mother is null
  • 31. Enriching your models with OCL 31Made available under EPL v1.0 Other OCL Capabilities No time to mention ● Other iterators, operations ● Tuples ● Association Classes/Qualifiers ● @pre values ● Messages ● States
  • 32. Enriching your models with OCL 32Made available under EPL v1.0 OMG OCL Progress OCL 2.2 (current) Collections are objects! – Collection conforms to OclAny – No need for Collection/Object polymorphic operations – Collections can mix Object/Collection content ? OCL 2.4 Specification defined by models – Auto-generated by Acceleo – Fix too many consistency/typo/realizability issues – Aligned with UML 2.4, MOF 2.4, XMI 2.4 Eclipse committers active on OMG RTF
  • 33. Enriching your models with OCL 33Made available under EPL v1.0 Eclipse MDT/OCL ● Original code contribution by IBM ● Java callable API – Parse/evaluate OCL 1.x against Ecore meta-models ● Ecore or UML meta-models ● OCL 2.0 (in so far as possible) ● Example Interactive Console ● towards OCL 2.2 ● Example Xtext editors (Ecore only) OMG OCL 1.x EMFT/OCL 1.0 OMG OCL 2.0 MDT/OCL 1.2 OMG OCL 2.2 MDT/OCL 3.0
  • 34. Enriching your models with OCL 34Made available under EPL v1.0 Validation History Use of OCL to define model validation ● EMF Validation Framework – Embed OCL in XML CDATA ● EMF, OCL EAnnotations – Embed OCL in EAnnotation – Genmodel to integrate ● Delegates – Embed OCL in EAnnotation – EObject.eInvoke() for dynamic invocation – OCLinEcore editor for semi-validated editing Eclipse 3.2 Eclipse 3.3 Eclipse 3.6 EMF 2.6 MDT/OCL 3.0
  • 35. Enriching your models with OCL 35Made available under EPL v1.0 OCLinEcore Editor ● Open with -> OCLinEcore ● Save As *.ecore – Loses formatting and comments ● Save As *.oclinecore – Text file preserves comments ● Useful for plain Ecore too: – Printable/reviewable text – Searchable/replaceable text
  • 36. Enriching your models with OCL 36Made available under EPL v1.0 Validation in Sample Ecore Editor OCLinEcore editor maintains EAnnotations automatically OCLinEcore editor provides OCL syntax checking OCLinEcore editor will provide OCL semantic checking
  • 37. Enriching your models with OCL 37Made available under EPL v1.0 (Example) Tools and Tips OCLinEcore editor for Ecore/embedded OCL CompleteOCL editor for OCL documents EssentialOCL editor for OCL Expressions (Papyrus) OCL Interactive Console – Invaluable ability to practice non-trivial expressions – Page Up/Page Down to reuse expressions Meta-model reload after change Genmodel settings for embedded OCL
  • 38. Enriching your models with OCL 38Made available under EPL v1.0 EMF Dynamic Instances Create/update Ecore meta-model Create XMI instance of EClass in meta-model Update XMI model, validate OCL constraints
  • 39. Enriching your models with OCL 39Made available under EPL v1.0 Meta-model Update Edit UML/Ecore meta-model in UML/Ecore editor – manual export of UML to Ecore in workspace – manual save of Ecore to workspace Create Dynamic Instance/Load Model in editor – validate/evaluate OCL constraints EMF does not support meta-model mutation – Model.eClass() reverts to an unresolved proxy – must exit and re-enter model editor UML meta-model Ecore meta-model Model realizes conformsTo My.uml My.ecore data.my
  • 40. Enriching your models with OCL 40Made available under EPL v1.0 Genmodel settings for OCL If not set to true ● MDT/OCL 3.0.0 OCL operation bodies not invoked ● MDT/OCL 3.0.1 Error Log as dynamic fallback used
  • 41. Enriching your models with OCL 41Made available under EPL v1.0 Eclipse MDT/OCL Futures 3.1 Core (Indigo) – Minor maintenance 3.1 Examples (Indigo) – New Ecore/UML blind pivot meta-model – Extensible modelled Standard Library – Xtext editors – Super-compliant - anticipating OMG OCL resolutions 4.0 Core + Tools + Examples (Indigo+1) – 3.1 Examples promoted to Core or Tools ● preserved external APIs, significant revision of internal APIs – OCL to Java code generation
  • 42. Enriching your models with OCL 42Made available under EPL v1.0 Which OCL Use Cases work When Released in Helios Example functionality in Helios Example functionality in Indigo, release in Indigo+1 Validate Evaluate Console Editor Static Java For Ecore 1.0 1.0 1.0 Examples 3.0 Examples Static Java For UML 1.2 1.2 3.1 Examples 3.1 Examples Complete OCL For Ecore 3.1 Examples 3.1 Examples 3.1 Examples 3.0 Examples Complete OCL For UML 3.1 Examples 3.1 Examples 3.1 Examples 3.1 Examples Embedded OCL in Ecore 3.0 3.0 3.0 Examples 3.0 Examples Embedded OCL in UML 3.1 Examples 3.1 Examples 3.1 Examples 3.1 Examples
  • 43. Enriching your models with OCL 43Made available under EPL v1.0 OCL 'Standard' Library Problems: OMG – library is not a model – uses non-UML concepts (Iterator) – no reflection for OclAny::oclType() Problems: MDT/OCL – hard coded, difficult to extend – UML/Ecore differences, long generic template lists – Ecore/EMOF discrepancies : EClass/Class Solution: OMG – library is a model defined by the new OCL meta-model Benefit: MDT/OCL – variants, extensible, unified, compliant
  • 44. Enriching your models with OCL 44Made available under EPL v1.0 OCL Models Problems: OMG – OCL is not fully UML-aligned – OCL modifies UML models (OclAny) – Complete OCL modifies UML models – OCL requires a modified sub-UML @ run-time Problems: MDT/OCL – UML/Ecore implementation differences, Ecore extension – Ecore/EMOF discrepancies Solution: OMG – Pivot meta-model defines UML @ run-time – Pivot model realises OCL-defined merges Benefit: MDT/OCL – unified, compliant, Ecore/EMOF hidden
  • 45. Enriching your models with OCL 45Made available under EPL v1.0 Evaluation Problems: MDT/OCL: – OCL interpreted by Java – OperationCallExp visit is very inefficient – Slightly hard to extend for QVTo, Acceleo – OCL within genmodelled Java is just a String ● significant first time parsing costs Solution: MDT/OCL – OCL to Java code generation – Library model references a Java class per feature – Code efficiency Benefit: MDT/OCL – extensible, faster (10 to 100 times ... iteration strategies) – Java in genmodelled Java
  • 46. Enriching your models with OCL 46Made available under EPL v1.0 Beyond OCL OMG OCL is a powerful expression language ● Declarative, First Order Predicate Calculus/Logic ● Model-oriented, UML navigation, multiplicities, ... Formal language supports formal analysis analysis supports optimisation OCL's usefulness calls for scalable implementation
  • 47. Enriching your models with OCL 47Made available under EPL v1.0 The Re-Evaluation Problem • A set of OCL expressions • A set of model elements • A model change notification • Which of the OCL expressions may have changed its value on which context elements? • Naïve approach ● re-evaluate all expressions for all their contexts ● takes O(|expressions| * |modelElements|)
  • 48. Enriching your models with OCL 48Made available under EPL v1.0 Example self.signature.parameters->size() = self.arguments->size()
  • 49. Enriching your models with OCL 49Made available under EPL v1.0 Naïve Re-Evaluation Sequence :Tool:Tool reevaluator:Adapterreevaluator:Adapter e : EObjecte : EObject 1: change 2: notifyChanged(msg) 3: reevaluateAllExpressionsOnAllTheirContexts |expressions| times |contexts| times That's way too slow!
  • 50. Enriching your models with OCL 50Made available under EPL v1.0 Idea: Find out from Notification which OCLExpressions may have changed Example: OCLExpression self.arguments->size() = self.signature.parameters->size() generates Notification filter (containment AND ((new value filter incl subs for: Call) OR (old value filter incl subs for: Call))) OR ((wantedClass conformsTo: Signature) AND (feature: parameters)) OR ((wantedClass conformsTo: Call) AND (feature: signature)) OR ((wantedClass conformsTo: Call) AND (feature: arguments)) Many expressions cause – many adapters – with one (often non-trivial) Notification filter each – which need evaluation for each change Notification
  • 51. Enriching your models with OCL 51Made available under EPL v1.0 Filter Events for OCLExpressions :Tool:Tool reevaluator:Adapterreevaluator:Adapter :ImpactAnalyzer:ImpactAnalyzer :EventManager:EventManager adapterForEventManager : EventAdapter adapterForEventManager : EventAdapter e : EObjecte : EObject 4: change 5: notifyChanged(msg) 6: handleEMFEvent(msg) 7: notifyChanged(msg) 8: reevaluate(e, allContextObjectsForE) 1: createFilterForExpression(e) 2: returns eventFilter 3: subscribe(eventFilter, reevaluator) |affected expressions| times |contexts| times { one-timesetup
  • 52. Enriching your models with OCL 52Made available under EPL v1.0 Scaling up Event Filtering Effort for event propagation still O(|expressions|) – slowed down even if no Notification delivered Number of OCLExpressions Number of OCLExpressions Notification #1 Notification #2
  • 53. Enriching your models with OCL 53Made available under EPL v1.0 to map Notification to Set<Adapter> Notification: - notifier - oldValue - newValue - feature - eventType notifier.eClass() conforms to Set<Adapter> interested Parameter [a1, a7, a15] Signature [a1, a3, a9] … … feature Set<Adapter> interested NamedElement.name [a3, a9, a14] Call.signature [a7, a15] … … … … Idea: Use HashMaps
  • 54. Enriching your models with OCL 54Made available under EPL v1.0 Faster delivery for Notifications matched by event filters Effects of HashMap-Based Eventing Number of OCLExpressions Number of OCLExpressions Notification #1 Notification #2 No time increase for expressions whose filters don't match a Notification
  • 55. Enriching your models with OCL 55Made available under EPL v1.0 Reducing Contexts for Re-Evaluation ● Use partial evaluation to prove value unchanged ● self.name='abc' not affected by name change from 'x' to 'y' ● Use Notification object (notifier, oldValue, newValue) to navigate “backwards” to affected context objects ● self.children.children.name ● change attribute name on x:Person ● contexts for re-evaluation: – x.parents.parents ● Tricky for iterators and recursive operations, but solved.
  • 56. Enriching your models with OCL 56Made available under EPL v1.0 10: reevaluate(e, contextObjects) :Tool:Tool reevaluator:Adapterreevaluator:Adapter :ImpactAnalyzer:ImpactAnalyzer :EventManager:EventManager e : EObjecte : EObjectadapterForEventManager : EventAdapter adapterForEventManager : EventAdapter 4: change 5: notifyChanged(msg) 6: handleEMFEvent(msg) 7: notifyChanged(msg) 8: getContextObjects(msg) 9: returns contextObjects 1: createFilterForExpression(e) 2: returns eventFilter 3: subscribe(eventFilter, reevaluator) Reduce Set of Context Elements |affected contexts| times |affected expressions| times { one-timesetup
  • 57. Enriching your models with OCL 57Made available under EPL v1.0 EventManager eventManager = EventManagerFactory.eINSTANCE.createEventManagerFor( editingDomain.getResourceSet()); final OCLExpression invariant = OCL.newInstance().createOCLHelper(). createQuery(“self.signature.parameters->size()=self.arguments->size()“); final ImpactAnalyzer impactAnalyzer = ImpactAnalyzerFactory.INSTANCE.createImpactAnalyzer(invariant, /* notifyOnNewContextElements */ true, oppositeEndFinder); Adapter adapter = new AdapterImpl() { @Override public void notifyChanged(Notification msg) { // revalidate invariant on context objects delivered by impact analysis: Collection<EObject> revalidateOn = impactAnalyzer.getContextObjects(msg); if (revalidateOn != null && !revalidateOn.isEmpty()) { revalidate(invariant, revalidateOn); } } }; eventManager.subscribe(impactAnalyzer.createFilterForExpression(), adapter); API Usage Example
  • 58. Enriching your models with OCL 58Made available under EPL v1.0 Benchmark Context Reduction (Average Case) Naive Event-Filtered (*6 Speed-Up) Event-Filtered and Context-Reduced (*1300 Speed-Up vs. Naive, *220 vs. Event-Filtered-Only) TotalRe-EvaluationTimeinSeconds Number of Model Elements
  • 59. Enriching your models with OCL 59Made available under EPL v1.0 Benchmark Context Reduction (Worst Case) Naive Event-Filtered (*2.4 Speed-Up) Event-Filtered and Context-Reduced (*27 Speed-Up vs. Naive, *11 vs. Event-Filtered-Only) TotalRe-EvaluationTimeinSeconds Number of Model Elements (apply changes to very central elements, referenced by all other model packages)
  • 60. Enriching your models with OCL 60Made available under EPL v1.0 Summary MDT/OCL originally focussed on Java API Interactive Modeling Tools require OCL IDE ● EMF, Xtext, Acceleo, QVTo, OCL support richer OCL development environment Extensibility required by QVTo, Acceleo Efficiency required for serious use IDE starting to appear ● Console, Editors Expect/Demand much more Contributions welcome
  • 61. Enriching your models with OCL 61Made available under EPL v1.0 OCL Resources ● OCL 2.2 Specification http://www.omg.org/spec/OCL/2.2 – Clause 7 is quite readable (many typos) ● The Object Constraint Language: Getting Your Models Ready For MDA Jos B. Warmer, Anneke Kleppe ● Eclipse MDT/OCL project http://www.eclipse.org/projects/project_summary.php?projectid=modeling.mdt.ocl ● Impact analysis GIT: http://anonymous@www.furcas.org/furcas.git/ SVN: https://www.hpi.uni-potsdam.de/giese/gforge/svn/bp2009 Accounts: https://www.hpi.uni-potsdam.de/giese/gforge/