VICCI Visual and Interactive Cyber-Physical Systems Control and Integration DeltaEcore A Model-Based Delta Language Generation Framework Christoph Seidl Ina Schaefer Uwe Aßmann
TurtleBot Driver: A Software Family [Par76, SSA13, SSA14a] Movement Controller Different hardware configurations Keyboard Webservice Gamepad Autonomous Obstacle Detection Bump I Heart Engineering Engine Limited resources (CPU, battery etc.) Infrared Ultrasound DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 2
Feature Models Conceptually Capture Variability [KCH+90, CE00, CHE05] TurtleBot Engine Movement Webservice Detection [1..1] [1..3] Keyboard Gamepad Autonomous Bump Infrared Ultrasound Cross-Tree Constraints 1. Autonomous Detection 2. Keyboard Gamepad Webservice Legend Mandatory Feature Optional Feature [m..n] Group Cardinality I Heart Engineering DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 3
Software Variant Derivation Procedure [BFG+02] Software Family TurtleBot Engine Movement [1..1] Webservice Detection [1..3] Keyboard Gamepad Autonomous Bump Infrared Ultrasound Variability Model + Configuration Realization Assets (Java, Uml, Certification Material ) Variability Mechanism Software Variant DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 4
Delta Modeling as Variability Mechanism [SBB+10, SD10, DS11] Desired Variant Source Variant Target Variant Software Variant Software Variant A Software Variant A B Delta Language Domain specific transformation language Intentionally limit expressiveness to variability Individual for each source language (e.g., Delta Java for Java) Delta Operation: Transformation operation Delta Module: Collection of delta operations DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 5
Example: Delta Software Fault Trees (SFTs) Collision (COL) SFT SFT Collision (COL) Bump Sensor Triggers (BST) SFT Delta Module (AddLaserSensor) add basic fault LST { }; remove connection BST -> COL; add gate G1 { }; add connection BST -> G1; add connection LST -> G1; add connection G1 -> COL; Delta Modeling Delta SFT Bump Sensor Triggers (BST) OR (G1) Laser Sensor Triggers (LST) DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 6
Software Fault Tree (SFT) Meta Model SFTSoftwareFaultTree -name : String -rootfault AND OR <<enumeration>> SFTGateType Collision (COL) SFTFault -id : String -name : String -description : String -faults 2..* SFTGate -id : String -gatetype : SFTGateType OR (G1) -gate -parentfault SFTBasicFault SFTIntermediateFault -probability : double Bump Sensor Triggers (BST) Distance Sensor Triggers (DST) DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 7
Hindrances for Delta Modeling [SBB+10, Sch10, LSK+12, SSA13, HKR+11, HKM+13] Java UML DeltaJava DeltaUML Variant Derivation Process 1 SFT DeltaSFT CFD DeltaCFD Variant Derivation Process 2 Variant GSN DeltaGSN <DSL> Delta<DSL> Variant Derivation Process N DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 8
DeltaEcore Outline Model-Based Model-Based Model Transformation Java UML DeltaJava DeltaUML Variant Derivation Process 1 SFT DeltaSFT CFD DeltaCFD Variant Derivation Process 2 Variant GSN DeltaGSN <DSL> Delta<DSL> Variant Derivation Process N Fast and Robust Generation Shared Variant Derivation Process DeltaEcore DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 9
Custom Delta Languages in DeltaEcore Custom Delta Language Common Base Delta Language = + Delta Dialect Template for delta language Independent of source language Basic abstract and concrete syntax Language extension (syntax and semantics) Dependent on source language Define different types of delta operations DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 10
Types of Delta Operations Standard Delta Operations Custom Delta Operations Set Operation Add Operation Modify Operation User-Defined Operation Unset Operation Insert Operation User-Defined Operation Remove Operation User-Defined Operation Defined syntax and semantics DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 11
Automatic Derivation of Standard Delta Operations SFTSoftwareFaultTree -name : String SFTFault -rootfault -id : String -name : String -description : String SFTBasicFault -probability : double -faults 2..* AND OR <<enumeration>> SFTGateType SFTGate -id : String -gatetype : SFTGateType -gate -parentfault SFTIntermediateFault DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 12
Set/Unset Delta Operation Alter single-valued reference Set: Assign value to reference Unset: Replace current value of reference with default value SFTSoftwareFaultTree -name : String SFTFault -rootfault -id : String -name : String -description : String -faults 2..* AND OR <<enumeration>> SFTGateType SFTGate -id : String -gatetype : SFTGateType Derivation for (EReference ref : allrefs) { if (ref.ischangeable()) { if (!ref.ismany()) { createsetoperation(ref); createunsetoperation(ref); SFTBasicFault -probability : double -gate -parentfault SFTIntermediateFault } } } DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 13
Add/Insert/Remove Delta Operation Manipulate set of values of many-valued references Add: Append element to set of values Insert: Place element at certain position in the set Remove: Detach element from set of values SFTSoftwareFaultTree -name : String SFTFault -rootfault -id : String -name : String -description : String SFTBasicFault -probability : double -faults 2..* AND OR <<enumeration>> SFTGateType SFTGate -id : String -gatetype : SFTGateType -gate -parentfault SFTIntermediateFault Derivation for (EReference ref : allrefs) { if (ref.ischangeable()) { if (ref.ismany()) { createaddoperation(ref); createremoveoperation(ref); if (ref.isordered()) { createinsertoperation(ref); } } } } DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 14
Modify Delta Operation Modify: Alter values of attributes Difference to Set/Unset Set/Unset can have side-effect (e.g., opposite references) Modify has no side effects (only attributes modified) SFTSoftwareFaultTree -name : String SFTFault -rootfault -id : String -name : String -description : String SFTBasicFault -probability : double -faults 2..* AND OR <<enumeration>> SFTGateType SFTGate -id : String -gatetype : SFTGateType -gate -parentfault SFTIntermediateFault Derivation for (EClass c : allclasses) { if (!c.isabstract()) { for (EAttribute a : c.geteallattributes()) { if (a.ischangeable()) { if (!a.isid()) { createmodifyoperation(a); } } } } } DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 15
Excluded Delta Operations Replace Semantics depend on source language Exact same types for parameters? Compatible types for parameters? Semantically equivalent parameters? Alternative Define custom delta operation Delete Complete erase with all references is critical Alternative Delete step by step using remove delta operations Define custom delta operation DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 16
Custom Delta Languages Delta module Delta language Custom Delta Language Common Base Delta Language = + Delta Dialect DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 17
Common Base Delta Language addgate(sftgate gate, SFTIntermediateFault parentintermediatefault); Binding to meta model using dialect Requiring core assets and other delta modules uniformely Statically typed Dynamic constructors Type inference Reference existing elements (notation dependent identifiers possible) Substitutability of references, expressions, constructors etc. where applicable DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 18
Delta Dialects Syntax definition for operations of custom delta language Bind to meta model of source language Define different types of delta operations Use meta model types DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 19
Creating Delta Languages with DeltaEcore Source Language DeltaEcore Meta Meta Model (Ecore) conforms to Meta Model (source language) conforms to Model (source language artifact) refers refers refers Common Base Delta Language SFTSoftwareFaultTree -name : String SFTFault -rootfault Delta Dialect -id : String -name : String -description : String SFTBasicFault -probability : double Custom Delta Language -faults 2..* AND OR <<enumeration>> SFTGateType creates + SFTGate -id : String -gatetype : SFTGateType -gate -parentfault SFTIntermediateFault Defined by framework Defined by language developer (or anybody else) Written by variability engineer DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 20
Generation in DeltaEcore 1. analyzes Delta Dialect Generator Integrates into common variant derivation mechanism 2. generates Meta Model (source language) refers Delta Dialect 3. reads Delta Language Interpreter Generator conforms to 4. generates Model (source language artifact) refers Custom Delta Language 5. interprets Delta Language Interpreter DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 21
Common Base Delta Language Editor Support Delta Parser Delta Completer Delta Sorter Delta Interpreter Variant Derivator Handling Delta Languages with DeltaEcore Delta Language Creation and Application Create Delta Languages Derive Variants Syntax Parser Define Configuration Collect Delta Modules Sort Delta Modules Apply Delta Operations Create Variant DeltaEcore Implementation Source Languages Delta Ecore Source Language 1 Delta Dialect 1 Source Language N Delta Dialect N External User Created Provided by Framework DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 22
Conclusion Delta Modeling has great potential for variability management but needs delta languages for all source languages delta language creation is tedious tooling for delta languages is often incompatible DeltaEcore helps overcome some of the hindrances through quick and easy creation of delta languages generation of (initial version of) delta dialects interoperability of delta languages shared variant derivation mechanism DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 23
http://www.deltaecore.org DeltaEcore A Model-Based Delta Language Generation Framework - Christoph Seidl 24
Thank you for your attention! Questions, Comments, Feedback?
References (1) [BFG+02] J. Bosch, G. Florijn, D. Greefhorst, J. Kuusela, J.H. Obbink, and K. Pohl. Variability Issues in Software Product Lines. In Revised Papers from the 4th International Workshop on Software Product- Family Engineering (PFE), PFE'01, 2002. [CE00] K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Tools, and Applications. Addison-Wesley, 2000. [CHE05] K. Czarnecki, S. Helsen, and U. Eisenecker. Formalizing Cardinality-Based Feature Models and their Specialization. In Software Process: Improvement and Practice, Wiley Online Library, 2005. [DS11] F. Damiani, and I. Schaefer. Dynamic Delta-Oriented Programming. In Proceedings of the 15th International Software Product Line Conference (SPLC), SPLC'11, 2011. 12.03.2014 Managing Variability in Space and Time in Software Families - Christoph Seidl 26
References (2) [HKM+13] A. Haber, C. Kolassa, P. Manhart, P. M. S. Nazari, B. Rumpe, and I. Schaefer. First-Class Variability Modeling in Matlab/Simulink. In Proceedings of the 7th International Workshop on Variability Modelling of Software-intensive Systems (VaMoS), VaMoS'13, 2013. [HKR+11] A. Haber, T. Kutz, H. Rendel, B. Rumpe, I. Schaefer. Delta- Oriented Architectural Variability Using MontiCore. In Proceedings of the 5th European Conference on Software Architecture: Companion Volume, 2011. [KCH+90] K. C. Kang, S. G. Cohen, J. A. Hess, W. E. Novak, and S. Peterson. Feature-Oriented Domain Analysis (FODA) Feasibility Study. Technical Report Carnegie Mellon University Pittsburgh, Software Engineering Institute, 1990. [LSK+12] M. Lochau, I. Schaefer, J. Kamischke, and S. Lity. Incremental Model-Based Testing of Delta-Oriented Software Product Lines, In Tests and Proofs, Springer, 2012. [Par76] D. L. Parnas. On the Design and Development of Program Families. In Transactions on Software Engineering, IEEE Computer Society, 1976. 12.03.2014 Managing Variability in Space and Time in Software Families - Christoph Seidl 27
References (3) [SBB+10] I. Schaefer, L. Bettini, V. Bono, F. Damiani, and N. Tanzarella. Delta-Oriented Programming of Software Product Lines. In Software Product Lines: Going Beyond, Springer, 2010. [Sch10] I. Schaefer. Variability Modelling for Model-Driven Development of Software Product Lines. In Proceedings of the 4th International Workshop on Variability Modelling of Software-intensive Systems (VaMoS), VaMoS'10, 2010. [SD10] I. Schaefer, and F. Damiani. Pure Delta-Oriented Programming. In Proceedings of the 2nd International Workshop on Feature-Oriented Software Development (FOSD), FOSD'10, 2010. [SSA13] C. Seidl, I. Schaefer, and U. Aßmann. Variability-Aware Safety Analysis using Delta Component Fault Diagrams. In Proceedings of the 4th International Workshop on Formal Methods and Analysis in Software Product Line Engineering (FMSPLE), FMSPLE'13, 2013. [SSA14a] C. Seidl, I. Schaefer, and U. Aßmann. Capturing Variability in Space and Time with Hyper Feature Models. In Proceedings of the 8th International Workshop on Variability Modelling of Software-intensive Systems (VaMoS), VaMoS'14, 2014. 12.03.2014 Managing Variability in Space and Time in Software Families - Christoph Seidl 28