<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>From Requirements to Architectures for Better Adaptive Software Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jo~ao Pimentel</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Konstantinos Angelopoulos</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>V tor E. Silva Souza</string-name>
          <email>vitorsouza@inf.ufes.br</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>John Mylopoulos</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jaelson Castro</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Centro de Informatica, Univ. Federal de Pernambuco (UFPE)</institution>
          ,
          <addr-line>Recife</addr-line>
          ,
          <country country="BR">Brazil</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Computer Science Dept., Federal University of Esprito Santo (Ufes)</institution>
          ,
          <addr-line>Vitoria</addr-line>
          ,
          <country country="BR">Brazil</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Department of Information Eng. and Computer Science, University of Trento</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2013</year>
      </pub-date>
      <volume>978</volume>
      <fpage>91</fpage>
      <lpage>96</lpage>
      <abstract>
        <p>The growing interest in developing adaptive systems has led to numerous proposals for approaches aimed at supporting their development. Some approaches de ne adaptation mechanisms in terms of architectural design, consisting of concepts such as components, connectors and states. Other approaches are requirements-based, thus concerned with goals, tasks, contexts and preferences as concepts in terms of which adaptation is de ned. By considering only a problem- or a solutionoriented view, such proposals are limited in specifying adaptive behavior. In this paper we present ongoing work on supporting the design and runtime execution of adaptive software systems both at a requirements and architectural level, as wells as its challenges, ranging from architectural derivation from requirements to re ned adaptation control mechanisms.</p>
      </abstract>
      <kwd-group>
        <kwd>adaptive systems</kwd>
        <kwd>architectural design</kwd>
        <kwd>adaptation control mechanisms</kwd>
        <kwd>requirements</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the authors conducted a comparative study, concluding that
requirementsand architecture-based approaches for software adaptation share common
elements, such as the use of feedback loops and of external control mechanisms.
However, there are also di erences that reveal complementary advantages and
disadvantages of the two approaches. On one hand, requirements-based
approaches capture and model the objectives of the system, but they lack awareness
about the capabilities and the limitations of the proposed solution. On the other
hand, architectural models provide guidance for the deployment of the
monitoring mechanisms and the e ectors that apply the adaptation process on the target
system. The objectives of the system, however, are coded into the adaptation
strategy, making it di cult to handle changes at the requirements level.
      </p>
      <p>Based on the results of this study, the authors have embarked on a research
