The ideas of system architecture and dependability modeling andanalysisarenotnew.However, tothebestofourknowledge, the combinationofmodel-basedandpattern-based dependability engineeringisnew.Inthissection,wedescribeourvisioninthese areas anddiscusstheir relationship to softwaresystem engineer- ing and pattern-based engineering. The patternconcept was first introduced by Alexander et al. (1977 ). Apatternaddressesa spe- cific,recurringprobleminthedesignorimplementationofasoft- ware system. It capturesexpertise inthe formof reusable archi- tecture design themesand styles that can be reused even when algorithms,componentimplementations,orframeworkscannot. 7.1. Incorporating dependability in system and software engineering
Overthepasttwodecades,theneedforformallydefinedsafety lifecycle processes has emerged because the inevitable require- ment for better processes eventually pushed control systems to a level ofcomplexity in whichsophisticated electronicsand pro- grammable systems becamethe optimalsolution for control and safetyprotection(Smith and Simpson, 2004 ).Withtheseemergent requirements, many safety lifecycles have been proposed by dif-
ferent associations, suchasIECandANSI/ISA. Thesesafetylifecy- cles have been adopted by different domains orcompanies with some modifications to adaptdifferent requirements(for example, domain-specificrequirements).However,becausethefundamental differencesbetweenatraditionaldevelopmentprocessandasafety lifecycle are immense, e.g., different types of safety checks and thesafetyrelationships betweenthesechecksandphases,model- ing thesedifferentsafetylifecycleswithtraditionallyusedprocess metamodelsisnotsimpleanddirect.
In system engineering, dependability may be compromisedin several systemlayers. Dependability istypically considered when design decisions are made, leading to potential conflicting sit- uations. The integration of dependability features requires the availabilityofsimultaneoussystemarchitectureexpertise,domain- specific application knowledge and dependability expertise to managethepotentialconsequencesofdesigndecisionsonthede- pendability of a system and on the remainder of the architec- ture.Forexample,atthearchitecturallevel,incorporatingdepend-
ability means having a mechanism (which may be a component
or integratedinto a component). Developmentprocesses forsys- temandsoftwareconstructionarecommonknowledgeandmain- streampracticeinmostdevelopmentorganizations.Unfortunately, these processes offerlittle support formeeting dependability re- quirements.Overtheyears,researcheffortshavebeeninvestedin methodologies andtechniques fordependable software engineer- ing, although dedicated processes have been proposed only re- cently(Bernardi et al., 2012; Panesar-Walawege et al., 2013; Ni et al., 2015 ).
7.2. Pattern-based development
The supporting research activities inPBSE examine three dis- tinct challenges: (a) mining (discovering patterns from existing systems), (b) hatching (selectionof the appropriate pattern), and (c) applying (effective use during the system development pro- cess).Thesethreechallengesofteninvolvebroadcoreexpertise,in- cludingformallogic,mathematics,stochasticmodeling,graphthe- ory, hardware design and software engineering. In our work, we study onlythe last two challenges, targetingthe (i) development ofanextendibledesignlanguageformodelingpatternsindepend- able distributed embeddedsystems (Hamid et al., 2016 ) and(ii) a methodology to improve existing development processes using patterns(Hamid et al., 2013 ).Thelanguage mustcapturethecore elements ofthepatterntosupportits(a)precisespecification, (b) appropriate selection and (c) seamless integration and use. The first aspect is related to pattern definition, whereas the second and third aspects are more related to problem definition. From the pattern-based system and software engineering methodolog- ical perspective,onlyafewworks(Abowd et al., 1995; Soundara- jan and Hallstrom, 2004; Zdun and Avgeriou, 2008 )haveaddressed thisconcern.Theyareharmonizedwiththeuseofpatternsineach system andsoftwaredevelopment lifecycle stage.However, exist- ing approachesusing patternsoften target one stage of develop- ment (architecture,design orimplementation) due tothe lackof formalisms ensuring(1)thespecification ofa patternatdifferent levelsofabstraction,(2)relationshipsthatgoverntheirinteractions and complementarity and (3) the relationship between patterns and other artifactsmanipulated during the development lifecycle andthoserelatedtotheassessmentofcriticalsystems.
Severalapproachesexistinthedependabilitydesignpatternlit- erature (Giacomo et al., 2008; Daniels and Vouks, 1997; Tichy et al., 2004 ).Theyallowsolutions toverygeneralproblemsthatap- pear frequentlyassub-tasks inthe design ofsystems withsecu- rity and dependability requirements. These elementary tasks in- clude safety communication and fault tolerance. In developing fault-tolerant software applications, the use of patterns leads to
well-structuredapplications; (Daniels and Vouks, 1997 ) described a hybridset of patternsto be used in the development of fault- tolerantsoftware applications. These patterns are based on clas- sical fault-tolerantstrategies,suchasN-version programming, re- covery blocks,consensus, andvoting. In addition,thehybrid pat- tern structure can be constructed through a recursive combina- tion of N -version programming and others. They also addressed thepowerof thetechnique insupportof advancedsoftwarevot- ingtechniques.Extendingthisframework,(Tichy et al., 2004 )pro- posed a framework for the development ofdependable software systems based on a pattern approach.They reused proven fault- toleranttechniquesviafault-tolerantpatterns.Theydemonstrated theirframework usinganapplicationtoguidetheself-repairofa systemafterthedetectionofanodecrash.
InKodituwakku et al. (2003 ),amathematicalstructurewaspro- posedfortheorganization ofpatternsdependingonseveralcate- gories.An ontological approach forselecting designpatterns was proposedinGirardi and Lindoso (2006 )tofacilitateunderstanding andreuseduringsoftwaredevelopment.Intheirpaper,theauthors presented an ontology that describes the design pattern format andtheirrelationships.Theyusedapatternsystem/languagetofa- cilitate the design, integration, selection and reuse of these pat- terns.Amultidimensionalclassificationbasedonarchitecturallev- els,concerns,stages,andotheraspects was describedinVanHilst et al. (2009 ). Another aspect that has been considered is sys- tem perspectives. Based on the idea of the Zachman framework (Zachman, 1987 ) (classificationbasedon systemperspectivesand interrogatives), the Microsoftpatterns andpractices group classi- fication (Trowbridge et al., 2004 ) distinguishesthe following ele- ments:(a)merits(clearlyidentifiesthecontextofeachpatternand helpsidentifymissingpatterns),(b)flaws(morededicatedtofunc- tionalpatterns;non-functionalpatternstendtocovermanylevels ofsystemdevelopmentandmanyinterrogatives),and(c)improve- ment(addiconsineachpatterntoprovideclassifications).
Inthecontextofpatternsindependablesoftwaresystemdevel- opment,(Serrano et al., 2008 ) explained howpattern integration canbeachievedusingalibraryofpreciselydescribedandformally verifiedsolutions.Conceptually,ourmodelingframeworkissimilar tothatproposedinSerrano et al. (2008 ).Nevertheless,theyuseda rigidstructure(apatternwasdefinedasaquadruplet),andconse- quently, their approach is not usable forcapturing specific char- acteristics of patterns for several domains. Another attempt was madeby Boussaidi and Mili (2005 ), whocreatedametamodelfor boththe problemandthedesignpattern. Then, usinga mapping betweenthe two models, they were able tocreate an integrated modelusing modeltransformations. Although we found similari- tiesbetweenthisapproachandours,wewantedtogofurtherthan thetransformationbydefiningafullprocessforaprovenintegra- tion andbe able (within thisdefined process) to allow the user tofreelyaltertheautomaticresultwhilealwayscheckingthefinal correctness.
Usually,thesedesignartifactsareprovidedasalibraryofmod- els(sub-systems) andasa systemofpatterns(framework)in the moreelaborateapproaches.However,thereremainsalackofmod- eling languages and/or formalisms dedicated to specifying these design artifactsandunderstanding their reuse in softwaredevel- opment automation. More precisely, a gap betweenthe develop- ment of systems using patterns andthe pattern information re- mains.Mostpatternsareexpressedina textualform, asinformal indicationson how to solveindividual designproblems. Some of them use more precise representations based on UML diagrams, althoughthesepatternsdonotincludesufficientsemanticdescrip- tions to automate their processingand to extend their use.Fur- thermore, the correct application of a pattern is not guaranteed because the description does not consider the effects of interac- tions,adaptationandcombination,makingtheminappropriatefor
automated processing within a tool-supported development pro- cess. Finally,duetomanual patternimplementation,theproblem ofincorrect implementation(the mostimportantsourceofsafety issues)remainsunresolved.
Recently, Hauge, (2014 ) presented a pattern-based approach calledSafeControlSystems(SaCS)forthedevelopmentofconcep- tual safety designs. The SaCS provides three artifacts: (1) a pro- cessforthesystematicapplicationofpatternsasdevelopmentsup- port; (2)asetofpatternsintheformofalibrary;and(3)apat- ternlanguage todefine patternsandtospecifytheapplicationof patterns for safetydesign conceptualization. This work is similar to our work inits goal, e.g., determining thelevel of abstraction andlife-cycle stagein whichthe patternisused andhowto de- fine relationships between patterns in order to efficiently com- binethem.Thesetwoworksarecomplementaryandtheirintegra- tion should improvethe existing pattern-based development ap- proaches. A successfulapplication of our framework attempts to demonstratethe resultingopportunity forapplyingpattern-based developmentcombinedwiththebenefitsofmodel-basedengineer- ing.
7.3. Model-driven engineering and domain-specific language
The modeling concept is becoming a major paradigm in sys-
temengineering,particularlyinsystemsoftwareengineering(Selic, 2003; Schmidt, 2006; France and Rumpe, 2007 ).Itsuserepresents asignificantadvanceintermsofthelevelofabstraction,continu- ity, and generality. It offers tools to address the development of complex systems, improving their quality and reducing their de- velopment cycles (Liebel et al., 2014 ). Modeling languages based on precise metamodels andtransformations are key elements of MDE (Atkinson and Ku ¨hne, 2003 ).Withtheuseofmodelinglan- guages,softwareengineeringmodels aparticularsystemwiththe goaltobecompleteandaccurate inthecontextofthesystemre- quirements.Ifdoneproperly,model-drivenengineeringallowsthis modeltobeverifiedusingformalanalysisorexecutionand, later, togeneratethesourcecoderequiredtoimplementthesystemvia transformations (Selic, 2003; France and Rumpe, 2007 ). Domain- specific languages (DSLs) (France and Rumpe, 2005; Gray et al., 2007 )arelanguagesthatarespecificallytailoredtotheneedsofa particularproblemorapplicationdomain.Domainexpertscanun- derstand,validate, modify,test,andsometimesevendevelop such languages.DSLsarefrequentlyusedinMDE(Selic, 2003 ).
TheimportanceofmodelsandMDEindependabilityengineer- ingwashighlightedbyGran et al. (2007 );Hamid et al. (2008 )and
Biehl et al. (2010 ), andconfirmed ina recentempirical studyon the state of modeling in the embedded domain (Bernardi et al., 2012; Panesar-Walawege et al., 2013; Liebel et al., 2014; Ni et al., 2015 ) because code generation and simulation are heavily used; theuseofmodelinginthatfieldhasbeenreportedashighlypos- itive.In thiscontext,(Bernardi et al., 2012 ) proposed a UMLpro- file compliant withMARTE (OMG, 2011b ) to address dependabil- ity analysis and modeling. Such a profile allows one to conduct a quantitative dependability analysis of software systems mod- eled withUML. Theyfocusonthefollowingfacetsofdependabil- ity: reliability, availability andsafety.In Hamid et al., (2008 ), we proposed amethodologythat associatesa model-drivenapproach withcomponent-based development todesign distributedappli- cations with fault-tolerant requirements. UML-basedmodeling is used to capture application structure and related non-functional requirements thanks to the complementary profile called the FT profile,whichisanextension ofa subsetofQoS&FTandusesthe NFP (non-functionalproperties) sub-profile ofMARTE (profile for modeling and analysis of real-time embedded systems). Stereo- types dedicatedto fault tolerancespecify thefault-detection pol- icy,replication managementstyleandreplicagroup management.
From thismodel descriptor, files are generated(according to the deployment andconfigurationstandard (D&C))tobuild bootcode (staticdeployment)thatinstantiates,configuresandconnectscom- ponents andto loadconfigured components.Withinthisprocess, componentreplicationandFTpropertiesaredeclarativelyspecified atthe modellevelandaretransparent forthecomponentimple- mentation.
7.4. Pattern modeling languages
The first attempttomodelpatterns istheGoF (Gamma et al., 1995 ),whereeachpatternisdescribedbyUMLdiagrams.However, there are only naturaltexts anda few examples to link the dia- grams together and explain the integration. Thisis not sufficient for ourobjectives. Therefore,UMLAUT was proposed by Guennec et al., (20 0 0 )asanapproachtoformallymodeldesignpatternsby
proposing extensionsto the UMLmetamodel 1.3. They used OCL
language to describe structural and behavioral constraints.These constraints are defined using metamodels of specified UML ele- ments via metacollaboration diagrams. The mechanismsof asso- ciation of these meta-leveldiagrams to their instance levels (in- stancesofdesignpatterns)arethendefined,allowingonetomodel design patternsaccurately via theUMLlanguage. Thiswork isil- lustratedthroughtwoexamplesofdesignpatterns:visitorandob- server.
Byspecifyingdesignpatternsasmetamodelsanddefiningaset offeaturestohandlethemodels,theRBML(role-basedmetamod- eling language)proposedbyKim et al., (2003 )attemptstobridge the gap between the pattern and its use. The RBML formalism, whichisbasedonUML,isabletopreciselycapturevariousdesign perspectivesofpatterns,suchasstaticstructure,interactions, and state-basedbehavior.EachoneischaracterizedbyaspecificRBML metamodel type:(1)SPS (staticpatternspecifications) isa struc- tural design pattern specification that allows one to express the staticview,(2)IPS(interactionpatternspecification)representsthe design patternintermsofpossibleinteractions betweendifferent roles, and(3)SMPS(statemachinepatternspecifications)canadd a behavioralperspectivetodescribe thevariousstatesinwhicha patternmaylieinitsexecution.However, theintegrationbyitself remainsnotclearlydefined.
Another issue raised in DPML (design pattern modeling lan- guage) (Mapelsden et al., 2002 ) and in LePUS (Gasparis et al., 2008 ) is visualization. These languages both use a combination of modeling andmetamodeling. In Gasparis et al., (2008 ), a for- mal andvisual language calledLePUS was presented forspecify- ing design patterns.It definesa patterninan accurate andcom- plete basedon a formulainZ witha graphicalrepresentation. A diagram inLePUSisagraphwhosenodescorrespondtovariables andwhose arcsare labeledwithbinary relations.The framework promoted by LePUSisinteresting, althoughthe degreeofexpres- siveness proposed to capturetheintent andabstractthesolution of a patternistoo restrictive.In addition,there isa lackof rela- tionship betweenthepatternanditsinstantiation.Withregardto theintegrationofpatternsinsoftwaresystems,theDPML (design patternmodelinglanguage)(Mapelsden et al., 2002 )allowsthein- corporationofpatternsinUMLmodels.
TherecentlycompletedFP6SERENITYprojecthasintroduceda new notionofsecurity anddependability (S&D)patterns.SEREN- ITY’s S&D patterns are precise specifications of validated S&D mechanisms includingaprecisebehavioraldescription,references to theS&Dproperties,constraintsonthecontext requiredforde- ployment, information describing how to adapt andmonitor the mechanism, andtrustmechanisms. The S&DSERENITY patternis specified following severallevelsof abstraction tobridge the gap between abstract solutionand implementation.These abstraction levels are S&D classes, S&D patterns and S&D implementation.
Such validated S&D patterns and the formal characterization of their behaviorandsemanticscanalsobethebasicbuildingblocks for S&D engineering in embeddedsystems. Serrano et al. (2008 ) explained how this can be achieved using a library of precisely described andformally verified security anddependability (S&D) solutions,i.e.,S&Dclasses,S&Dpatterns,S&Dimplementationand S&Dintegrationschemes.Moreover,Giacomo et al. (2008 )reported an empirical experience regardingthe adoptionandelicitation of S&Dpatternsintheairtrafficmanagement(ATM)domain,demon- strating the powerofusing patternsasguidanceto structurethe analysisofoperationalaspectswhenusedatthedesignstage.
Existing formalization attempts forpatterns (Mikkonen, 1998; Soundarajan and Hallstrom, 2004 )fallshortinhandlingtheinher- ent variabilityin patterndescriptions (Zdun and Avgeriou, 2008 ), andtheyfocusprimarilyonaverylimiteddesignandarchitecture pattern scope.They donot yetaddress specific domains, such as security andsafety.Forthe firsttype of approach(Gamma et al., 1995 ), design patterns are usually represented by diagrams with specificnotations,suchasUMLobjectdiagrams,thatareaccompa- niedbytextualdescriptionsandexamplesofcodetocompletethe description.Furthermore,theirstructureisrigid(context,structure, solution, etc.). Unfortunately,theuse and/or applicationofa pat- terncanbedifficultorinaccurate.Infact,theexistingdescriptions arenotformaldefinitionsandsometimesleaveambiguitiesregard- ing theexact meaningofthe patterns.Thereare somepromising andwell-provenapproaches(Douglass, 1998 )basedonGamma et al., (1995 ). However, this type of technique does not afford the highdegreeofflexibilityinthepatternstructurethatisrequiredto reachourobjectives.Thusfar,patternshavebeenusedinsystem- aticengineeringapproachesforvarioustasks,suchasclassification andorganization,patternselectionbasedonsecurityrequirements (Weiss and Mouratidis, 2008 ),analyzingandmodelingsecurityre- quirements(Cheng et al., 2003 ),andmeasuringtheintroducedse- curitylevel(Fernandez et al., 2010 ).Asimilarsituationisprevalent for safetypatterns,which are surveyedin Preschern et al. (2013, 2014 ) and formalized in Armoush, (2010 ). In Daniels and Vouks (1997 )andTichy et al. (2004 ),thepatternspecificationconsistsof aservice-basedarchitecturaldesignanddeploymentrestrictionsin the form ofUMLdeployment diagrams fordifferentarchitectural services. Conceptually,ourmodeling framework issimilar to that proposedintheSERENITYproject.Nevertheless,thepatternstruc- ture isrigid (apatternis definedasquadruplet) andis thus un- usable forcapturingspecificcharacteristicsofS&Dpatterns.How- ever, the SERENITY projectproposes several levels of abstraction to bridge thegap betweenabstractsolutionand implementation, whichintendstonotcaptureacommonrepresentationofpatterns forseveraldomains.
From a differentpointofview,we agreewiththeargumenta- tions given inZdun and Avgeriou, (2005 ) tojustifywhy thepre- cise specification andformalization of a patternby definitionre- strictsits“degreeoffreedomforthedesign”,andhencethereare nosuccessstoriesofworksdealingwithpatterndevelopment.This is not onlyrelated to dependability patterns. Notehowever, that theseworksdonotaddressthevalidationactivitywhichisanim- portant issue in anydesign activity andmore particularlyin de- pendabilityengineering.Weclaim thatdependabilityissubjectto rigorous andprecise specification andthe proposed literature (to the bestofourknowledge)failsto meetthesetwoobjectives. To remedy these contradictory needs, we support the specifications of dependability patterns at two levels of abstractions, domain- independentanddomain-specific,inasemi-formalrepresentation through metamodeling techniques. This allows to support some variabilityofthepattern,andhencetofosterreuse.
8. Conclusion
In this paper, we propose a pattern-based development ap-
proachtoaddressdependabilitythroughamodel-drivenengineer- ing approach. The approach is composed of severalsteps and is based on metamodeling techniques that enable the specification of dependability patterns. It is also based on model transforma- tiontechniquesforthepurposesofgeneration.Thedefinedmeta-