scieee Science in your language
[en] (orig)

FaMa

Read accessible full text

FaMa

Author: Benavides Cuevas, David Felipe; Trinidad Martín Arroyo, Pablo; Ruiz Cortés, Antonio; Segura Rueda, Sergio
Publisher: Springer
Year: 2013
DOI: 10.1007/978-3-642-36583-6_11
Source: https://idus.us.es/bitstreams/ec39ce8d-9d9c-4a53-9318-6a5cd4cc47d9/download
FaMa
Da id Bena ides, Pablo T inidad, An onio Ruiz-Co e
´s, and Se gio Segu a
Wha you will lea n in his chap e
•The scope o he au oma ed analysis o a iabili y models.
•How o use a ool o he au oma ed analysis o a iabili y models.
•A p oduc line a chi ec u e o build analysis ools.
1 In oduc ion
Ex ac ing ele an in o ma ion om a iabili y models is an impo an ask o
suppo decision-making in p oduc line de elopmen and p oduc con igu a ion.
Examples o ques ions ha can a ise du ing de elopmen a e:
• Which a e he p oduc s ha con ain a ce ain subse o ea u es?
• Does he a iabili y model con ain any e o s, i.e. con adic o y in o ma ion?
• How many p oduc s a e we able o build?
• How much does i cos o p oduce a ce ain p oduc ?
Answe ing he abo e ques ions can be a edious and e o -p one ask, and i is
in easible o pe o m manually wi h la ge-scale models; so i equi es o be
au oma ed.
Using ools o he Au oma ed Analysis o Va iabili y Models (AAVM, see
De ini ion 11.1) is pa o he li e o so wa e p oduc line de elope s. As an
example o such ools, we p esen in his chap e he FeA u e Model Analyse
(FaMa) Tool Sui e. I is an ecosys em o ools ha ocuses on he mos used
a iabili y modelling languages: ea u e models. I con ains se e al so wa e ools
some o which a e:
D. Bena ides (*) • P. T inidad • A. Ruiz-Co e
´s • S. Segu a
Uni e si y o Se ille, Se ille, Spain
e-mail: [email p o ec ed]; [email p o ec ed]; [email p o ec ed]; [email p o ec ed]
• FaMa F amewo k: a cus omizable analysis amewo k.
• FaMa Tes Sui e: a se o implemen a ion-independen es cases o es ea u e
model analysis ools such as hose c ea ed by he FaMa F amewo k.
• FaMa In eg a ions: a se o de elopmen s o in eg a e FaMa F amewo k in o
o he ools such as Moski Fea u e Modele .
• BeTTy F amewo k: Be y [1] is a highly con igu able amewo k suppo ing
benchma king and unc ional es ing o a iabili y model analysis ools.
The ool sui e is unde LGPL 3 licence and can be ound a h p://www.isa.us.
es/ ama. In his chap e we ocus on FaMa F amewo k, he mas e piece in he
puzzle o ools p o ided by he ecosys em.
1.1 De ini ions and Examples
De ini ion 11.1. Au oma ed analysis o a iabili y models
The Au oma ed Analysis o Va iabili y Models (AAVM) is abou he au oma ed
ex ac ion o in o ma ion om a iabili y models using au oma ed mechanisms o
assis decision-making in PL de elopmen o li e cycle. This is a key ac i i y in
a iabili y managemen because i allows checking and ex ac ing in o ma ion om
he a iabili y model which is cen al in he de elopmen o a PL.
Example 11.1. Example o analysis ope a ions
Le ’s hink abou a ea u e model as a possible a iabili y model. A ea u e
model can be analysed au oma ically ex ac ing aluable in o ma ion om i . Fo
ins ance, dead ea u es could be au oma ically de ec ed. Dead ea u es a e ea u es
ha a e ep esen ed in he model bu can ne e be pa o a conc e e p oduc because
model in e nal inconsis encies. A he ime o w i ing his book, he e a e 30
di e en analysis ope a ions epo ed in he li e a u e [2].
2 FaMa F amewo k
FaMa F amewo k (FW) is a p oduc line o ools o analyse a iabili y models. I
mainly pe o ms analysis ope a ions ans o ming a a iabili y model in o a sui able
logic, which is used o eason abou he model using o - he-shel logic sol e s.
FaMa FW is de eloped as a p oduc line, which con ains many a ian ea u es. Fo
example, he e exis di e en a iabili y me a-models (a.k.a. ea u e model dialec s)
and ile- o ma s, se e al analysis ope a ions (a.k.a. ques ions) o be pe o med o e
hem. These ques ions a e answe ed using di e en easone s o logic sol e s, each
o hem pe o ming be e o wo se o a kind o model, which is de e mined by he
easone selec o s. Since some analysis ope a ions can ake long ime o sol e, he
amewo k p o ides o se e al ans o ma ions o imp o e he esponse ime.
Figu e 11.1 ep esen s a ea u e model o he FaMa FW. I o e s a wide a ie y
o a ian ea u es, such as me a-models, logic easone s, analysis ope a ions,
FaMa FW
Me amodels Reasone s
Selec o s
Ques ions
Reasone s
T ans o ma ions
A omic Se
FaMa A ibu ed
FM
De aul
FaMa Fea u e
Me aModel
...
Sa 4j
A ibu ed Rei ied
Ja aBDD
OSGIS andalone
Explana ion
P oduc s
E o s
Valid
Co e
...
...
...
...
manda o y
choose1+
op ional
manda o y
manda o ymanda o y
choose1+ choose1+ choose1
choose1+
choose1
depends on
depends on
manda o y
Fig. 11.1 A ea u e model desc ibing FaMa F amewo k a iabili y
ans o ma ions and easone selec o s. A p oduc in FaMa FW p oduc line is
he e o e a selec ion o he a ian ea u es ha a e use ul o a ce ain con ex , such
as a CASE ool o PL, a p oduc con igu a ion ool o a econ igu able sma home.
2.1 FaMa A chi ec u e
FaMa FW has a componen -based a chi ec u e as shown in Fig. 11.2. E e y a ian
ea u e is buil as an independen componen o FaMa Ex ension. These ex ensions
can be classi ied as ollows:
• Me a-models: suppo di e en FM ep esen a ions and ile o ma s.
• Reasone s: map a ea u e model in o a conc e e logic. This logical ep esen a ion
is used o sol e analysis ope a ions.
• Ques ions: in e aces ha de ine he a ailable analysis ope a ions independen ly
o he speci ic easone s ha answe hem.
• C i e ia selec o s: selec he mos e icien easone o a pa icula ques ion and
a gi en ea u e model.
• T ans o ma ions: ans o m a ea u e model in o an equi alen one in e ms o
p oduc s bu easie o analyse in e ms o pe o mance.
Fig. 11.2 FaMa F amewo k a chi ec u e
A FaMa FW p oduc is cus omised selec ing a alid se o FaMa Ex ensions ha
comes oge he wi h he FaMa Co e, which is he common and manda o y pa o
he a chi ec u e among di e en FaMa FW p oduc s. I mainly communica es me a-
model and easone componen s h ough mappings, egis e s he a ailable
ques ions and use c i e ia selec o s o sea ch o he easone s ha may answe
he ques ion a use demands. All his p ocess is pe o med independen ly o speci ic
componen s, a oiding any kind o coupling among hem. We can build ou own
cus omised FaMa FW p oduc selec ing he componen s we a e in e es ed in. We
assume ha he SPL de elope s, as end-use s, a e no in e es ed in he in e nal
aspec s. To his pu pose, FaMa FW jus wan s o analyse ea u e models wi h he
bes pe o mance. We p o ide FaMa Facade as a anspa en way o in eg a e
FaMa FW in o exis ing sys ems. I is a s able acade ha hides he complexi y o
FaMa Co e in o a unique in e ace. I is designed o educe he changes ha a e
ca ied o use s; so a new ex ension can be deployed while he ac¸ade emains
una ec ed.
FaMa FW aims o be in eg a ed in o exis ing CASE ools. Eclipse has become a
s anda d in CASE ool de elopmen . FaMa Co e and Ex ensions a e OSGi-compli-
an [3] which is a equi emen o being Eclipse-complian . FaMa FW no only uses
his echnology as an al e na i e o suppo componen iza ion bu also p o ides o
i s own componen iza ion echnology ha pe mi s i o wo k as a s andalone
applica ion whe e e OSGi is no a ailable.
3 Examples and Recommended A eas o P ac ice
FaMa FW has been designed o be an impo an piece o hi d-pa y p oduc s. I
p o ides o an API o e ed as an OSGi bundle and a Ja a lib a y dis ibu ion. A
da e, i has been used in ou kinds o p oduc s:
• Fea u e Modeling Tools: Inco po a ing analysis capabili ies o isual edi o s and
o he CASE ools ha use VMs somehow. Moski Fea u e Modelle [4], an
Eclipse-based isual edi o o ea u e models is an example o i .
• P oduc Con igu a o s: P o iding p oduc con igu a ion capabili ies o alida e
ea u e selec ions and o assis end use by p opaga ing use decision and
sugges ing co ec ions o in alid con igu a ions. These p oduc s usually use a
ixed ea u e model. FaMa Debian Package and ISA Package use FaMa FW o
his pu pose.
• Dynamic Sys ems Recon igu a ion: Res o ing and econ igu ing dynamic
sys ems such as sma homes [5] and TV b oadcas ing sys ems [6] whene e
e o s happen o sys em p e e ences change. FaMa Li e o Sma Homes
suppo s he decision o he ea u es o ac i a e o deac i a e se ices whene e
a new ea u e is deployed o an exis ing one ails.
• Fas P o o yping F amewo k: Building ools o he de elopmen o new a ian
ea u es o FaMa FW PL. We ha e de eloped he BeTTy F amewo k [1] and