project to better link requirements and architectural models by (a) developing
2
techniques for deriving architectural models from requirements, and (b)
extending existing techniques for designing adaptive software so that they exploit both
requirements and architectural models.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Baseline</title>
      <p>
        Our baseline is the Zanshin framework for the design of adaptive systems [2{4],
which in turn is founded on Goal-Oriented Requirements Engineering (GORE) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
Adopting from Control Theory the concept of feedback loop for adaptation,
Zanshin augments goal models with requirements for monitoring and adaptation of
such loops.
      </p>
      <p>To illustrate, Fig. 1 shows a goal model for an adaptive Automated Teller
Machine (ATM). Traditional i ? elements (goals and tasks) are connected by
re nement/operationalization relations, using AND/OR Boolean semantics for
goal satisfaction. Zanshin introduces Awareness Requirements (AwReqs,
represented by small circles) and Control Variables (rep. by diamonds).
g2 g7* g10
g1 Provide1ATM
t3 Turn1ATM1On
dt11Use1Cash1Sensor
dt12
t3 t4 t5 t6
g2 Start1ATM
dt11
dt12
dt11 dt12?
i1 (dt11|dt12)</p>
      <p>Detect1Cash
t4 Amount</p>
      <p>Make1ATM
t6 Available
t5 Setupt1oC1Boannnkection</p>
      <p>VP1AR1:1Never1fail
Use1Operator</p>
      <p>Entry
g8 g9* dt14
(g8 g9)+ dt14
g7 Serve1Customers</p>
      <p>Authenticate
g8 Customer
g10 Shutdown1ATM</p>
      <p>NOA
dt14Terminate1Session</p>
      <p>Conduct1ATM
g9 Transaction</p>
      <p>
        AwReqs are the requirements for the monitoring component of the feedback
loop and impose requirements on the success/failure of other requirements by
talking about the states assumed by other requirements at runtime [
        <xref ref-type="bibr" rid="ref12 ref2">2</xref>
        ]. As such,
they represent situations in which the stakeholders would like the system to
adapt. In Fig. 1, AwReq AR1 states that task Detect Cash Amount should
never fail.
      </p>
      <p>
        Control Variables (CVs) are elicited during System Identi cation [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
alongside Variation Points (VPs) and qualitative relations between these two
parameters (CVs and VPs) and indicators of requirements convergence, namely,
AwReqs. Examples in Fig. 1 are the VP for Detect Cash Amount (two ways of
satisfying it) and the CV Number of Operators Available (NOA). Di erential
relations, e.g., (AR1=N OA) &gt; 0 indicate how changes in parameters a ect
indicators (in this case, increasing NOA increases the success of AR1 ).
From Requirements to Architectures for Better Adaptive Software Systems
3
      </p>
      <p>
        Lastly, Evolution Requirements (EvoReqs) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] specify when and how should
other requirements change at runtime. For example, an EvoReq may be \If
requirement R fails three times in a row, replace it with requirement R ", where
R is a weaker (i.e., easier to ful l) requirement. Using these new classes of
requirements, Zanshin1 implements a feedback loop that supports adaptation of
a base system.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Research Agenda</title>
      <p>We are interested in taking further the baseline by combining requirement models
with software architectures. Towards this end, we propose a systematic
methodology for deriving architectural models from requirements. This research will
allow us to design adaptive software systems that exploit combined goal and
architectural models, thereby capturing allowable adaptations at both levels of
abstraction. Therefore, the system would have the maximum variety of
alternatives when it has to deal with failures or with environmental changes. The second
part of this work involves extending Zanshin to exploit combined goal and
architectural models, but also making it quantitative, in order to acquire higher
precision. Moreover, Zanshin will be extended to deal with multiple failures,
exploiting techniques inspired by Control Theory.
3.1</p>
      <p>Architectural derivation
Architectural derivation is concerned with the generation of architectural models,
which can include: (a) components &amp; connectors models for describing the system
structure; (b) statecharts for describing system behavior; and (c) feature model
for expressing the variability of system con guration. These di erent models
are complementary, each one capturing a particular view of the system being
designed, thus requiring di erent derivation approaches.</p>
      <p>
        In previous work [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], we proposed methods to derive the aforementioned
models from goal models. The key of that proposal was to derive the models
in such a way as to preserve the variability expressed in the goal model.
However, when considering architectural derivation and its design decisions for the
particular case of adaptive systems, there are three new concerns that arise:
a. Additional variability | there may be di erent alternatives to accomplish a
given task. For instance, di erent algorithms and di erent technologies can
be applied, each with its di erent bene ts and drawbacks. The alternatives
identi ed during architectural derivation will expand the space of adaptation
possibilities.
b. Additional control elements | besides referring to requirements concepts,
Zanshin elements (such as AwReqs and Control Variables ) may also refer
to and have an in uence on architectural concerns. For instance, the time
interval for a timed transition could be de ned as a Control Variable, rather
than as a pre-de ned, static interval.
1 See https://github.com/sefms-disi-unitn/Zanshin/wiki
4
c. Additional features to support adaptation | the support of self-adaptation
may require the inclusion of new features in the system. This is the case, for
instance, when the system requires some kind of instrumentation in order to
monitor the satisfaction of AwReqs.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] we handled the identi cation of additional features, considering the
monitoring capabilities required to monitor runtime context. There, we were
concerned with the derivation of components &amp; connectors. An approach for
eliciting future requirements, which can be used to identify additional variability
(both at requirements and architectural level) was presented in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. In [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]
we explore additional variability derived from di erent web services that are
available in a pool of services.
      </p>
      <p>Currently, we are working on including additional variability and additional
control elements, while supporting the derivation of statecharts. After all,
statecharts capturing system behavior constitute the most important architectural
view for adaptive systems.</p>
      <p>The process for deriving statecharts from goal models comprises 7 steps. The
