6
Case-based reasoning and knowledge-graph based metamodel for runtime adaptive architectural modeling Marina Mongiello Politecnico di Bari Dipartimento di Ingegneria Elettrica e dell’Informazione Via E. Orabona, 4 [email protected] Tommaso Di Noia Politecnico di Bari Dipartimento di Ingegneria Elettrica e dell’Informazione Via E. Orabona, 4 [email protected] Francesco Nocera Politecnico di Bari Dipartimento di Ingegneria Elettrica e dell’Informazione Via E. Orabona, 4 [email protected] Eugenio Di Sciascio Politecnico di Bari Dipartimento di Ingegneria Elettrica e dell’Informazione Via E. Orabona, 4 [email protected] ABSTRACT We present an approach to reasoning on complex adap- tive software architectures able to dynamically design and change features of the model according to changed behav- ioral properties or context variables and parameters. The approach consists of a metamodel composed by a Knowledge Graph(KG) and case-based reasoning to find a path connect- ing state, context and action on the KG. The metamodel allows to derive a runtime architectural model of adaptive application from high level goals and operational require- ments, and enable runtime composi tion of the layout of a decentralized and distributed complex application. To vali- date the metamodel we also propose an instantiation in two real scenarios in order to exploit both requirements and ar- chitectural model. CCS Concepts Software and its engineering Software architectures; Abstraction, modeling and modularity; Theory of com- putation Automated reasoning; Computing method- ologies Knowledge representation and reasoning; Keywords Adaptive architecture, knowledge graph, runtime modeling 1. INTRODUCTION AND MOTIVATION Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copy- rights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Permis- [email protected]. SAC 2016, April 04-08, 2016, Pisa, Italy c 2016 ACM. ISBN 978-1-4503-3739-7/16/04. . . $15.00 DOI: http://dx.doi.org/10.1145/2851613.2851767 Interest in self-adaptation has increased in the last years. A variety of techniques and issues are related to modeling, im- plementation and execution of self-adaptive systems [6],[15]. Adaptation concerning properties flagged as self-* gained increasing attention with the aim to categorize and classify aspects and issues of self-management [8], and was orga- nized in well-known reference-models [8]. One major chal- lenge of self-* adaptation remains the assurance of quality properties and hence of architectural decision making pro- cess completion both at design and runtime [17], [10]. To comply with the self-managed software architecture in which components configure automatically their interaction and in a way compatible with architectural specifications, several reference model have been proposed [9]. Anyway runtime adaptation of software components both at architectural level and at behavioral level is still on open and challenging problem [13],[9]. More specifically, adaption actions are con- cerned at architectural level to add, or remove components, apps, services from or to a component in a composite model; on the other hand, at behavioral level they enable the adap- tation to changes in the properties, and knowledge about the external environment, dynamic changes in a app or compo- nent behavior, instantiation of new component, deployment, loading and execution depending on change in the external context or triggered by data and information detached from the external environment or from physical sensors. To face the problem of dynamic architectural modeling and of run- time composition of the layout of a decentralized and dis- tributed complex application, we propose an approach able to exploit all of the relevant aspects related to adaptation such as: high level goals, non-functional and operational requirements, data and knowledge about the external envi- ronment, the context and the user’s habits and profiles, data and information retrieved or detached from external sources and sensors. The approach proposes a formal metamodel that uses a knowledge-graph 1 to model information and relevant data 1 https://www.google.com/intl/it it/insidesearch/features/ 1323

Case-Based Reasoning and Knowledge-Graph based Metamodel ...sisinflab.poliba.it/publications/2016/MDND16/SAC 2016.pdf · metamodel for runtime adaptive architectural modeling Marina

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Case-Based Reasoning and Knowledge-Graph based Metamodel ...sisinflab.poliba.it/publications/2016/MDND16/SAC 2016.pdf · metamodel for runtime adaptive architectural modeling Marina

Case-based reasoning and knowledge-graph basedmetamodel for runtime adaptive architectural modeling

