Presentation is loading. Please wait.

Presentation is loading. Please wait.

Formalizing and Analyzing Feature models in Alloy

Similar presentations


Presentation on theme: "Formalizing and Analyzing Feature models in Alloy"— Presentation transcript:

1 Formalizing and Analyzing Feature models in Alloy
Jing Sun Computer Science This might seem like an odd title for a talk by someone who claims to do metrics research, but hopefully it will become clear why I chose it. Roughly what I’m going to do is discuss some of the metrics you might read about, and evaluate how useful they are. To do this, I’ll have to explain a bit of metrics theory, but hopefully not too much.

2 Outline Feature modeling The Alloy language
Formalizing feature diagram Checking feature models Conclusion and future work My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

3 Feature & Feature Modeling
Conceptual modeling perspective an important property of a concept allows to express the commonalities and differences between concept instance Domain engineering context represents reusable, configurable requirements Feature modeling is the activity of modeling the common and the variable properties of concepts and their inter-dependencies and organizing them into a coherent model feature model diagram My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

4 Feature & Software Engineering
Feature-oriented programming (Prehofer, 1997) Can programs be created by composing features? Next generation of OO programming? Feature and advanced separation of concern Feature is regarded as one dimension of concern (Tarr et al., 1999) Can we separate feature concerns from other concerns? Feature and software evolution and maintenance Locating features from source code (Eisenbarth, 2003) Understanding the implementation of certain features in programs My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

5 Feature & Software Engineering
Feature and requirements engineering Representing and structuring the problem domain as features A well known problem: Feature interaction in telecommunication domain (Zave, 1993) Feature and software process Feature-driven development: an agile, highly adaptive, software development process (Palmer and Felsing, 2002) Feature and software reuse FORM (Feature-Oriented Reuse Method) (Kang et al., 1998) Modeling a software product line’s commonalties and variability in terms of features My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

6 Our current interest Analyzing features and their relationships, organizing them into feature model Representing feature models Formalizing feature models Analyzing and verifying feature models My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

7 Feature modeling Basic relations among features Feature Types
One feature may depend on another feature One feature may exclude another feature Feature Types Mandatory features: must be included in the description of a concept instance Optional features: may be included in the description of a concept instance Or features: may have any non-empty subset of the or-features included in the description of a concept instance Alternative features: … My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

8 Feature diagram example
A car concept feature diagram Car Transmission Engine Automatic Manual Car Body Pulls trailer Electric Gasoline My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

9 Applying formal methods
Alloy – a light-weight formal modeling language Based on first order predicate logic A subset of Z Support automatic analysis Applying Alloy to feature modeling Formalizing a feature model Checking a feature model (e.g., checking valid/invalid combination of features, semantic equivalence, …) My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

10 Feature language in Alloy
sig Feature {} // define a set of features disj sig Concept extends Feature { // define a concept holds : set Feature // all possible configuration of a concept } // Depends - The selection of f2 depended on the selection of f1 fun Depends(c:Concept, f1:Feature, f2: Feature) { f1 in c.holds => f2 in c.holds // Alternative feature type fun Alternative(c:Concept, pf:Feature, s:set Feature) { all f : s | Excludes(f, s-f) && Depends(f, pf) pf in c.holds => one f : s | Depends(pf, f) } … My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

11 Feature model in Alloy open feature/FeatureModel
static disj sig Automatic extends Feature{} static disj sig Manual extends Feature{} static disj sig CarBody extends Feature{} static disj sig Car extends Concept{} fact {Mandatory(Car, Car, CarBody+Transmission+Engine)} fact {Optional(Car, Car, PullsTrailer)} fact {Alternative(Car, Transmission, Automatic+Manual)} fact {Or(Car, Engine, Electric+Gasoline)} My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

12 Checking & analyzing feature models
Checking valid/invalid feature configurations assert correctness { all c : GPL | c.holds != GPL + Algorithm + Connected + Search + BFS + Graph + Undirected + Weighted } Checking the source of unsatisfiability using “core extension” Checking the solvability of feature models Analyzing semantic equivalence of feature models My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

13 Checking & analyzing feature models
Semantic equivalence checking My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

14 Conclusion & future work
Defined a formal semantics for the feature modeling language in Alloy Provide a precise and rigorous formal basis for the feature diagram Identify basic relations in feature diagram and showed that other complex relations can be expressed as a combination of the two Checking feature models using Alloy analyzer. Dynamic feature model re-configurations Feature interaction problem My research interests are in improving programmer productivity. This requires being able to measure productivity, which in turns needs some way to evaluate the quality

15 Jing Sun Computer Science j.sun@cs.auckland.ac.nz
Questions? Jing Sun Computer Science This might seem like an odd title for a talk by someone who claims to do metrics research, but hopefully it will become clear why I chose it. Roughly what I’m going to do is discuss some of the metrics you might read about, and evaluate how useful they are. To do this, I’ll have to explain a bit of metrics theory, but hopefully not too much.


Download ppt "Formalizing and Analyzing Feature models in Alloy"

Similar presentations


Ads by Google