he FaMa Tes Sui e and FaMa Random Gene a o o es he unc ionali y and
pe o mance o FaMa FW easone s and FaMa SDK, an en i onmen o de elop
new a ian ea u es.
Fo a i s con ac o FaMa FW, i is ecommended o use i s console in e ace. I
pe mi s a comple e in e ac ion wi h all he elemen s in he in as uc u e and may be
used o e alua e i s capabili ies. Nex , we show an example o how o speci y an FM
using ou ile- o ma and how o use FaMa FW om he console and a Ja a
applica ion as a lib a y.
3.1 An Example Inpu Fea u e Model o FaMa FW
FaMa FW suppo s se e al ea u e me a-models and also o e s a plain- ex o ma
o ep esen all he kinds o ela ionships ha can be ound in he bibliog aphy. The
example below desc ibes he FM in Fig. 11.1 in a ex ual o ma .
No ice ha a FM is di ided in o hie a chical ela ionships and c oss- ee
cons ain s. Any ela ionship ollows he nex syn ax:
Pa en : [min_ca d,max_ca d] {Child1 Child2 ...};
This ca dinali y-based ela ionship allows he de ini ion o manda o y ([1,1])
and op ional ([0,1]) ela ionships o a one-child ela ionship and al e na i e ([1,1]),
o ([1,N]) and se ela ionships o a mul iple-child ela ionship. Cons ain s can
ep esen equi e and exclude cons ain s and any o he cons ain ha can be
ep esen ed in e ms o a Boolean cons ain . Al hough he e is a ull suppo o
ex ended ea u e models, allowing wo king wi h a ibu es, his example a oids
hem o he sake o simplici y.
Example 11.2. A de ini ion o a FM using FaMa plain- ex o ma
%Rela ionships
FaMaFW: Co e Me amodels [T ans o ma ions] Reasone s
Reasone Selec o s Ques ions;
Co e: [1,1]{S andalone OSGi};
Me amodels: [1,3]{FaMaFea u eMe amodel FaMaA ibu edFM
Ano he FM};
T ans o ma ions: [1,2]{A omicSe A ibu ed2Basic};
Reasone s: [1,5]{Ja aBDD Sa 4j Choco Rei ied A ibu ed};
Reasone Selec o s: [1,2]{De aul Op imalSelec o };
Ques ions: [1,23]{Valid P oduc s E o s ValidP oduc Explana ion
[...]};
%Cons ain s
FaMaA ibu edFM REQUIRES A ibu ed;
Explana ion REQUIRES Rei ied;
3.2 Using FaMa Console
FaMa console is a ecommended way o gi e he i s s eps o lea n he scope and
capabili ies AAVM p o ides. You only need o download he las a ailable dis i-
bu ion and execu e he main Ja a ja ile and he console will be au oma ically
launched. Example 11.3 shows an example o in e ac ion ha loads he FM in
Example 11.2, alida es i and coun s he numbe o p oduc s he FM desc ibes.
Example 11.3. In e ac ing wi h FAMA FW h ough i s console
C:>ja a – ja FaMaSDK-1.1.0.ja
Welcome o FaMa shell
$>load ama- m. ama
Loading model...
Loaded!!
$> alid
Model is alid
$>#p oduc s
Numbe o p oduc s: 87240
3.3 Using FaMa Fac¸ade
FaMa FW is also a Ja a lib a y ha can be in eg a ed in hi d-pa y ools h ough
FaMa Fac¸ade. I hides FaMa FW insides o e ing a simple acade o in e ac in a
ques ion–answe manne . Since a change on i will make all he coupled p oduc s
change, he acade mus p o ide a s able se o in e aces ha mainly consis s o
ques ion in e aces and a ea u e me a-model a choice. One o he ad an ages o
using his acade is ha new e sions o easone s, easone selec o s and me a-
models may each end-use s wi h no adap a ion on hei applica ions since he e is
no need o couple o hem.
Example 11.4. Ja a code o analyse he p e ious FM
// Ins an ia ing FAMA F amewo k acade
Ques ionT ade q ¼new Ques ionT ade ();
// Loads a FM om a ile
Va iabili yModel m ¼q .openFile(" ama- m. ama");
q .se Va iabili yModel( m);
// Valida es he FM and hen coun s i s p oduc s
ValidQues ion q ¼(ValidQues ion)
q .c ea eQues ion("Valid");
q .ask( q);
i ( q.isValid()) {
Numbe O P oduc sQues ion npq ¼
(Numbe O P oduc sQues ion) q .
c ea eQues ion("#P oduc s");
q .ask(npq);
Sys em.ou .p in ln("The numbe o p oduc s is: "
+ npq.ge Numbe O P oduc s());
} else {
Sys em.ou .p in ln("You ea u e model is no
alid");
}
The ac¸ade is also a ailable as an OSGi se ice p o iding he same in e ace he
acade does.
4 Resul s and Lessons Lea ned
A e 4 yea s o de elopmen , 12 FaMa Ex ension p ojec s and 7 p oduc s ha a e
used by 20 ins i u ions, we ha e lea ned many hings ega ding PL de elopmen
[7]. Those conclusions ha ha e su p ised us mos a e summa ised nex and we
expec hey se e o build o he SPLs:
•PL is a g ow h concep a he han speci ic a chi ec u es: Many people explo e
books o inding he sil e -bulle a chi ec u e o PL. We do no ha e o sea ch
o b and new a chi ec u es o PL, bu using whole-li e a chi ec u es and apply
inno a i e PL managemen p ocedu es.
•Analysing co e and a ian helped on de ining a s able co e: We buil FaMa FW
aiming ha ans e ing new esul s in AAVM does no mean deli e ing new and
incompa ible e sions e e y mon h. A ho ough s udy in AAVM commonali ies
and wai ing o he igh momen when we had all he needed backg ound o
make s able decisions helped on de ining s able in e aces ha ha e su e ed no
changes since hei de ini ion.
•Deploying b and new ea u es anspa en ly o end-use s is possible: In ou
con ex he e a e much unc ionali y ha jus imp o es he pe o mance o ou
ool such as easone s, ans o ma ions and easone selec o s. We ha e de ined
a solu ion ha deli e s new ea u es o end-use s while hei exis ing sys ems
su e no change a all.
•Open-sou ce and SPL a e compa ible concep s: open-sou ce helps on
dissemina ing FaMa FW. Managing a SPL is complex; e en mo e i hi d
pa y con ibu o s a e in ol ed in he p ojec . Using an adequa e a chi ec u e
educes coupling among p ojec s and allow educing he colla e al e ec s new
p ojec s migh p oduce. Howe e , c i ical pa s such as he co e and acade mus
be unde he con ol o only one pa y o ensu e he main ainabili y o he SPL.
•Using ools ins ead o p ocesses: dealing wi h a la ge amoun o componen s is
no a i ial ask. Inco po a ing Ma en and SVN ha e educed a la ge amoun o
e o s we had in he beginning o synch onise p ojec e sions by hand. We ha e
also used he own FaMa FW o build ools o manage ou SPL such as FaMa
Benchma k o compa e he pe o mance o ou easone s, FaMa Tes Sui e o
es e e y easone p io a deli e y and FaMa i sel o analyse dependences
among a ian ea u es.
5 Ou look
The a ea o au oma ed analysis has ecen ly eached 20 yea s o exis ence [2].
Al hough he a ea is ma u e enough and echnology ans e o p oduc ion is eady
(FaMa is an example on his di ec ion), some challenges emain open and will be
explo ed and le e aged in he ollowing yea s. One o hem is he in oduc ion and
exploi a ion o a ibu es inside a iabili y models such as cos , ime, e sions, e c.
This will b ing a new gene a ion o au oma ed analysis ools. FaMa al eady
includes some o hose ea u es bu some in es iga ion and p ac ical use cases a e
need o complemen he cu en s a e o he p ac ice.
We will see in he u u e also how analysis ools will be in eg a ed in o p oduc
line de elopmen ecosys ems: he esea ch communi y has mainly buil a iabili y
model analysis ools as s and-alone p o o ypes ha ha e ha dly been in eg a ed as
pa o la ge-scope CASE ools. FaMa has also made some s eps o wa d bu mo e
will come in he u u e.
A key issue in a iabili y model analysis ools is pe o mance. The communi y is
in es iga ing his bu new esul s will be eleased in he ollowing yea s. The
BeTTy amewo k is one o ou main con ibu ions in his di ec ion. Re e o
FaMa’s web page a h p://www.isa.us.es/ ama o any u he in o ma ion.
Re e ences
1. BeTTy amewo k. h p://www.isa.us.es/be y/
2. Bena ides, D., Segu a, S., Ruiz-Co e
´s, A.: Au oma ed analysis o ea u e models 20 yea s la e :
a li e a u e e iew. In . Sys . 35(6), 615–636 (2010)
3. OSGi Se ice Pla o m, Co e Speci ica ion. OSG Alliance – OSGi Speci ica ion
4. Moski Fea u e Modele . h p://www.p os.up .es/m m/
5. Ce ina, C., Pelechano, V., T inidad, P., Ruiz-Co e
´s, A.: An a chi ec u al discussion on DSPL.
In: SPLC (2), pp. 59–68. Le o In e na ional Science Cen e, Uni e si y o Lime ick, I eland
(2008)
6. T inidad, P., Ruiz-Co e
´s, A., Pen
˜a, J., Bena ides, D.: Mapping ea u e models on o componen
models o build dynamic so wa e p oduc lines. In: SPLC (2), pp. 51–56. Kindai Kagaku Sha
Co. L d., Tokyo, Japan (2007)
7. T inidad, P., Mulle , C., Ga cı
´a-Gala
´n, J., Ruiz-Co e
´s, A.: Building indus y- eady ools:
FAMA F amewo k and ADA. In: WASDeTT-3 (2010)