transformations of software product lineschechik/pubs/models17-category.pdfbuild on existing formal...
TRANSCRIPT
![Page 1: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/1.jpg)
Transformations of Software Product Lines:
A Generalizing Framework based on Category Theory
Gabriele Taentzer, Rick Salay, Daniel StrΓΌber and Marsha Chechik
![Page 2: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/2.jpg)
Software Product Lines (SPL)
β¦
Manage a large number of similar but different artifact variants (products)
Washing Machine Co.
2 Transformations of Software Product Lines
![Page 3: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/3.jpg)
SPL Structure
β¦
SPL (annotative) represented by Domain Model β combined parts from all products Feature Model β shows possible features and restrictions for products
Feature Model
Wash
Heat
Dry
Delay
excludes
Domain Model
3 Transformations of Software Product Lines
![Page 4: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/4.jpg)
SPL Configuration β example
β¦
+Dry product Feature configuration: {Wash, Dry}
Feature Model
Wash
Heat
Dry
Delay
excludes
4 Transformations of Software Product Lines
![Page 5: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/5.jpg)
Domain Model
SPL of models:washing machine state machine
LockingWaiting
exit/HeaterOff()
Washing
entry/TempCheck()
Drying
Unlocking
[PRESS_START_WITH_DELAY]
/wash.Start()
/ QuickCool()
/ QuickCool()
[PRESS_START]/ wash.Start()
Presence Conditions
Feature Model
Wash
Heat
Dry
Delay
excludes
5 Transformations of Software Product Lines
[PRESS_START] /HeaterOn()
HeatDelay
HeatHeat β¨ Delay
Heat β¨ Delay
Heat β¨ Delay
Heat
DryDry
Dry
Β¬Dry
Β¬Heat
Heat
![Page 6: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/6.jpg)
Domain Model
Example Product: {Wash, Dry}
LockingWaiting
exit/HeaterOff()
Washing
entry/TempCheck()
Drying
Unlocking
[PRESS_START_WITH_DELAY]
/wash.Start()
/ QuickCool()
/ QuickCool()
[PRESS_START]/ wash.Start()
Feature Model
6 Transformations of Software Product Lines
[PRESS_START] /HeaterOn()
Wash
Heat
Dry
Delay
excludes
HeatDelay
HeatHeat β¨ Delay
Heat β¨ Delay
Heat β¨ Delay
Heat
DryDry
Dry
Β¬Dry
Β¬Heat
Heat
![Page 7: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/7.jpg)
Product: {Wash, Dry}
Example Product: {Wash, Dry}
Locking
Washing
Drying
Unlocking
/ QuickCool()
[PRESS_START]/ wash.Start()
Feature Model
Wash
Heat
Dry
Delay
excludes
7 Transformations of Software Product Lines
![Page 8: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/8.jpg)
Outline Software Product Lines Transformations of SPLs What is the problem? Approach (part 1): Category of SPLs Approach (part II): SPL Transformations using graph transformation rules Summary of results and next steps
8 Transformations of Software Product Lines
![Page 9: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/9.jpg)
Key types of SPL transformations in the Literature
Lifting Transformations to Product Lines9
1. Feature model transformations Supports reasoning about additions, deletions, and modifications of features e.g., Transformation rules to specify high-level feature editing operations [BΓΌrdek et al.]
2. Lifted model transformations Adapts single-product transformation rules to the entire SPL [Salay et al. ] Effect of lifting is same as applying the rule to each product separately.
3. SPL refinement Supports safe evolution SPL by controlling impact on existing products. e.g., Modifications restricted so that only a subset of products change [Sampaio et al.]
![Page 10: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/10.jpg)
Motivation
Lifting Transformations to Product Lines10
Types (1) & (3) apply only to feature models; type (2) applies only to domain models
None of these types of transformation apply to entire SPLβs βfeature and domain models!
But, this is needed in practice: Addition or deletion of features usually entails the corresponding changes in
the domain model Research Objective:
A formal characterization of SPL transformations that addresses both feature and domain models.
![Page 11: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/11.jpg)
Approach
Lifting Transformations to Product Lines11
Build on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]
Our strategy: given any suitable (to be defined) category π΄π΄π΄π΄π΄π΄ of models, 1. Show how to define the category πππΏπΏπ΄π΄π΄π΄π΄π΄ of SPLs having π΄π΄π΄π΄π΄π΄ models as domain models.2. Use AGT to define transformation rules for SPLs in πππΏπΏπ΄π΄π΄π΄π΄π΄
Benefits: General, systematic and covers both feature and domain model parts of an SPL Gets formal techniques from AGT that support SPL transformation development
e.g., conflict and dependency analysis, confluence analysis, etc.
[1] H. Ehrig, K. Ehrig, U. Prange, and G. Taentzer, Fundamentals of Algebraic Graph Transformation, ser. Monographs in Theoretical Computer Science. Springer, 2006
![Page 12: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/12.jpg)
Outline Software Product Lines Transformations of SPLs What is the problem? Approach (part 1): Category of SPLs Approach (part II): SPL Transformations using graph transformation rules Summary of results and next steps
12 Transformations of Software Product Lines
![Page 13: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/13.jpg)
Defining category πππΏπΏπ΄π΄π΄π΄π΄π΄ β objects and morphisms
Transformations of Software Product Lines13
An SPL ππ = (πΉπΉππ,Ξ¦ππ,ππππ, ππππ) of πππΏπΏπ΄π΄π΄π΄π΄π΄ consists of: (feature model) Set πΉπΉππ of features with set Ξ¦ππ of propositional feature constraints
over πΉπΉππ defining allowable feature configurations (domain model) π΄π΄π΄π΄π΄π΄-model ππππ (presence conditions) Function ππππ assigns a propositional formula over πΉπΉππ to each
submodel of ππππ defining for which feature configurations the submodel is present
An SPL morphism β:ππ β ππ is a mapping from SPL ππ to ππ such that (feature mapping) β maps πΉπΉππ to πΉπΉππ (domain mapping) β maps π·π·ππ to π·π·ππ (using a π΄π΄π΄π΄π΄π΄-morphism)
above mappings constrained so that products of ππ map into products of ππ
![Page 14: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/14.jpg)
Domain Model π·π·ππππ
Washing machine SPL ππππ in πππΏπΏπΊπΊπ΄π΄
LockingWaiting
exit/HeaterOff()
Washing
entry/TempCheck()
Drying
Unlocking
[PRESS_START_WITH_DELAY]
/wash.Start()
/ QuickCool()
/ QuickCool()
[PRESS_START]/ wash.Start()
Feature ModelπΉπΉππππ: ππππππβ,π»π»π»π»πππ»π»,π·π·π»π»π·π·πππ·π·,π·π·π·π·π·π·Ξ¦ππππ: {ππππππβ, Β¬(π·π·π»π»π·π·πππ·π· β§ π»π»π»π»πππ»π»)}
14 Transformations of Software Product Lines
[PRESS_START] /HeaterOn()
π·π·π·π·π·π· β§ π»π»π»π»πππ»π»
Presence condition(example)
ππππππ
![Page 15: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/15.jpg)
Product: {ππππππβ,π·π·π·π·π·π·}
Example Product: {Wash, Dry}
Locking
Washing
Drying
Unlocking
/ QuickCool()
[PRESS_START]/ wash.Start()
15 Transformations of Software Product Lines
ππππππβ β§ π·π·π·π·π·π· β§ Β¬π»π»π»π»πππ»π» β§ Β¬π·π·π»π»π·π·πππ·π·
Presence condition(example)
ππππππ
Products are the maximal submodels with presence condition for a configuration
![Page 16: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/16.jpg)
Morphisms in πππΏπΏπΊπΊπ΄π΄
16 Transformations of Software Product Lines
Domain Model π·π·ππππ
LockingWaiting
exit/HeaterOff()
Washing
entry/TempCheck()
Drying
Unlocking
[PRESS_START_WITH_DELAY]
/wash.Start()
/ QuickCool()
/ QuickCool()
[PRESS_START]/ wash.Start()
[PRESS_START] / HeaterOn()
Feature ModelπΉπΉππππ: ππππππβ,π»π»π»π»πππ»π»,π·π·π»π»π·π·πππ·π·,π·π·π·π·π·π·Ξ¦ππππ: {ππππππβ, Β¬ π»π»π»π»πππ»π» β§ π·π·π»π»π·π·πππ·π· }
Domain Model π·π·π΅π΅
x1
[t]/ a
x2
Feature ModelπΉπΉπ΅π΅: π΅π΅πππππ»π»Ξ¦π΅π΅: { }
β
![Page 17: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/17.jpg)
Morphisms map products
17 Transformations of Software Product Lines
Product:{ππππππβ,π·π·π·π·π·π·}
Locking
Washing
Drying
Unlocking
[PRESS_START]/ wash.Start()
Product:{π΅π΅πππππ»π»}
x1
[t]/ a
x2
β
![Page 18: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/18.jpg)
Key result: Pushout construction in πππΏπΏπ΄π΄π΄π΄π΄π΄
Transformations of Software Product Lines18
In πππΏπΏπ΄π΄π΄π΄π΄π΄ we can use the standard category theory pushout construction to combine two SPLs that are related by a common SPL
πππππΏπΏππ
πππππΏπΏππ
πππππΏπΏπ π
βππππ
βπππ π
πππππΏπΏππ
βππππ
βπ π ππ
Products of πππππΏπΏππ are constructed by combining products of πππππΏπΏππ and πππππΏπΏπ π according to overlap in πππππΏπΏππ
See Paper for Details!
![Page 19: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/19.jpg)
Outline Software Product Lines Transformations of SPLs What is the problem? Approach (part 1): Category of SPLs Approach (part II): SPL Transformations using graph transformation rules Summary of results and next steps
19 Transformations of Software Product Lines
![Page 20: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/20.jpg)
Transformations in πππΏπΏπ΄π΄π΄π΄π΄π΄
Transformations of Software Product Lines20
Since we can construct pushouts in πππΏπΏπ΄π΄π΄π΄π΄π΄, we can use the double pushout approach from AGT to define transformation rules.
Rule: AddBeepFeature
LHS RHS
Domain Model π·π·π΅π΅
x1
[t]/ a
x2
Feature ModelπΉπΉπ΅π΅: π΅π΅πππππ»π»Ξ¦π΅π΅: { }
Domain Model π·π·π΅π΅π΅π΅
x1
x2
Feature ModelπΉπΉπ΅π΅π΅π΅: π΅π΅πππππ»π»Ξ¦π΅π΅: { } Domain Model π·π·π΅π΅π π
x1[t]/ a
x2
Feature ModelπΉπΉπ΅π΅π π : π΅π΅πππππ»π»,π΅π΅π»π»π»π»π΅π΅
Ξ¦π΅π΅π π : { π΅π΅π»π»π»π»π΅π΅ β π΅π΅πππππ»π»}
Beeping Logging
[t]/ a
Β¬π΅π΅π»π»π»π»π΅π΅π΅π΅π»π»π»π»π΅π΅π΅π΅π»π»π»π»π΅π΅
π΅π΅π»π»π»π»π΅π΅ Β¬π΅π΅π»π»π»π»π΅π΅
Β¬π΅π΅π»π»π»π»π΅π΅
Key result: We show the existence and uniqueness of rule applications for πππΏπΏπ΄π΄π΄π΄π΄π΄.See details in the paper.
![Page 21: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/21.jpg)
Domain Model π·π·ππππ
Washing machine SPL ππππ
LockingWaiting
exit/HeaterOff()
Washing
entry/TempCheck()
Drying
Unlocking
[PRESS_START_WITH_DELAY]
/wash.Start()
/ QuickCool()
/ QuickCool()
[PRESS_START]/ wash.Start()
21 Transformations of Software Product Lines
[PRESS_START] /HeaterOn()
HeatDelay
HeatHeat β¨ Delay
Heat β¨ Delay
Heat β¨ Delay
Heat
DryDry
Dry
Β¬Dry
Β¬Heat
Heat
Feature ModelπΉπΉππππ: ππππππβ,π»π»π»π»πππ»π»,π·π·π»π»π·π·πππ·π·,π·π·π·π·π·π·Ξ¦ππππ: {ππππππβ, Β¬ π·π·π»π»π·π·πππ·π· β§ π»π»π»π»πππ»π» }
![Page 22: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/22.jpg)
Domain Model π·π·ππππ
Applying AddBeepFeature: Match LHS
LockingWaiting
exit/HeaterOff()
Washing
entry/TempCheck()
Drying
Unlocking
[PRESS_START_WITH_DELAY]
/wash.Start()
/ QuickCool()
/ QuickCool()
[PRESS_START]/ wash.Start()
22 Transformations of Software Product Lines
[PRESS_START] /HeaterOn()
HeatDelay
HeatHeat β¨ Delay
Heat β¨ Delay
Heat β¨ Delay
Heat
DryDry
Dry
Β¬Dry
Β¬Heat
Heat
Feature ModelπΉπΉππππ: ππππππβ,π»π»π»π»πππ»π»,π·π·π»π»π·π·πππ·π·,π·π·π·π·π·π·Ξ¦ππππ: {ππππππβ, Β¬ π·π·π»π»π·π·πππ·π· β§ π»π»π»π»πππ»π» }
Domain Model π·π·π΅π΅
x1
[t]/ a
x2
Feature ModelπΉπΉπ΅π΅: π΅π΅πππππ»π»Ξ¦π΅π΅: { }
LHS
![Page 23: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/23.jpg)
Domain Model π·π·πππππ΅π΅
Applying AddBeepFeature: Result SPL πππππ΅π΅ of double pushout
LockingWaiting
exit/HeaterOff()
Washing
entry/TempCheck()
Drying
Unlocking
[PRESS_START_WITH_DELAY]
/wash.Start()
/ QuickCool()
/ QuickCool()
[PRESS_START]/ wash.Start()
23 Transformations of Software Product Lines
[PRESS_START] /HeaterOn()
HeatDelay
HeatHeat β¨ Delay
Heat β¨ Delay
Heat β¨ Delay
Heat
DryDry
Dry
Β¬Dry
Β¬Dry β§ Β¬Heat
Heat
Feature ModelπΉπΉπππππ΅π΅: ππππππβ,π»π»π»π»πππ»π»,π·π·π»π»π·π·πππ·π·,π·π·π·π·π·π·,π΅π΅π»π»π»π»π΅π΅
Ξ¦πππππ΅π΅: {ππππππβ, Β¬ π·π·π»π»π·π·πππ·π· β§ π»π»π»π»πππ»π» ,π΅π΅π»π»π»π»π΅π΅ β π·π·π·π·π·π·}
Beeping Logging
[PRESS_START]/wash.Start()
[PRESS_START]/wash.Start()
Beep β§ Dry Β¬Beep β§ Dry
Rule application affects domain model, feature model and presence conditions!
![Page 24: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/24.jpg)
Summary of Results
Transformations of Software Product Lines24
Given any suitable category π΄π΄π΄π΄π΄π΄ of models, 1. Showed how to define the category πππΏπΏπ΄π΄π΄π΄π΄π΄ of SPLs having π΄π΄π΄π΄π΄π΄
models as domain models.2. Defined the pushout construction for πππΏπΏπ΄π΄π΄π΄π΄π΄3. Showed how to define transformation rules for πππΏπΏπ΄π΄π΄π΄π΄π΄ using double
pushout4. Proved the existence and uniqueness of rule application.
Illustrated how an SPL rule can affect both feature and domain model parts of an SPL i.e., we have exceeded these limitations in the literature
![Page 25: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/25.jpg)
Next Steps
Transformations of Software Product Lines25
Have only partially proven that πππΏπΏπ΄π΄π΄π΄π΄π΄ satisfies the formal requirements for AGT We are completing this task
Plan to implement formal analysis techniques from AGT for πππΏπΏππππππ e.g., conflict and dependency analysis, confluence analysis, etc. Henshin is likely the platform
Want to explore the scope of SPL transformations expressible using our approach.
Want to explore the kinds of SPLs obtained by using different model categories for π΄π΄π΄π΄π΄π΄
![Page 26: Transformations of Software Product Lineschechik/pubs/Models17-Category.pdfBuild on existing formal theories: category theory and theory of Algebraic Graph Transformations (AGT)[1]](https://reader033.vdocument.in/reader033/viewer/2022051810/601beaa0b80c5043ab6ae9eb/html5/thumbnails/26.jpg)
Questions
Lifting Transformations to Product Lines26