Marina MongielloPolitecnico di Bari

Dipartimento di IngegneriaElettrica e dell’Informazione

Via E. Orabona, [email protected]

Tommaso Di NoiaPolitecnico di Bari

Dipartimento di IngegneriaElettrica e dell’Informazione

Via E. Orabona, [email protected]

Francesco NoceraPolitecnico di Bari

Dipartimento di IngegneriaElettrica e dell’Informazione

Via E. Orabona, [email protected]

Eugenio Di SciascioPolitecnico di Bari

Dipartimento di IngegneriaElettrica e dell’Informazione

Via E. Orabona, [email protected]

ABSTRACTWe present an approach to reasoning on complex adap-tive software architectures able to dynamically design andchange features of the model according to changed behav-ioral properties or context variables and parameters. Theapproach consists of a metamodel composed by a KnowledgeGraph(KG) and case-based reasoning to find a path connect-ing state, context and action on the KG. The metamodelallows to derive a runtime architectural model of adaptiveapplication from high level goals and operational require-ments, and enable runtime composi tion of the layout of adecentralized and distributed complex application. To vali-date the metamodel we also propose an instantiation in tworeal scenarios in order to exploit both requirements and ar-chitectural model.

CCS Concepts•Software and its engineering → Software architectures;Abstraction, modeling and modularity; •Theory of com-putation→Automated reasoning; •Computing method-ologies → Knowledge representation and reasoning;

KeywordsAdaptive architecture, knowledge graph, runtime modeling

1. INTRODUCTION AND MOTIVATIONPermission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copiesare not made or distributed for profit or commercial advantage and thatcopies bear this notice and the full citation on the first page. Copy-rights for components of this work owned by others than ACM mustbe honored. Abstracting with credit is permitted. To copy otherwise,or republish, to post on servers or to redistribute to lists, requires priorspecific permission and/or a fee. Request permissions from [email protected] 2016, April 04-08, 2016, Pisa, Italyc⃝2016 ACM. ISBN 978-1-4503-3739-7/16/04. . . $15.00

DOI: http://dx.doi.org/10.1145/2851613.2851767

Interest in self-adaptation has increased in the last years. Avariety of techniques and issues are related to modeling, im-plementation and execution of self-adaptive systems [6],[15].Adaptation concerning properties flagged as self-* gainedincreasing attention with the aim to categorize and classifyaspects and issues of self-management [8], and was orga-nized in well-known reference-models [8]. One major chal-lenge of self-* adaptation remains the assurance of qualityproperties and hence of architectural decision making pro-cess completion both at design and runtime [17], [10]. Tocomply with the self-managed software architecture in whichcomponents configure automatically their interaction and ina way compatible with architectural specifications, severalreference model have been proposed [9]. Anyway runtimeadaptation of software components both at architecturallevel and at behavioral level is still on open and challengingproblem [13],[9]. More specifically, adaption actions are con-cerned at architectural level to add, or remove components,apps, services from or to a component in a composite model;on the other hand, at behavioral level they enable the adap-tation to changes in the properties, and knowledge about theexternal environment, dynamic changes in a app or compo-nent behavior, instantiation of new component, deployment,loading and execution depending on change in the externalcontext or triggered by data and information detached fromthe external environment or from physical sensors. To facethe problem of dynamic architectural modeling and of run-time composition of the layout of a decentralized and dis-tributed complex application, we propose an approach ableto exploit all of the relevant aspects related to adaptationsuch as: high level goals, non-functional and operationalrequirements, data and knowledge about the external envi-ronment, the context and the user’s habits and profiles, dataand information retrieved or detached from external sourcesand sensors.

The approach proposes a formal metamodel that uses aknowledge-graph 1 to model information and relevant data

1https://www.google.com/intl/it it/insidesearch/features/

1323

Page 2: Case-Based Reasoning and Knowledge-Graph based Metamodel ...sisinflab.poliba.it/publications/2016/MDND16/SAC 2016.pdf · metamodel for runtime adaptive architectural modeling Marina

