FODA expressions - PowerPoint PPT Presentation

About This Presentation
Title:

FODA expressions

Description:

How does one integrate FODA diagrams to a software that is being developed? ... Car configuration as a CFG 'carBody' Transmission Engine 'pullsTrailer'? - Car ' ... – PowerPoint PPT presentation

Number of Views:150
Avg rating:3.0/5.0
Slides: 22
Provided by: pietupoh
Category:

less

Transcript and Presenter's Notes

Title: FODA expressions


1
FODA expressions
  • Pietu Pohjalainen
  • MDE ja mallitransformaatiot
  • Syksy 2007

2
Feature Oriented Domain Analysis
  • FODA is a method for modeling configurability
  • Our example is taken from the book Generative
    Programming Methods, Tools, and Applications

3
Dimension
  • A feature where all sub features are alternative
  • Choose one, but exactly one
  • Possible configurations for concept
  • f1
  • f2
  • f3

4
Dimension with optional features
  • Feature of which all sub features are alternative
    optional features
  • Choose zero, or exactly one
  • Possible configurations
  • ?
  • f1
  • f2
  • f3

5
Extension point
  • Feature that has at least one optional sub
    feature or at least one set of or-sub features
  • Possbile configurations
  • f2
  • f3
  • f2, f3
  • f1, f2
  • f1, f3
  • f1, f2, f3

6
Extension point with optional features
  • Feature of which all sub features are optional
  • Possible configurations
  • ?
  • f1
  • f2
  • f3
  • f1, f2
  • f1, f3
  • f2, f3
  • f1, f2, f3

7
Extension point with or-features
  • Feature of which all direct sub features are
    or-features
  • Possible configurations
  • f1
  • f2
  • f3
  • f1, f2
  • f1, f3
  • f2, f3
  • f1, f2, f3

8
Configuration model for a Car
9
Integration to software
  • FODA is a simple, yet surprisingly powerful
    approach to modeling variability and
    configurability
  • Using a modeling system requires software support
    (IDE, file formats, etc..)
  • How does one integrate FODA diagrams to a
    software that is being developed?

10
Approaches to integration
  • Build a GUI editor tool for FODA models start an
    internet startup for selling the tool
  • Build a text-based DSL (FDL)
  • Use existing language (de Jonge Visser)
  • Use simpler language (FODA expressions)

11
FODA Description Language FDL
  • FDL allows the programmer to express FODA models
    in a text-based form
  • Primitives
  • all, one-of, more-of
  • optional features expressed with ?
  • allows also default values

12
Car configuration in FDL
  • Car
  • all(carBody, Transmission, Engine, pullsTrailer?)
  • Transmission
  • one-of(automatic, manual)
  • Engine
  • more-of(electric, gasoline)

13
FODA as Context free Grammars
  • de Joost and Visser present FODA models as
    context free grammars
  • Atomic features are presented as terminals
  • Composite features are non-terminals
  • Feature operators map to syntax operators
  • Allows usage of standard compiler generator tools

14
Car configuration as a CFG
  • carBody Transmission Engine pullsTrailer? -gt
    Car
  • automatic manual -gt Transmission
  • (electric, gasoline) -gt Engine

15
CFG is nice, but too complex?
  • CFG approach gives already quite good
    bang-for-buck
  • But still some problems
  • Implementing CFG requires compiler/parser
    expertise
  • Choosing from plethora of tools takes time
  • Not always is full expressive power of CFG needed

16
FODA Expressions
  • Idea use less expressive language
  • in FODA expressions, we take the regular
    expressions as the base language
  • constraint regexps to match with FODA primitives
  • use implementing languages regexp capabilities
  • brings e.g. validation close to zero-effort

17
FODA expressions
Dimension (f1 f2 f3)
Dimension with optional features (f1 f2 f3) ?
Extension point (f1? (f2 f3))
Extension point with optional features (f1 f2 f3)
Extension point with or-features (f1 f2 f3)
18
Car configuration in FODA expressions
  • car body
  • transmission (automatic manual)
  • engine (electric gasoline)
  • pullsTrailer?

19
A DFA to check validity
20
Problems with FODA expressions
  • To check validity, alphabet in the model need to
    have an order
  • Validity checking comes for free, further
    development still requires investment
  • E.g. default values, constraints, etc. are not
    expressed
  • There might be practical FODA models that are
    really context-free

21
Questions, discussion
Write a Comment
User Comments (0)
About PowerShow.com