rst step, Identify design tasks and constraints, allows to re ne the requirements
model by including elements that are relevant from the architectural point of
view. Next, Assign tasks, consists of assigning the tasks that will not be
performed nor supported by the base software system | e.g., tasks that will be
performed by an external actor (human or otherwise). In the next step, De ne
basic ow, the architect analyzes all re nements of the goal model and de nes
ow expressions that de ne their runtime behavior. These expressions, which
allow to de ne ows with a notation akin to regular expressions, are used in
the next step (Generate base statechart ) to create a skeleton of the statechart.
The statechart depicted in Fig. 2 was derived from the goal model in Fig. 1.
For this statechart, we selected the third ow expression of Detect Cash Amount
(dt11 dt12? | perform dt11, then optionally perform dt12) and the rst ow
expression of Serve Customers (g8 g9* dt14 | perform g8, then perform g9
zero-or-more times, lastly perform dt14).</p>
      <p>Start ATM</p>
      <p>Turn ATM</p>
      <p>On
From Requirements to Architectures for Better Adaptive Software Systems
5</p>
      <p>In the remaining steps the statechart skeleton is re ned, as follows. First,
during Specify transitions the architect de nes events and conditions of the derived
transitions. Then, the statechart is enriched to describe the system's adaptive
behavior, including the interaction with an external component that provides
adaptation-related functionality. This takes place during Specify adaptive
behavior. As a last step, Perform further re nements allows the architect to expand
the model in order to include technical details and other concerns that may not
have been handled earlier, by exploiting the statechart concept of sub-states.
3.2</p>
      <p>Advancing runtime software adaptation mechanisms
Section 2 sketched Zanshin and how it de nes adaptation mechanisms based on
parameters and indicators as well as qualitative relations among them. Given
the subjective nature of requirements, it is important to support such qualitative
mechanisms. However, in some scenarios, it is possible to identify quantitative
relations instead of qualitative. This is especially true for architectural models,
which are more tangible than requirements ones.</p>
      <p>The use of quantitative relations will allow ner tuning of parameters when
restoring failed indicators, which in turn can reduce critical overshooting and
redundant oscillations. Methods such as regression analysis can then be used
to extract quantitative information about the relation among parameters and
indicators.</p>
      <p>Moreover, such quantitative relations assist in solving the issue of
multiple failing indicators. Usually, software systems involve con icting requirements
(e.g., cost and performance) that result in con icting indicators (i.e., when one
is failing the other is succeeding and vice versa). When several indicators fail it is
hard to perform a trade-o analysis with a good degree of con dence using only
qualitative information. Thus, the quantitative relations, combined with
prioritized indicators, can be exploited in order to apply optimization techniques and
identify the best possible adaptation.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusions</title>
      <p>We have presented ongoing work towards improving support for the development
of adaptive software systems. On one hand, the combination of requirements
and architectural models will provide a richer space of possible adaptations. The
proposed derivation methodology will facilitate the creation of adaptive systems
based on the Zanshin framework. On the other hand, the control mechanisms
of the framework itself will be improved, by tackling the occurrence of multiple
(and possibly con icting) failures and using quantitative relations to increase
the precision of adaptation mechanisms.</p>
      <p>As mentioned in Section 2, a prototype implementation of the Zanshin