about a given environment and case-based reasoning to de-rive information from existing data. More specifically, case-based reasoning means using old experiences to understandand solve new problems. In case-based reasoning, a reasonerremembers a previous situation similar to the current oneand uses that to solve the new problem. Case-based reason-ing can mean adapting old solutions to meet new demands;using old cases to explain new situations; using old cases tocritique new solutions; or reasoning from precedents to inter-pret a new situation (much like lawyers do) or create an equi-table solution to a new problem (much like labor mediatorsdo) [1]. The approach we proposed can be instantiated inreal scenarios, by contextualizing the main features, i.e op-erational requirements, adaptation mechanism, componentsand apps to load and execute. The use of a knowledge-graphallows the modeling of complex relationships among piecesof data, while case-based reasoning enables the modeling ofadaptive behavior to context, state and environment. Weobtain a runtime model of an adaptive software architecturein which we consider changes in its properties according tochanged behavioral properties or context variables and pa-rameters.

Related work. Modeling and analysis of self-adaptive sys-tems has gained increasing attention in the last years. Sev-eral approaches intend to face the main challenges of model-ing such systems. Formal approaches remain the more pow-erful in order to ensure correctness and guarantee of qualityproperties.

A complete study that follows the principles of a systematicliterature review is proposed by D. Weyns [17]. A survey ofarchitectural modeling in self-management is proposed in [9].

Formal methods have been used in [2] to model MAPE-Kloops, the approach presents a conceptual and methodologi-cal framework for formal modeling, validating, and verifyingdistributed self-adaptive systems; MAPE-K loops for self-adaptation can be naturally specified in an abstract statefullanguage like Abstract State Machines. In [16] a lightweightformal framework for modeling and executing service-orientedapplications, can be used to express adaptive behavior of ser-vice components. The authors show how modeling a com-ponent able to monitor and react to environmental changes(context-awareness) and to internal changes (self-awareness),and present the operators for expressing and coordinatingself-adaptive behaviors in a distributed setting.

In [5] graph transformation is used to model self-adaptation,the approach uses attributed graph grammars. They defineconsistency and operational properties that are maintaineddespite adaptation and give static conditions for their ver-ification. Modeling of evolving component-based system isin [14], the authors propose a Software Architecture basedapproach in which the usage of the system SA and of SAverification techniques allows the system assembler to de-sign architectural components whose interaction is verifiedwith respect to the specified properties. By exploiting thisvalidation, the system assembler can perform code synthe-sis by only focusing on each single architectural component,hence refining it as an assembly of actual components whichrespect the architectural component observable behaviour.

search/knowledge.html

Models of service choreography and composition is in [3]adaptation happens at discovery time, thus the deployedapplication is customized (i.e., it is tailored) with respectto the context at binding time but, at run time, it is frozenwith respect to evolution. If context changes at run time theservice needs to dynamically adapt to continue respect- ingthe reached SLA and dependability. Models of adaptationfor Future internet application in [4], the project consists inthe definition of a choreography development process basedon automated synthesis of choreographies out of a large scaleservice base and a user-centric requirements specification.

Composition of self-adaptive systems for dependability isin [7]. Semantic approaches are in [11] to model self-adaptivearchitectural model in IoT and in [12] for runtime verifica-tion.

With respect to existing approach, we propose a metalevelto model adaptive architecture that can be instantiated invarious contexts.

The main contributions of the work are:

1. deriving a runtime architectural model of an adaptiveapplication from high level goals and operational re-quirements

2. instantiate the theoretical approach in a real imple-mentation framework in order to exploit both require-ments and architectural model

The remaining of the paper is organized as follows: Section 2introduces the proposed approach. Section 3 instantiate theapproach in two real scenario: ie, a proximity environmentsoftware, and a software to dynamically modify the homescreen of a smartphone Section 4 concludes the paper andintroduces future works.

