Correct Reuse of Transformations is Hard to Guarantee (ICMT'16)

Steffen Zschaler
Steffen ZschalerSenior Lecturer at King's College London
Correct Reuse of Transformations is
Hard to Guarantee
Rick Salay, Steffen Zschaler, and Marsha
Chechik
July 04, 2016
Transformations can increase productivity
Activity Productivity increased Not used
Use of model-to-model transformations 50.8% 24.6%
Code generation 67.8% 12.0%
Data from J. Hutchinson, J. Whittle, M. Rouncefield, S. Kristoffersen: Empirical Assessment of MDE in Industry. ICSE’11
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 2
Transformations can increase productivity
Activity Productivity increased Not used
Use of model-to-model transformations 50.8% 24.6%
Code generation 67.8% 12.0%
Data from J. Hutchinson, J. Whittle, M. Rouncefield, S. Kristoffersen: Empirical Assessment of MDE in Industry. ICSE’11
But transformations not used as much:
• Too difficult
• Too costly to develop
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 2
Opportunity: Transformation reuse
• Reusable transformations can address this
– Reduce difficulty
• Transformations as encapsulated components
• Information hiding
– No need to understand implementation details to reuse transformation
– Reduce cost
• Build new transformations by composing reusable building blocks
• No need to redevelop everything from scratch
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 3
Opportunity: Transformation reuse
• Reusable transformations can address this
– Reduce difficulty
• Transformations as encapsulated components
• Information hiding
– No need to understand implementation details to reuse transformation
– Reduce cost
• Build new transformations by composing reusable building blocks
• No need to redevelop everything from scratch
BUT: Only if we can ensure correct reuse of transformations !
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 3
Correct transformation reuse
1. What do we mean by it?
2. How do existing reuse mechanisms fit in?
3. Why is it difficult?
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 4
Correct transformation reuse
1. What do we mean by it?
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 4
Transformation Reuse
Needs a reuse mechanism
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 5
Transformation Reuse
Needs a reuse mechanism
1. Model type mapping:
• Transformation defined over a set of model types but applied to a
different set
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 5
Provided by engineer
Transformation Reuse
Needs a reuse mechanism
1. Model type mapping:
• Transformation defined over a set of model types but applied to a
different set
2. Derivation of reused transformation:
• Reuse will require some changes to the transformation
• At least
– Pre-processing of input models
– Post-processing of output models
• Possibly rewriting the transformation itself
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 5
Provided by engineer
Automatically by reuse mechanism
Example
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 6
s0 s1
s4s2
a
a a
b
b
b
b
s0 s1
s2
a
a
b
b b
minimize
A minimization transformation for state machines
Example (2)
• State machines are really just a particular kind of
typed graphs:
– Two types of nodes
– Edges with labels
• So, can we reuse minimize for arbitrary typed graphs
of this form?
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 7
Example (3)
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 8
A B
DC
a
a a
b
b
b
b
A B
C
a
a
b
b b
minimize
A minimization transformation for typed graphs?
Example (3)
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 8
A B
DC
a
a a
b
b
b
b
A B
C
a
a
b
b b
minimize
A minimization transformation for typed graphs?
Transformation Intent
• Such reuse doesn’t preserve the intent of minimize
– Minimising state machines is based on assumptions about the
semantics of state machines
• Correct reuse requires intent preservation
– Across different meta-models (or model types)
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 9
Transformation Intent
• Such reuse doesn’t preserve the intent of minimize
– Minimising state machines is based on assumptions about the
semantics of state machines
• Correct reuse requires intent preservation
– Across different meta-models (or model types)
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 9
Example: Intent Candidates
1. Preserves well-formedness
2. Does model minimization
3. Does behavioural model minimization
4. Does state machine minimization
5. Does minimization using the implication table method
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 10
Example: Intent Candidates
2. Does model minimization
3. Does behavioural model minimization
4. Does state machine minimization
5. Does minimization using the implication table method
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 10
Too unspecific: Not worth reusing
Example: Intent Candidates
2. Does model minimization
3. Does behavioural model minimization
4. Does state machine minimization
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 10
Too unspecific: Not worth reusing
Too specific: Not reusable
Soundness and Completeness
• A reuse mechanism is
– Sound if
• It produces only reused transformations that preserve intent
– Complete if
• It can produce all intent-preserving reused transformations
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 11
Correct transformation reuse
2. How do existing reuse mechanisms fit in?
3. Why is it difficult?
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 12
Correct transformation reuse
2. How do existing reuse mechanisms fit in?
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 12
Existing Mechanisms
• Model (sub-)typing (Steel, Guy, …)
– Model type mapping:
• Implicit morphism established by name identity
– Transformation derivation:
• None needed, name-based access ensures reusability
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 13
Existing Mechanisms
• Model concepts (de Lara, Guerra, Rose, …)
– Model type mapping:
• Explicit bindings establish clan morphism
– Transformation derivation:
• Input / Output transformation or transformation rewriting
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 13
Model Sub-typing Example
04/07/2016
Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413
F: “Takes as input a state machine and produces
a lookup table showing the correspondence
between the current state, an arriving event, and
the resultant state.“
(I1) Produce a tabular representation of all the
state-state transitions;
(I2) Produce a tabular representation of the state
machine (i.e., same set of traces as a table).
Model Sub-typing Example
04/07/2016
Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413
F: “Takes as input a state machine and produces
a lookup table showing the correspondence
between the current state, an arriving event, and
the resultant state.“
(I1) Produce a tabular representation of all the
state-state transitions;
(I2) Produce a tabular representation of the state
machine (i.e., same set of traces as a table).
Model Sub-typing Example
04/07/2016
Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413
F: “Takes as input a state machine and produces
a lookup table showing the correspondence
between the current state, an arriving event, and
the resultant state.“
(I1) Produce a tabular representation of all the
state-state transitions;
(I2) Produce a tabular representation of the state
machine (i.e., same set of traces as a table).
Model Sub-typing Example
04/07/2016

Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413
F: “Takes as input a state machine and produces
a lookup table showing the correspondence
between the current state, an arriving event, and
the resultant state.“
(I1) Produce a tabular representation of all the
state-state transitions;
(I2) Produce a tabular representation of the state
machine (i.e., same set of traces as a table).
Model Sub-typing Example
04/07/2016

Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413
F: “Takes as input a state machine and produces
a lookup table showing the correspondence
between the current state, an arriving event, and
the resultant state.“
(I1) Produce a tabular representation of all the
state-state transitions;
(I2) Produce a tabular representation of the state
machine (i.e., same set of traces as a table).
Cannot preserve I2
 Unsound reuse
Model Sub-typing Example
04/07/2016

Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413
F: “Takes as input a state machine and produces
a lookup table showing the correspondence
between the current state, an arriving event, and
the resultant state.“
(I1) Produce a tabular representation of all the
state-state transitions;
(I2) Produce a tabular representation of the state
machine (i.e., same set of traces as a table).
Can easily preserve I1 and I2
 Incomplete reuse
Model Concepts Example
Person
+age: int
Player
+age: int
+level: int
ConceptMeta-model
Provides a set of rules for manually establishing
bindings between meta-models and concepts.
Allow multiple valid bindings for the same meta-
model and concept.
Likely complete reuse
Unsound reuse
Rose, L., Guerra, E., de Lara, J., Etien, A., Kolovos, D., Paige, R.: Genericity for Model Management Operations. SoSyM (2011)
de Lara, J., Guerra, E.: Towards the Flexible Reuse of Model Transformations: A Formal Approach Based on Graph Transformation. J. Logical and
Algebraic Methods in Programming 83(5{6) (2014) 427–458
Model Concepts Example
Person
+age: int
Player
+age: int
+level: int
ConceptMeta-model
Provides a set of rules for manually establishing
bindings between meta-models and concepts.
Allow multiple valid bindings for the same meta-
model and concept.
Likely complete reuse
Unsound reuse
Rose, L., Guerra, E., de Lara, J., Etien, A., Kolovos, D., Paige, R.: Genericity for Model Management Operations. SoSyM (2011)
de Lara, J., Guerra, E.: Towards the Flexible Reuse of Model Transformations: A Formal Approach Based on Graph Transformation. J. Logical and
Algebraic Methods in Programming 83(5{6) (2014) 427–458
Model Concepts Example
Person
+age: int
Player
+age: int
+level: int
a
ConceptMeta-model
Provides a set of rules for manually establishing
bindings between meta-models and concepts.
Allow multiple valid bindings for the same meta-
model and concept.
Likely complete reuse
Unsound reuse
Rose, L., Guerra, E., de Lara, J., Etien, A., Kolovos, D., Paige, R.: Genericity for Model Management Operations. SoSyM (2011)
de Lara, J., Guerra, E.: Towards the Flexible Reuse of Model Transformations: A Formal Approach Based on Graph Transformation. J. Logical and
Algebraic Methods in Programming 83(5{6) (2014) 427–458
Model Concepts Example
Person
+age: int
Player
+age: int
+level: int b
ConceptMeta-model
Provides a set of rules for manually establishing
bindings between meta-models and concepts.
Allow multiple valid bindings for the same meta-
model and concept.
Likely complete reuse
Unsound reuse
Rose, L., Guerra, E., de Lara, J., Etien, A., Kolovos, D., Paige, R.: Genericity for Model Management Operations. SoSyM (2011)
de Lara, J., Guerra, E.: Towards the Flexible Reuse of Model Transformations: A Formal Approach Based on Graph Transformation. J. Logical and
Algebraic Methods in Programming 83(5{6) (2014) 427–458
Intent Preservation of Existing Mechanisms
• Make no assertions about intent preservation
• Our analysis:
• Why?
– Sound and complete reuse has not been on the agenda so far
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 16
Soundness Completeness
Model (sub-)typing  
Model concepts  ~
Correct transformation reuse
3. Why is it difficult?
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 17
What’s difficult, then?
• Transformation semantics (and intents) depend on
– Syntax of source and target languages
• Can be aligned using standard morphism constructions
• Model typing and model concepts do this
– Semantics of source and target languages
• Can be in arbitrary relation to language syntax
• Expression depends on language syntax
• No easy mappings
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 18
Reuse in Special Cases
• Families of transformations
– Parametrising transformation intents and implementations with
language-specific predicates
– Reuse implies providing concrete predicates
– Proofs can be generalised  sound implementations
– BUT Implementations will usually not be efficient
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 19
Example:
Model Minimizing Transformations
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 20
Example:
Model Minimizing Transformations
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 20
Parametrised over
semantic equivalence
Example:
Model Minimizing Transformations
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 20
Parametrised
over model size
Example:
Model Minimizing Transformations
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 20
Generic algorithm works for all model types
for which the parameters can be defined
 Sound and complete reuse mechanism
BUT: Very inefficient transformation
Reuse in Special Cases (2)
• Families of model types
– Restrict transformation reuse to a specific family of languages
• E.g., state-machine models
– Restricts semantic variability
– Allows more efficient reusable implementations
 Future work
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 21
Conclusions / Outlook
• Semantics are key to correct transformation reuse
– Transformation intents
– Language semantics
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 22
Conclusions / Outlook
• Semantics are key to correct transformation reuse
– Transformation intents
– Language semantics
• Research challenges
1. Effective description of intents
2. Sufficient conditions for simple, correct transformation reuse within
families of modelling languages
3. Reuse calculus for specific classes of intents and transformations
4. Mechanisms and languages for constructing concrete, sound reuse
mechanisms for specific classes of intents
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 22
QUESTIONS?
szschaler@acm.org
04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 23
1 of 46

Recommended

Ppt by harminder singh bal by
Ppt by harminder singh balPpt by harminder singh bal
Ppt by harminder singh balHarminder Singh Bal
634 views6 slides
Towards Constraint-Based Model Types: A Generalised Formal Foundation for Mod... by
Towards Constraint-Based Model Types: A Generalised Formal Foundation for Mod...Towards Constraint-Based Model Types: A Generalised Formal Foundation for Mod...
Towards Constraint-Based Model Types: A Generalised Formal Foundation for Mod...Steffen Zschaler
260 views23 slides
How did you attract/Address your audience? by
How did you attract/Address your audience?How did you attract/Address your audience?
How did you attract/Address your audience?Temi Ayadi
235 views7 slides
Towards Modular Code Generators Using Symmetric Language-Aware Aspects by
Towards Modular Code Generators Using Symmetric Language-Aware AspectsTowards Modular Code Generators Using Symmetric Language-Aware Aspects
Towards Modular Code Generators Using Symmetric Language-Aware AspectsSteffen Zschaler
290 views23 slides
How women are objectified in mainstream television by
How women are objectified in mainstream televisionHow women are objectified in mainstream television
How women are objectified in mainstream televisionTemi Ayadi
207 views3 slides
Application of fuzzy logic by
Application of fuzzy logicApplication of fuzzy logic
Application of fuzzy logicViraj Patel
68.1K views22 slides

More Related Content

Similar to Correct Reuse of Transformations is Hard to Guarantee (ICMT'16)

Déjà Vu All Over Again - The Cambridge Capital Controversies and Skill-Biased... by
Déjà Vu All Over Again - The Cambridge Capital Controversies and Skill-Biased...Déjà Vu All Over Again - The Cambridge Capital Controversies and Skill-Biased...
Déjà Vu All Over Again - The Cambridge Capital Controversies and Skill-Biased...pkconference
635 views16 slides
Model based software testing by
Model based software testingModel based software testing
Model based software testingSachin MK
1.4K views22 slides
Time series and panel data in econometrics by
Time series and panel data in econometricsTime series and panel data in econometrics
Time series and panel data in econometricsTorajInteaash2
149 views37 slides
Paper473 by
Paper473Paper473
Paper473carlosceal
75 views21 slides
A WORKSPACE SIMULATION FOR TAL TR-2 ARTICULATED ROBOT by
A WORKSPACE SIMULATION FOR TAL TR-2 ARTICULATED ROBOT A WORKSPACE SIMULATION FOR TAL TR-2 ARTICULATED ROBOT
A WORKSPACE SIMULATION FOR TAL TR-2 ARTICULATED ROBOT IAEME Publication
176 views6 slides
FE8513 Fin Time Series-Assignment by
FE8513 Fin Time Series-AssignmentFE8513 Fin Time Series-Assignment
FE8513 Fin Time Series-AssignmentRaktim Ray
179 views18 slides

Similar to Correct Reuse of Transformations is Hard to Guarantee (ICMT'16) (8)

Déjà Vu All Over Again - The Cambridge Capital Controversies and Skill-Biased... by pkconference
Déjà Vu All Over Again - The Cambridge Capital Controversies and Skill-Biased...Déjà Vu All Over Again - The Cambridge Capital Controversies and Skill-Biased...
Déjà Vu All Over Again - The Cambridge Capital Controversies and Skill-Biased...
pkconference635 views
Model based software testing by Sachin MK
Model based software testingModel based software testing
Model based software testing
Sachin MK1.4K views
Time series and panel data in econometrics by TorajInteaash2
Time series and panel data in econometricsTime series and panel data in econometrics
Time series and panel data in econometrics
TorajInteaash2149 views
A WORKSPACE SIMULATION FOR TAL TR-2 ARTICULATED ROBOT by IAEME Publication
A WORKSPACE SIMULATION FOR TAL TR-2 ARTICULATED ROBOT A WORKSPACE SIMULATION FOR TAL TR-2 ARTICULATED ROBOT
A WORKSPACE SIMULATION FOR TAL TR-2 ARTICULATED ROBOT
IAEME Publication176 views
FE8513 Fin Time Series-Assignment by Raktim Ray
FE8513 Fin Time Series-AssignmentFE8513 Fin Time Series-Assignment
FE8513 Fin Time Series-Assignment
Raktim Ray179 views
ENGR 131 Elementary Computer ProgrammingTeam IN – Instructor by TanaMaeskm
ENGR 131  Elementary Computer ProgrammingTeam IN – InstructorENGR 131  Elementary Computer ProgrammingTeam IN – Instructor
ENGR 131 Elementary Computer ProgrammingTeam IN – Instructor
TanaMaeskm8 views
Control charts are monitoring schemes, widely used in operations a.docx by donnajames55
Control charts are monitoring schemes, widely used in operations a.docxControl charts are monitoring schemes, widely used in operations a.docx
Control charts are monitoring schemes, widely used in operations a.docx
donnajames5512 views

Recently uploaded

Unleash The Monkeys by
Unleash The MonkeysUnleash The Monkeys
Unleash The MonkeysJacob Duijzer
7 views28 slides
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...TomHalpin9
5 views29 slides
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDeltares
7 views23 slides
Copilot Prompting Toolkit_All Resources.pdf by
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdfRiccardo Zamana
8 views4 slides
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports by
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsRa'Fat Al-Msie'deen
5 views49 slides
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut... by
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...Deltares
7 views28 slides

Recently uploaded(20)

Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by TomHalpin9
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
TomHalpin95 views
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by Deltares
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
Deltares7 views
Copilot Prompting Toolkit_All Resources.pdf by Riccardo Zamana
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdf
Riccardo Zamana8 views
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports by Ra'Fat Al-Msie'deen
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut... by Deltares
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
Deltares7 views
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... by Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri795 views
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -... by Deltares
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
DSD-INT 2023 Simulating a falling apron in Delft3D 4 - Engineering Practice -...
Deltares6 views
Fleet Management Software in India by Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable11 views
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares14 views
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the... by Deltares
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
Deltares6 views
Airline Booking Software by SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta5 views
Generic or specific? Making sensible software design decisions by Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... by sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik5 views
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h... by Deltares
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
Deltares5 views
Software evolution understanding: Automatic extraction of software identifier... by Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...

Correct Reuse of Transformations is Hard to Guarantee (ICMT'16)

  • 1. Correct Reuse of Transformations is Hard to Guarantee Rick Salay, Steffen Zschaler, and Marsha Chechik July 04, 2016
  • 2. Transformations can increase productivity Activity Productivity increased Not used Use of model-to-model transformations 50.8% 24.6% Code generation 67.8% 12.0% Data from J. Hutchinson, J. Whittle, M. Rouncefield, S. Kristoffersen: Empirical Assessment of MDE in Industry. ICSE’11 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 2
  • 3. Transformations can increase productivity Activity Productivity increased Not used Use of model-to-model transformations 50.8% 24.6% Code generation 67.8% 12.0% Data from J. Hutchinson, J. Whittle, M. Rouncefield, S. Kristoffersen: Empirical Assessment of MDE in Industry. ICSE’11 But transformations not used as much: • Too difficult • Too costly to develop 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 2
  • 4. Opportunity: Transformation reuse • Reusable transformations can address this – Reduce difficulty • Transformations as encapsulated components • Information hiding – No need to understand implementation details to reuse transformation – Reduce cost • Build new transformations by composing reusable building blocks • No need to redevelop everything from scratch 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 3
  • 5. Opportunity: Transformation reuse • Reusable transformations can address this – Reduce difficulty • Transformations as encapsulated components • Information hiding – No need to understand implementation details to reuse transformation – Reduce cost • Build new transformations by composing reusable building blocks • No need to redevelop everything from scratch BUT: Only if we can ensure correct reuse of transformations ! 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 3
  • 6. Correct transformation reuse 1. What do we mean by it? 2. How do existing reuse mechanisms fit in? 3. Why is it difficult? 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 4
  • 7. Correct transformation reuse 1. What do we mean by it? 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 4
  • 8. Transformation Reuse Needs a reuse mechanism 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 5
  • 9. Transformation Reuse Needs a reuse mechanism 1. Model type mapping: • Transformation defined over a set of model types but applied to a different set 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 5 Provided by engineer
  • 10. Transformation Reuse Needs a reuse mechanism 1. Model type mapping: • Transformation defined over a set of model types but applied to a different set 2. Derivation of reused transformation: • Reuse will require some changes to the transformation • At least – Pre-processing of input models – Post-processing of output models • Possibly rewriting the transformation itself 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 5 Provided by engineer Automatically by reuse mechanism
  • 11. Example 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 6 s0 s1 s4s2 a a a b b b b s0 s1 s2 a a b b b minimize A minimization transformation for state machines
  • 12. Example (2) • State machines are really just a particular kind of typed graphs: – Two types of nodes – Edges with labels • So, can we reuse minimize for arbitrary typed graphs of this form? 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 7
  • 13. Example (3) 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 8 A B DC a a a b b b b A B C a a b b b minimize A minimization transformation for typed graphs?
  • 14. Example (3) 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 8 A B DC a a a b b b b A B C a a b b b minimize A minimization transformation for typed graphs?
  • 15. Transformation Intent • Such reuse doesn’t preserve the intent of minimize – Minimising state machines is based on assumptions about the semantics of state machines • Correct reuse requires intent preservation – Across different meta-models (or model types) 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 9
  • 16. Transformation Intent • Such reuse doesn’t preserve the intent of minimize – Minimising state machines is based on assumptions about the semantics of state machines • Correct reuse requires intent preservation – Across different meta-models (or model types) 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 9
  • 17. Example: Intent Candidates 1. Preserves well-formedness 2. Does model minimization 3. Does behavioural model minimization 4. Does state machine minimization 5. Does minimization using the implication table method 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 10
  • 18. Example: Intent Candidates 2. Does model minimization 3. Does behavioural model minimization 4. Does state machine minimization 5. Does minimization using the implication table method 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 10 Too unspecific: Not worth reusing
  • 19. Example: Intent Candidates 2. Does model minimization 3. Does behavioural model minimization 4. Does state machine minimization 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 10 Too unspecific: Not worth reusing Too specific: Not reusable
  • 20. Soundness and Completeness • A reuse mechanism is – Sound if • It produces only reused transformations that preserve intent – Complete if • It can produce all intent-preserving reused transformations 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 11
  • 21. Correct transformation reuse 2. How do existing reuse mechanisms fit in? 3. Why is it difficult? 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 12
  • 22. Correct transformation reuse 2. How do existing reuse mechanisms fit in? 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 12
  • 23. Existing Mechanisms • Model (sub-)typing (Steel, Guy, …) – Model type mapping: • Implicit morphism established by name identity – Transformation derivation: • None needed, name-based access ensures reusability 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 13
  • 24. Existing Mechanisms • Model concepts (de Lara, Guerra, Rose, …) – Model type mapping: • Explicit bindings establish clan morphism – Transformation derivation: • Input / Output transformation or transformation rewriting 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 13
  • 25. Model Sub-typing Example 04/07/2016 Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413 F: “Takes as input a state machine and produces a lookup table showing the correspondence between the current state, an arriving event, and the resultant state.“ (I1) Produce a tabular representation of all the state-state transitions; (I2) Produce a tabular representation of the state machine (i.e., same set of traces as a table).
  • 26. Model Sub-typing Example 04/07/2016 Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413 F: “Takes as input a state machine and produces a lookup table showing the correspondence between the current state, an arriving event, and the resultant state.“ (I1) Produce a tabular representation of all the state-state transitions; (I2) Produce a tabular representation of the state machine (i.e., same set of traces as a table).
  • 27. Model Sub-typing Example 04/07/2016 Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413 F: “Takes as input a state machine and produces a lookup table showing the correspondence between the current state, an arriving event, and the resultant state.“ (I1) Produce a tabular representation of all the state-state transitions; (I2) Produce a tabular representation of the state machine (i.e., same set of traces as a table).
  • 28. Model Sub-typing Example 04/07/2016  Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413 F: “Takes as input a state machine and produces a lookup table showing the correspondence between the current state, an arriving event, and the resultant state.“ (I1) Produce a tabular representation of all the state-state transitions; (I2) Produce a tabular representation of the state machine (i.e., same set of traces as a table).
  • 29. Model Sub-typing Example 04/07/2016  Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413 F: “Takes as input a state machine and produces a lookup table showing the correspondence between the current state, an arriving event, and the resultant state.“ (I1) Produce a tabular representation of all the state-state transitions; (I2) Produce a tabular representation of the state machine (i.e., same set of traces as a table). Cannot preserve I2  Unsound reuse
  • 30. Model Sub-typing Example 04/07/2016  Steel, J., Jezequel, J.M.: On Model Typing. SoSyM 6(4) (2007) 401–413 F: “Takes as input a state machine and produces a lookup table showing the correspondence between the current state, an arriving event, and the resultant state.“ (I1) Produce a tabular representation of all the state-state transitions; (I2) Produce a tabular representation of the state machine (i.e., same set of traces as a table). Can easily preserve I1 and I2  Incomplete reuse
  • 31. Model Concepts Example Person +age: int Player +age: int +level: int ConceptMeta-model Provides a set of rules for manually establishing bindings between meta-models and concepts. Allow multiple valid bindings for the same meta- model and concept. Likely complete reuse Unsound reuse Rose, L., Guerra, E., de Lara, J., Etien, A., Kolovos, D., Paige, R.: Genericity for Model Management Operations. SoSyM (2011) de Lara, J., Guerra, E.: Towards the Flexible Reuse of Model Transformations: A Formal Approach Based on Graph Transformation. J. Logical and Algebraic Methods in Programming 83(5{6) (2014) 427–458
  • 32. Model Concepts Example Person +age: int Player +age: int +level: int ConceptMeta-model Provides a set of rules for manually establishing bindings between meta-models and concepts. Allow multiple valid bindings for the same meta- model and concept. Likely complete reuse Unsound reuse Rose, L., Guerra, E., de Lara, J., Etien, A., Kolovos, D., Paige, R.: Genericity for Model Management Operations. SoSyM (2011) de Lara, J., Guerra, E.: Towards the Flexible Reuse of Model Transformations: A Formal Approach Based on Graph Transformation. J. Logical and Algebraic Methods in Programming 83(5{6) (2014) 427–458
  • 33. Model Concepts Example Person +age: int Player +age: int +level: int a ConceptMeta-model Provides a set of rules for manually establishing bindings between meta-models and concepts. Allow multiple valid bindings for the same meta- model and concept. Likely complete reuse Unsound reuse Rose, L., Guerra, E., de Lara, J., Etien, A., Kolovos, D., Paige, R.: Genericity for Model Management Operations. SoSyM (2011) de Lara, J., Guerra, E.: Towards the Flexible Reuse of Model Transformations: A Formal Approach Based on Graph Transformation. J. Logical and Algebraic Methods in Programming 83(5{6) (2014) 427–458
  • 34. Model Concepts Example Person +age: int Player +age: int +level: int b ConceptMeta-model Provides a set of rules for manually establishing bindings between meta-models and concepts. Allow multiple valid bindings for the same meta- model and concept. Likely complete reuse Unsound reuse Rose, L., Guerra, E., de Lara, J., Etien, A., Kolovos, D., Paige, R.: Genericity for Model Management Operations. SoSyM (2011) de Lara, J., Guerra, E.: Towards the Flexible Reuse of Model Transformations: A Formal Approach Based on Graph Transformation. J. Logical and Algebraic Methods in Programming 83(5{6) (2014) 427–458
  • 35. Intent Preservation of Existing Mechanisms • Make no assertions about intent preservation • Our analysis: • Why? – Sound and complete reuse has not been on the agenda so far 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 16 Soundness Completeness Model (sub-)typing   Model concepts  ~
  • 36. Correct transformation reuse 3. Why is it difficult? 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 17
  • 37. What’s difficult, then? • Transformation semantics (and intents) depend on – Syntax of source and target languages • Can be aligned using standard morphism constructions • Model typing and model concepts do this – Semantics of source and target languages • Can be in arbitrary relation to language syntax • Expression depends on language syntax • No easy mappings 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 18
  • 38. Reuse in Special Cases • Families of transformations – Parametrising transformation intents and implementations with language-specific predicates – Reuse implies providing concrete predicates – Proofs can be generalised  sound implementations – BUT Implementations will usually not be efficient 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 19
  • 39. Example: Model Minimizing Transformations 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 20
  • 40. Example: Model Minimizing Transformations 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 20 Parametrised over semantic equivalence
  • 41. Example: Model Minimizing Transformations 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 20 Parametrised over model size
  • 42. Example: Model Minimizing Transformations 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 20 Generic algorithm works for all model types for which the parameters can be defined  Sound and complete reuse mechanism BUT: Very inefficient transformation
  • 43. Reuse in Special Cases (2) • Families of model types – Restrict transformation reuse to a specific family of languages • E.g., state-machine models – Restricts semantic variability – Allows more efficient reusable implementations  Future work 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 21
  • 44. Conclusions / Outlook • Semantics are key to correct transformation reuse – Transformation intents – Language semantics 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 22
  • 45. Conclusions / Outlook • Semantics are key to correct transformation reuse – Transformation intents – Language semantics • Research challenges 1. Effective description of intents 2. Sufficient conditions for simple, correct transformation reuse within families of modelling languages 3. Reuse calculus for specific classes of intents and transformations 4. Mechanisms and languages for constructing concrete, sound reuse mechanisms for specific classes of intents 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 22
  • 46. QUESTIONS? szschaler@acm.org 04/07/2016 Salay, Zschaler, Chechik: Correct Reuse of Transformations 23

Editor's Notes

  1. Mention we don’t have the final answers to these questions. Our contribution is in enabling the questions to be asked.
  2. Mention we don’t have the final answers to these questions. Our contribution is in enabling the questions to be asked.
  3. Mention we don’t have the final answers to these questions. Our contribution is in enabling the questions to be asked.
  4. Mention we don’t have the final answers to these questions. Our contribution is in enabling the questions to be asked.
  5. Mention we don’t have the final answers to these questions. Our contribution is in enabling the questions to be asked.