CVL to Clafer transformation Tom Wijsman 19 December 2014 Overview - - PowerPoint PPT Presentation

cvl to clafer transformation
SMART_READER_LITE
LIVE PREVIEW

CVL to Clafer transformation Tom Wijsman 19 December 2014 Overview - - PowerPoint PPT Presentation

CVL to Clafer transformation Tom Wijsman 19 December 2014 Overview 1. Clafer 2. CVL (Common Variability Language) 3. CVL to Clafer transformation 2 Chapter 1 Clafer 3 Introduction to Clafer Class, feature, reference A general-purpose


slide-1
SLIDE 1

CVL to Clafer transformation

Tom Wijsman

19 December 2014

slide-2
SLIDE 2

Overview

  • 1. Clafer
  • 2. CVL (Common Variability Language)
  • 3. CVL to Clafer transformation

2

slide-3
SLIDE 3

Clafer

Chapter 1

3

slide-4
SLIDE 4

Introduction to Clafer

Class, feature, reference A general-purpose lightweight modeling language with first- class support for feature modelling, which prefers unification

  • ver hybridity; developed at the GSD Lab, University of

Waterloo and MODELS group at IT University of Copenhagen. Design goals:

  • Concise notation for feature modeling and meta-modeling;
  • mixes feature models and meta-models;
  • minimal number of concepts;
  • uniform semantics.

4

slide-5
SLIDE 5

Introduction to Clafer

A set of concepts:

  • type definitions: a class or a feature (no distinction!);
  • features: attributes or role names of association

and composition relationships;

  • constraints: Alloy-based constraints limit the variability;

5

slide-6
SLIDE 6

RPGGame in Clafer example

abstract RPGGame xor Players Singleplayer Multiplayer

  • r Enemies?

Villain Dragon

  • r Environment?

Door Goal Key Trap [Key => Door]

6

  • r WinCondition

TakeAllGoals KillAllEnemies [WinCondition.TakeAllGoals => Environment.Goal] [WinCondition.KillAllEnemies => Enemies] [Environment.Goal => no WinCondition.KillAllEnemies]

slide-7
SLIDE 7

Generating instances for RPGGame with Alloy

Game Players Singleplayer Environment Door Goal Key Trap WinCondition TakeAllGoals Game Players Singleplayer Enemies Dragon Environment Door Key Trap WinCondition KillAllEnemies Game Players Singleplayer Enemies Villain Environment Door Key Trap WinCondition KillAllEnemies Game Players Singleplayer Enemies Villain Environment Door Goal Key Trap WinCondition TakeAllGoals Game Players Singleplayer Enemies Dragon Environment Door Goal Key Trap WinCondition TakeAllGoals Game Players Singleplayer Enemies Villain Dragon Environment Door Key Trap WinCondition KillAllEnemies Game Players Singleplayer Enemies Villain Dragon Environment Door Goal Key Trap WinCondition TakeAllGoals

7 Game : RPGGame [Singleplayer] [Key] [Trap]

slide-8
SLIDE 8

Multiple-Objective Optimization with Clafer Moo Visualizer

8

total_productivity : integer = sum Feature.productivity total_batterylife : integer = sum Feature.batterylife total_security : integer = sum Feature.security total_cost : integer = sum Feature.cost << max OptimalPhone.total_batterylife >> << max OptimalPhone.total_productivity >> << max OptimalPhone.total_security >> << min OptimalPhone.total_cost >>

slide-9
SLIDE 9

CVL (Common Variability Language)

Chapter 2

9

slide-10
SLIDE 10

Introduction to CVL

10

IBM, FOKUS, F., Thales, Services, T. C., August 2012. Common Variability Language (CVL). See the CVL Revised Submission section online at http://www.omgwiki.org/variability/doku.php.

slide-11
SLIDE 11

Introduction to CVL

11

IBM, FOKUS, F., Thales, Services, T. C., August 2012. Common Variability Language (CVL). See the CVL Revised Submission section online at http://www.omgwiki.org/variability/doku.php.

slide-12
SLIDE 12

Introduction to CVL

12

IBM, FOKUS, F., Thales, Services, T. C., August 2012. Common Variability Language (CVL). See the CVL Revised Submission section online at http://www.omgwiki.org/variability/doku.php.

slide-13
SLIDE 13

RPGGame in CVL example

13 Win Constraints Win Constraints: Generated with Clafer Compiler and GraphViz.

slide-14
SLIDE 14

CVL has more features (composition, interface, ...)

14

IBM, FOKUS, F., Thales, Services, T. C., August 2012. Common Variability Language (CVL). See the CVL Revised Submission section online at http://www.omgwiki.org/variability/doku.php.

slide-15
SLIDE 15

CVL to Clafer transformation

Chapter 3

15

slide-16
SLIDE 16

Steps

Preparation

  • identify a reasonable set of common features for both CVL,

Clafer and their constraint languages

  • create an abstract and concrete syntax of CVL in AToMPM

Transformation

  • AToMPM CVL =Export=> metaDepth CVL =ETL=> metaDepth Clafer =EGL=> Clafer

Verification

  • verify by a reverse transformation using Clafer Compiler

16

slide-17
SLIDE 17

Bibliography

Bak, K., Czarnecki, K., Wsowski, A., 2011. Feature and meta-models in Clafer: Mixed, specialized, and coupled. Lecture Notes in Computer Science 6563, 102-122. Bak, K., Diskin, Z., Antkiewicz, M., Czarnecki, K., Wsowski, A., December 2014. Clafer: unifying class and feature modeling. Software & Systems Modeling 14. Antkiewicz, M., Bak, K., Murashkin, A., Liang, J., Olaechea, R., Czarnecki, K., 2013. Clafer Tools for product line engineering. In: Proceedings of the 17th International Software Product Line Conference co-located work-

  • shops. Software Product Line Conference, ACM, Tokyo, Japan, pp. 130-135.

IBM, FOKUS, F., Thales, Services, T. C., August 2012. Common Variability Language (CVL). See the CVL Revised Submission section online at http://www.omgwiki.org/variability/doku.php. 17

slide-18
SLIDE 18

Thank you for your attention!

Comments and questions are welcome.