2. APPROACHWe propose a formal approach to build runtime architec-tural models of adaptive software. To this purpose we de-fine a metamodel that can be instantiated in real scenariosto build adaptive architectural models that can be modifiedat runtime depending on behavioral/contextual changes andobservable properties on the user habits and profiles. Themetamodel is made up of a control level where data de-tached from sensors are transmitted to effectors. Sensorsand Effectors are interpreted in the sense of the definition ofthe MAPE-K model [8]. Actions and tasks to be performedare derived from goals and high-level requirements that thecontrol level takes into account to model the integration andexecution of the software’s components.

Knowledge about the adaptive software and its environmentis modelled using knowledge-graphs. Such knowledge aboutsoftware and environment includes, goals – for example,event-condition-action formulated as high-level objectives ofan app or a part of it, a goal may be show an advertisementon a mobile device – and high-level requirements (for exam-ple, as Operational Requirements (OR) such as: if the user isnear a restaurant, it’s lunchtime, usually she eats Japanesefood, then she will be advertised of a Japanese restaurantnearby.

1324

Page 3: Case-Based Reasoning and Knowledge-Graph based Metamodel ...sisinflab.poliba.it/publications/2016/MDND16/SAC 2016.pdf · metamodel for runtime adaptive architectural modeling Marina

Knowledge in the knowledge-graph is used to find an Adap-tive Architectural Model (AAM) of a composite applicationwhose components/apps are deployable to run. The modelis adaptive therefore it can be varied continuously; a con-ceptual image of the model is maintained in the knowledgebase and is runtime adapted as soon as changes in the con-text/behavior occurs or data are detected from the sensors.

The metamodel allows to express runtime adaptation bothat architectural and behavioral level. At architectural level,services, apps, components are dynamically added to theAAM of the adaptive application. At behavioral level, apps,services or components may be runtime loaded, deployedand executed. Besides, the model drives the deployment ofapps and components during software execution: a sequenceor a composition of apps/components/services modeled inthe AAM may be deployed and executed on a mobile user’sdevice or on the middleware.

The metamodel has been instantiated in two similar con-texts: a proximity environment and the creation of a ”smartsmartphone”. The metamodel can be extended to modelsystems of systems.

Definition 1. AGoal-Requirement Knowledge Graph grKGis a direct Graph G = {N,E}, where nodes N are resources– N = S∪C∪A (S = States,C = Context,A = Action) –and edges e ∈ E are such that:

1. E ⊆ (S×C)∪ (C×A), i.e. “edges connect state withcontext, context with action”;

2. e ∈ S ×C when given s ∈ S and c ∈ C a propositionP (s, c) is verified;e ∈ C × A when the proposition P (s, c) → a, a ∈ Aimplies an action;Action individuates the set of actions to be performed.

Definition 2. An Adaptive Architectural MetaModel is thetuple AAMM =< S, grKG, find,E > where S and E arerespectively the sensors and effectors, grKG is the Goal-Requirement Knowledge Graph, find is the algorithm tofind a path in the graph such that P (s, t) → a.

Figure 1 shows the metamodel of the proposed approach.

Nodes in the graph belong to one of the possible sets, state,context and action. Nodes of the type state identify thestate in which the user actually is, the context is a tupleidentifying several parameters to realize a given context, forexample, hour, location, date. Nodes action correspond tothe task or subtask that an app or a component is able toperform. For example, when the user is in the state movingaround, the context is: hour=12:45a.m., date today, andlocalization is downtown, he is shown advertisements aboutrestaurants or places where to have lunch.

Case-based reasoning. Reasoning on the graph is enabledby a case-based algorithm to find a path connecting state,context and action such that given a proposition P (s, c), itis verified that P (S,C) → a.

The algorithm performs a process to come up with a se-quences of steps or schedule for achieving some state of the

Figure 1: The proposed Metamodel

world. Tuples of states and contexts are modelled as VectorSpace Model. For example the tuples are:S = {s1, s2, ..}C = {< hour1, date1, position1 >, ...}S×C = {< s1, hour1, date1, position1 >, ...}.Hence given the set of states and contexts, we have the se-quence of all the possible tuples State/Context, the algo-rithm works selecting one among the possible situation ofpre-filtering, post-filtering and online about context, stateand profile. In the pre-filtering the option should be thefollowing:

1. select cases that match the context

2. select cases that match the state

3. select cases that match the profile

for post-filtering the sequence is changed in (state, profile,context) while in the online strategy the selection is per-formed on the state or context. The algorithm considers allthe possible State/Context tuples; if it exactly matches therequested tuple, it will be returned. Otherwise it returnsthe most similar tuple.

Data: grKG , (sf , cf )Result: actions to be performed

1 S ← state nodes;2 C ← context nodes;3 A← action nodes;4 while N ̸= ∅ do5 extract s from S6 extract c from C7 for (s, c) do8 if ((s,c)=(sf , cf ) then9 return (s,c);

10 else11 while S×C ̸= ∅ do12 Evaluate max(sim{(sf , cf ), (s, c)})13 end

14 end

15 end

16 end

Algorithm 1: Algorithm find

3. INSTANTIATION OF THE MODEL

1325

Page 4: Case-Based Reasoning and Knowledge-Graph based Metamodel ...sisinflab.poliba.it/publications/2016/MDND16/SAC 2016.pdf · metamodel for runtime adaptive architectural modeling Marina

3.1 Proximity environnment.The metamodel proposed in Section 2 was instantiated inthe context of proximity environments. In the recent fewyears, proximity is being considered as an added value ofmost applications, especially in social environments. For ex-ample, today search engines retrieve results to queries thatare pinpointed in the vicinity of the current position of theuser. This offers a great advantage compared to having gen-eral results all around the world: for example, if you arein Rome and you need a paintings shop and type paintingson Google, because you should find the results of paintingsstores that are in your city. Until a few years ago you wouldhave had to write selling paintings Rome, now you don’tneed specifying the place anymore. Obviously if such a shopdoes not exist the user is shown the closer result, which canbe even miles away.

In addition to location-based search engine, this phenomenonis spreading in the social sphere, thanks to the enormousspread of smartphones with GPS. Using the GPS connec-tion, users of social networks can say in every moment inwhich attraction, or local shop they are. When the useris in a certain place she launches the application from hersmartphone, after connection with the GPS has been made,looks at the list of places in the neighborhood and the so-called check-in to tell users on her list of contacts where sheexactly is. Companies have the ability to publish tendersrelated to check-in for customers who are in their structureand more benefits for those who have more check-ins. Forexample, a restaurant or a bar can offer an aperitif at firstthat check in at a particular time or a discount. In conclu-sion, the message being sent out is this:tell me where youare, I’ll tell you what to look for.

In the field of proximity marketing, we developed AProM(Adaptable Proximity Marketing tool) a mobile app to en-able spreading advertisements to end user according to herneeds.

The app provides two main functionalities depending on theuser localization and advertisement refinements based on in-formation concerned with her habits and preferences. It tar-gets limited areas (e.g., malls, city centres, etc), where theend-users can/must buy what they need. The service is ableto localize end-users and informs them about new productsthey could be interested in. The user can simply find whatshe is looking around and stay updated on the latest offersof local business and events organized.

Adaptive Architectural MetaModel instantiation.Sensors. Instantiation of Sensors consists in geolocalizationdevices (the GPS on the user device, sensors in the externalenvironments, context variables available on the user mo-bile device), events detached from the sensors. Data andevents detached from the sensors and observable propertiesare modeled in the knowledge base. The knowledge basestores also advertisements and the user’s profile.

The context update is periodically executed to perform esti-mation and evaluation on the stored data as well as to refinethe advertising process to provide the user advertisementstailored on her interests, her location and mainly selected

Points of Interest,

Effectors are based a non-functional requirements enablingadaptability. In this instantiation Adaptability is imple-mented using the Reflection pattern when deploying andexecuting apps.

The instantiated knowledge graph models goals, the objec-tive that the user expects: Goal are events or conditionsthat one or more players are interested in building.

Operational requirements. They are modeled according tothe formalism defined in [12]. Let us consider for exam-ple the following requirements: Operational Requirement 1.The user is walking downtown. The GPS locates its positionon a map. A set of events: offers, promotions available inthat area is communicated on her smartphone. This require-ment is expressed in terms of the Response pattern with theGlobally scope according to [12] as:

Globally, if “the GPS module signals the exact position onthe map ” then in response “the system suggests eventsthat belong to a set of promotions to the user”.

Operational Requirement 2. The user is travelling. Hisplane has landed and he is in the airport. He has no reserva-tion for hotel. The points of interest in the category of hotelsare localized on the map. This requirement is expressed interms of the Response pattern with the Globally scope as isformalized as:

Globally, if “the GPS module locates her position on themap and the reserved flight has landed” then in response“the system suggests points of interests in the category ofhotels to the user”.

Operational Requirement 3. It is for lunch time. The usergenerally eats Japanese foods. She has lunch at 13:00 a.m.every day. The points of interest in the category of foodoffering Japanese foods, in the area where the user is locatedare indicated on the map. This requirement is expressed interms of the Response pattern with the Globally scope andis formalized as:

Globally, if “the GPS module locates the exact positionon the map and it is 12:45 a.m. and the user generallysearches Japanese restaurants ” then in response “the sys-tem suggests points of interests in the category of food andsubcategory Japanese foods to the user”.

Find algorithm. The Find algorithm extracts the path in theKnowledge Graph according to the states and contexts, andfinds the action to be performed. Given the sets of contexts(date, hour, position) and given relations (l*n*m) contextscorresponding to k contents, given the user’s profile descrip-tion, the algorithm computes the category as a function ofcontents and user’s profile.

States in the grKG may be ”‘the user is walking downtown”’or ”‘the user is travelling”’, depending on the context asshown in Figure 2, the algorithm select the next context andthe action to be performed. Hence the app is dynamicallyadded to the architectural model. Considered contexts are inthe tuple (date, hour, position) and given relations (l*n*m)contexts corresponding to k contents.

Figure 2 shows categories extraction from contexts and user’s

1326

Page 5: Case-Based Reasoning and Knowledge-Graph based Metamodel ...sisinflab.poliba.it/publications/2016/MDND16/SAC 2016.pdf · metamodel for runtime adaptive architectural modeling Marina

Figure 2: Extraction of categories from contexts

profile. Once selected the high level features and propertiesto satisfy the goal matching the OR, and selected the appwhose description matches the precondition/postconditionof the operational requirements, loading and deployment isperformed through a reflection based call to the app code toexecute.

Implementation details.AProM was therefore developed on the Android platform.The adaptable architecture of the mobile app is based on areflective implementation of operational requirements basedon user’s requirements.

The architectural model for the development of the applica-tion has been determined based on the functional and non-functional requirements, elicited during the design phase andfollows the model defined in Section 3.1. The deploymentof the application is static. The distributed application ismade up of components/apps selected by following paths inthe grKG.

Paths are extracted according to the algorithm 1.

A first app acquires user’s position via GPS sensor. Anothercomponent added to the model is Google server queried inorder to access the cartography of Google Maps and informa-tion on the activities and places of Google Places; a compo-nent to access information about offers and events, insertedby the operators of activities and places performs the taskof providing consumer services (app on smartphones). Thefirst app interacts with the third one to obtain informationabout events and offers disclosing its coordinates in the formof a pair (latitude, longitude) using an HTTP request.

The events and offers are uploaded to the server by au-thorized entities, represented for example by shopkeepers(whose authenticity verification can be done via VAT), whichwill include events and offers specifying the belonging cate-gory and a brief description. After changes in the positionof the user or in the context, other apps can be added to themodel in order to satisfy different operational requirements.Figure 3 shows a screenshot of AProM: the area where theuser is localized is the circle in which are shown points ofinterest belonging to the category of foods; the right side ofthe figure shows the list of categories that can be accessedby user for manual search or for inserting advertisements.

3.2 A "‘smart smartphone"’The second instantiation refers to the implementation of amobile application that manages dynamic characteristics ofthe home of a smartphone, depending on the user’s habits,by her localization (detected by GPS) in which the user is

Figure 3: Screenshot of AProM

Figure 4: Smartphone home pages

currently using the device, by the external context and byuser’s current behavior.

A number of fundamental aspects are used to dynamicallymanage the various behaviors of the application. Specifi-cally:

1. a tracking of all locations visited when the applicationis running and the GPS is active;

2. the most visited places extracted from the previouslist, annotated as landmarks;

3. a track of all accesses to the applications installed onthe device, to involve them in various previously storedlocations.

4. a list of the most used apps in certain places of interest,to propose the definition of a new view.

Automated management through continuous monitoring ofthese items is capable of continuously update the views avail-able on the device, thus adapting the smartphone home tothe changing needs of the user. Figure 4 shows three exam-ples of smartphone home screens related to three differentcontexts: the home, travel and work. In the home context,app providing functionalities related to the home living aredirectly available to the user, such as skygo,facebook; inthe travel contexts apps such as tripadavisor, googlemapsare more frequently used by by the user and hence are avail-able; in the work context the user need app such as dropbox,email, skype and chrome.

4. CONCLUSION AND FUTURE WORKIn the Future Internet era, the way software will be producedand used will depend on the new challenges deriving fromthe huge number of software apps, component and servicesthat can be composed to build new applications. The in-tegration and composition of existing software, components

1327

Page 6: Case-Based Reasoning and Knowledge-Graph based Metamodel ...sisinflab.poliba.it/publications/2016/MDND16/SAC 2016.pdf · metamodel for runtime adaptive architectural modeling Marina

and services and the runtime modeling of architectural solu-tion of decentralized and distributed software is now gaininga crucial role in the software modeling and production. In-terest in several aspects ranging from theoretical issues likemodeling and analysis, to practical and implementation oneslike runtime management and integration, runtime verifica-tion, dynamic modeling is increased in the last years. Toface the problem of dynamic architectural modeling and ofruntime composition of the layout of a decentralized anddistributed complex application, we proposed a semantic ap-proach to take into account all of the relevant aspects con-cerning adaptation: high level goals, non-functional and op-erational requirements, data and knowledge about the exter-nal environment, the context and the user’s habits and pro-files, data and information retrieved or detached from exter-nal sources and sensors. The use of a knowledge-base allowsthe modeling and reasoning on complex adaptive softwarearchitecture and to dynamically model and change its prop-erties according to changed behavioral properties or contextvariables and parameters. The approach proposes a formalmetamodel that can hence be instantiated in real scenar-ios, by contextualizing the main features, i.e operational re-quirements, adaptation mechanism, components and appsto load and execute. The metamodel allows to derive a run-time architectural model of adaptive application from highlevel goals and operational requirements, and enable runtimecomposition of the layout of a decentralized and distributedcomplex application. To validate the metamodel we alsopropose an instantiation in two real scenarios in order toexploit both requirements and architectural model: a prox-imity environment and the home of a smartphone. We arecurrently working to strengthen the theoretical frameworkby adapting new reasoning services to take into account alsoinformation related to temporal interaction among softwarecomponents. We are also performing extensive experimentson a structured benchmark to test the framework functional-ities and performance on simple and on composable schemesalso in more advanced architectural environments.

5. REFERENCES[1] Book review: Case-based reasoning by janet kolodner

(morgan kaufmann publishers, 1993). SIGART Bull.,7(3):20–22, July 1996. Reviewer-Zeleznikow, John.

[2] P. Arcaini, E. Riccobene, and P. Scandurra. Modelingand analyzing MAPE-K feedback loops forself-adaptation. In 10th IEEE/ACM InternationalSymposium on Software Engineering for Adaptive andSelf-Managing Systems, SEAMS 2015, Florence, Italy,May 18-19, 2015, pages 13–23, 2015.

[3] M. Autili, P. D. Benedetto, and P. Inverardi.Context-aware adaptive services: The PLASTICapproach. In Fundamental Approaches to SoftwareEngineering, 12th International Conference, FASE2009, ETAPS 2009, York, UK, March 22-29, 2009.Proceedings, pages 124–139, 2009.

[4] M. Autili, P. Inverardi, and M. Tivoli. CHOREOS:large scale choreographies for the future internet. In2014 Software Evolution Week - IEEE Conference onSoftware Maintenance, Reengineering, and ReverseEngineering, CSMR-WCRE 2014, Antwerp, Belgium,February 3-6, 2014, pages 391–394, 2014.

[5] A. Bucchiarone, H. Ehrig, C. Ermel, P. Pelliccione,and O. Runge. Rule-based modeling and staticanalysis of self-adaptive systems by graphtransformation. In Software, Services, and Systems,pages 582–601, 2015.

[6] B. Cheng, R. de Lemos, H. Giese, P. Inverardi,J. Magee, J. Andersson, B. Becker, N. Bencomo,Y. Brun, B. Cukic, et al. Software engineering forself-adaptive systems: a research roadmap. LectureNotes in Computer Science, pages 1–26, 2009.

[7] J. Cubo, G. Ortiz, J. Boubeta-Puig, H. Foster, andW. Lamersdorf. Adaptive services for the futureinternet. J. UCS, 20(8):1046–1048, 2014.

[8] M. C. Huebscher and J. A. McCann. A survey ofautonomic computing-degrees, models, andapplications. ACM Computing Surveys (CSUR),40(3):7, 2008.

[9] J. Kramer and J. Magee. Self-managed systems: anarchitectural challenge. In Future of SoftwareEngineering, 2007. FOSE’07, pages 259–268. IEEE,2007.

[10] P. K. McKinley, S. M. Sadjadi, E. P. Kasten, andB. H. Cheng. Composing adaptive software.Computer, pages 56–64, 2004.

[11] M. Mongiello, A. L. Grieco, M. Sciancalepore, andE. Vogli. Adaptive architectural model for futureinternet applications. In Proc. of the 5th InternationalWorkshop on Adaptive services for future internet,2015.

[12] M. Mongiello, P. Pelliccione, and M. Siancalepore.Ac-contract: run-time verification of context-awaresystems. In Software Engineering for Adaptive andSelf-Managing Systems, 2015. SEAMS ’15. ICSEWorkshop on, pages 106–115, May 2015.

[13] P. Oreizy, N. Medvidovic, and R. N. Taylor.Architecture-based runtime software evolution. InProceedings of the 20th international conference onSoftware engineering, pages 177–186. IEEE ComputerSociety, 1998.

[14] P. Pelliccione, M. Tivoli, A. Bucchiarone, andA. Polini. An architectural approach to the correctand automatic assembly of evolving component-basedsystems. Journal of Systems and Software,81(12):2237–2251, 2008.

[15] R. de Lemos et al. Software engineering forself-adaptive systems: A second research roadmap. InSoftware Engineering for Self-Adaptive Systems II,volume 7475 of Lecture Notes in Computer Science,pages 1–32. Springer Berlin Heidelberg, 2013.

[16] E. Riccobene and P. Scandurra. Formal modelingself-adaptive service-oriented applications. InProceedings of the 30th Annual ACM Symposium onApplied Computing, Salamanca, Spain, April 13-17,2015, pages 1704–1710, 2015.

[17] D. Weyns, M. U. Iftikhar, D. G. de la Iglesia, andT. Ahmad. A survey of formal methods inself-adaptive systems. In Proceedings of the FifthInternational C* Conference on Computer Scienceand Software Engineering, pages 67–79. ACM, 2012.

1328