framework is available. This implementation will be extended in order to support the
enhancements proposed in Section 3.2. A prototype tool for the derivation of
statecharts, as presented in Section 3.1, is currently under development2.
Acknowledgments. This work has been supported by the ERC advanced grant
267856 \Lucretius: Foundations for Software Evolution" and by Brazilian
institutions CAPES and CNPq.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>K.</given-names>
            <surname>Angelopoulos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. E. S.</given-names>
            <surname>Souza</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Pimentel</surname>
          </string-name>
          , \
          <article-title>Requirements and Architectural Approaches to Adaptive Software Systems: A Comparative Study,"</article-title>
          <source>in Proc. of the 8th International Symposium on Software Engineering for Adaptive and SelfManaging Systems</source>
          (to appear),
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>V. E. S.</given-names>
            <surname>Souza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lapouchnian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. N.</given-names>
            <surname>Robinson</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Mylopoulos</surname>
          </string-name>
          , \Awareness Requirements,
          <article-title>" in Software Engineering for Self-Adaptive Systems</article-title>
          <string-name>
            <surname>II (R. Lemos</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Giese</surname>
            ,
            <given-names>H. A.</given-names>
          </string-name>
          <string-name>
            <surname>Mu</surname>
          </string-name>
          <article-title>ller</article-title>
          , and M. Shaw, eds.), vol.
          <volume>7475</volume>
          of Lecture Notes in Computer Science, pp.
          <volume>133</volume>
          {
          <issue>161</issue>
          , Springer,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>V. E. S.</given-names>
            <surname>Souza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lapouchnian</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Mylopoulos</surname>
          </string-name>
          , \
          <article-title>System Identi cation for Adaptive Software Systems: A Requirements Engineering Perspective,"</article-title>
          <source>in Conceptual Modeling ER</source>
          <year>2011</year>
          , pp.
          <volume>346</volume>
          {
          <issue>361</issue>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>V. E. S.</given-names>
            <surname>Souza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lapouchnian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Angelopoulos</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Mylopoulos</surname>
          </string-name>
          , \
          <article-title>Requirements-driven software evolution,"</article-title>
          <source>Computer Science - Research and Development</source>
          , pp.
          <volume>1</volume>
          {
          <issue>19</issue>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>J.</given-names>
            <surname>Mylopoulos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Chung</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E. S. K.</given-names>
            <surname>Yu</surname>
          </string-name>
          , \
          <article-title>From Object-Oriented to GoalOriented Requirements Analysis,"</article-title>
          <source>Communications of the ACM</source>
          , vol.
          <volume>42</volume>
          , no.
          <issue>1</issue>
          , pp.
          <volume>31</volume>
          {
          <issue>37</issue>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C. S. do Prado</given-names>
            <surname>Leite</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lapouchnian</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Mylopoulos</surname>
          </string-name>
          , \
          <article-title>Con guring features with stakeholder goals,"</article-title>
          <source>in Proceedings of the 2008 ACM symposium on Applied computing - SAC '08</source>
          , pp.
          <volume>645</volume>
          {
          <issue>649</issue>
          , ACM Press,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lapouchnian</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Liaskos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Mylopoulos</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J. C. S. P.</given-names>
            <surname>Leite</surname>
          </string-name>
          , \
          <article-title>From Goals to High-Variability Software Design," in Foundations of Intelligent Systems</article-title>
          , vol.
          <volume>4994</volume>
          /
          <year>2008</year>
          , pp.
          <volume>1</volume>
          {
          <issue>16</issue>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>J.</given-names>
            <surname>Pimentel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lucena</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Castro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Silva</surname>
          </string-name>
          , E. Santos, and
          <string-name>
            <given-names>F.</given-names>
            <surname>Alencar</surname>
          </string-name>
          , \
          <article-title>Deriving software architectural models from requirements models for adaptive systems: the STREAM-A approach,"</article-title>
          <source>Requirements Engineering</source>
          , vol.
          <volume>17</volume>
          , no.
          <issue>4</issue>
          , pp.
          <volume>259</volume>
          {
          <issue>281</issue>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>J.</given-names>
            <surname>Pimentel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Castro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Perrelli</surname>
          </string-name>
          , E. Santos, and
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          , \
          <article-title>Towards anticipating requirements changes through studies of the future,"</article-title>
          <source>in 5th International Conference on Research Challenges in Information Science</source>
          , pp.
          <volume>1</volume>
          {
          <issue>11</issue>
          , IEEE,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>J. Pimentel</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Castro</surname>
          </string-name>
          , E. Santos,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Finkelstein</surname>
          </string-name>
          , \
          <article-title>Towards Requirements and Architecture Co-evolution,"</article-title>
          <source>in Advanced Information Systems Engineering Workshops</source>
          , pp.
          <volume>159</volume>
          {
          <issue>170</issue>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Grunbacher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Oriol</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Burgstaller</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Dhungana</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Lopez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Marco</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Pimentel</surname>
          </string-name>
          , \
          <article-title>Goal-Driven Adaptation of Service-Based Systems from Runtime Monitoring Data," in 2011 IEEE 35th Annual Computer Software</article-title>
          and Applications Conference Workshops, pp.
          <volume>458</volume>
          {
          <issue>463</issue>
          , IEEE,
          <year>July 2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>2 Available at https://github.com/jhcp/GoalArch/tree/master/papers</mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>