<!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>Designing adaptive systems1</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>João Pimentel</string-name>
          <xref ref-type="aff" rid="aff0">0</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 Informática Universidade Federal de Pernambuco Recife</institution>
          ,
          <country country="BR">Brazil</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2015</year>
      </pub-date>
      <volume>978</volume>
      <fpage>91</fpage>
      <lpage>96</lpage>
      <abstract>
        <p>In this work, we investigate the interplay between requirements and architecture in the context of adaptive systems. Furthermore, we propose the Multi-Level Adaptation for Software Systems (MULAS) framework. It is centred on the iterative and incremental refinement of a goal model, towards the creation of a design goal model, which can be used at runtime to drive adaptation on a system that is properly instrumented. Moreover, the framework includes a toolsupported process for generating statechart behavioural models from a design goal model.</p>
      </abstract>
      <kwd-group>
        <kwd>Requirements-driven software adaptation</kwd>
        <kwd>architecture-driven software adaptation</kwd>
        <kwd>goal-oriented requirements models</kwd>
        <kwd>model-driven development</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Different approaches to support the development of self-adaptive systems have been
proposed in the literature. However, those are often restricted to a single aspect of
software development. For instance, the Zanshin framework [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] provides support for
handling adaptation at the requirements level, enacting a
monitoring-diagnosis-compensation cycle. With Zanshin, adaptation is specified in terms of stakeholders' goals, tasks,
quality constraints, and other elements.
      </p>
      <p>
        On the other hand, Rainbow [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] provides similar capabilities, but addressing
architectural models. Thus, it is concerned with properties of systems' components and
connectors, e.g., response time, number of servers and load balancing. The differences
between requirements-based and architecture-based approaches are discussed in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        Requirements engineering and architectural design, while addressing the system
specification at different abstraction levels, comprise intertwined activities [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The
former focuses on the problem at hand, whereas the latter provides solutions for that
problem.
      </p>
      <p>Approaches that only support requirements-based or architecture-based adaptation
thus, lack relevant elements of the adaptation space. For instance, architecture-based
Copyright © 2015 for this paper by its authors. Copying permitted for private and academic
purposes.
approaches might ignore stakeholders' goals and preferences, while requirements-based
ones may not address concerns related to the system implementation, such as
algorithms and components.</p>
      <p>Hence, the investigation of how to support seamless adaptation mechanisms across
the different phases of software development seems to be a promising venue to improve
the development of self-adaptive software systems. In this paper we provide an
overview of a design process centred on an extended goal model, which incorporate
elements aiming to support requirements-based and architectural-based adaptation. To
illustrate, we adopt a meeting scheduler exemplar.</p>
      <p>The remainder of this paper is organized as follows. In Section 2, we present our
process to design adaptive systems, focusing on behavioural specification. Section 3
discusses the limitations of this work. Later, we present ongoing and future work in
Section 4.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Design process</title>
      <p>The proposed process, which is a part of the Multi-Level Adaptation for Software
Systems (MULAS) framework, comprises eight steps (Fig. 1). The first five steps are
related to the refinement of design goal models: Identify design tasks, constraints and
assumptions; Assign tasks; Define basic flows; Identify indicators, parameters and
relations; and Specify adaptation strategies. The other three steps are related to
statecharts: Generate base statechart; Specify transitions; and Include adaptation
elements. While these steps may be followed mostly sequentially, waterfall-like, in
realistic settings it is expected that the architect will go back and forth, by introducing
additional refinements to already refined elements.</p>
      <p>Identify design</p>
      <p>tasks,
constraints, and
assumptions</p>
      <p>Include
adaptation
elements
+</p>
      <p>Assign tasks</p>
      <p>Define basic</p>
      <p>flows
Specify
transitions</p>
      <p>Generate base
statechart</p>
      <p>Identify
indicators,
parameters, and
relations
Specify
adaptation
strategies
Start
event</p>
      <p>End
event</p>
      <p>Task
+
Subprocess</p>
      <p>Repeatable
process/task</p>
      <p>Sequence</p>
      <p>flow
The first step, Identify design tasks, constraints and assumptions, supports the
refinement of a goal model by including elements that are not initially required by
stakeholders, but are relevant from the architectural point of view, expressed as design tasks,
design constraints and design assumptions. The second step, Assign tasks, consists of
assigning the responsibilities for the execution of tasks — e.g., tasks that will be
performed by an external actor (human or otherwise). This assignment is helpful for
defining the scope of the system.</p>
      <p>In the next step, Define basic flows, the architect introduces possible flows for every
sub-tree in the goal model. Roughly, these flows describe the order that the
sub-elements are going to be fulfilled or executed, so that their parent element can be
considered fulfilled or executed. These flows are expressed as alternative flow expressions,
introduced as annotations to a goal model using a top-down, bottom-up, or middle-out
strategy. These expressions are later used to automatically generate a statechart that
represents the system’s behaviour.</p>
      <p>
        The next two steps are related to the adaptation capabilities of the system: Identify
indicators, parameters and relations and Specify adaptation strategies. The former is
related to the addition, in the design goal model, of some elements proposed by Zashin
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], in light of the design elements previously included in the first step. In the Specify
adaptation strategies step it is considered how the system will react to failures — e.g.,
by retrying the execution of a task, or by changing the parameters described in the goal
model.
      </p>
      <p>The second part of the process is related to system behaviour. The first step,
Generate base statechart, makes use of derivation patterns to automatically create a
statechart from the flow expressions previously defined. Although flow expressions are
a useful intermediate abstraction between goal models and statecharts, they are not as
expressive as statecharts. Thus, in the next step, Specify transitions, the transitions of
the statechart are refined with their events and conditions, which are identified by
analyzing when any given transition should take place.</p>
      <p>
        An example of a resulting (Design) Goal Model is shown in Fig. 2, which is an
excerpt from a Meeting Scheduler system [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Besides the scheduling itself, the system
supports the characterization of meetings, the gathering of timetables and the
management of meetings, while satisfying the non-functional requirements of scalability
and portability. The excerpt on Fig. 2 depicts the sub-tree of the Define Schedule goal,
which is refined with the Schedule Manually and Schedule Automatically tasks. Both
tasks must be supported by the system, thus it is an AND-refinement. The automatic
scheduling can only be performed if the Rooms Available assumption is satisfied, since
the system is not able to book additional rooms. Moreover, the Schedule Automatically
task is refined with design elements – elements that result from design decisions, i.e.,
they are not mandated by customers or users.
      </p>
      <p>The tasks defined during architectural design (the so called design tasks) in this
example are: Brute Force Algorithm, Heuristics-based Algorithm, and Select Date. The
first two tasks define algorithms that can be executed to perform the scheduling, while
Select Date is a task that must be performed once the algorithms find a set of possible
dates. Additionally, the automatic scheduling presents two design constraints: it must be
performed in less than ten minutes and it must be implemented with web-services. In
particular, the selected web-service must be available at least 90 % of the time.</p>
      <p>Besides goals, tasks, constraints and assumptions, the DGM also contains flow
expressions, an extension of regular expressions that allow the definition of the
execution flow of the system. Six constructs can be used in these expressions: alternative
(vertical bar, |), optional (question mark, ?), sequence (blank space, ), repetition (star or
plus symbol, * or +), parallelism (hyphen,–), and idle states (iX, where X is a natural
number).</p>
      <p>Each flow expression defines the behaviour for the element which it is on top of. For
instance in Fig. 2, the (t15|t16) expression states that, when the system needs to Define
Schedule, it may either perform Schedule Manually (t15) or Schedule Automatically
(t16). Moreover, for the execution of Schedule Automatically, the expression is
((dt52|dt53) dt54), with this meaning: after performing either Brute Force Algorithm
(dt52) or Heuristics-based Algorithm (dt53), the system will perform the Select Date
task (dt54).</p>
      <p>Lastly, the DGM defines what must be monitored during the system execution (the
so called awareness requirements), and what can be modified in the system (the
parameters). In our example, the AR1 awareness requirement, linked to the Schedule
Automatically task, states that it must never fail. AR2, linked to the Rooms Available
assumption, indicates that it should be false no more than twice a week (Max Failure 2,
7d). On the other hand, AR3 linked to the Availability of Service design constraint,
defines that its success rate should not decrease for two days in a row
(NotTrendDecrease 1d, 2).</p>
      <p>As illustrated with the aforementioned example, the design goal model allows the
integration of requirements and architectural concerns in a single model. Both
requirements and architecture elements can be used to specify the system adaptation,
with awareness requirements, parameters, relations, and adaptation strategies. In the next
subsection we discuss some of the limitations of the proposed process and the design
goal model.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Limitations</title>
      <p>This MULAS design process, as well as the design goal model, presents a series of
limitations, regarding the following aspects: expressiveness of the design goal model,
heuristics for selecting optimal flows, tool support, and compositional adaptation.</p>
      <p>
        Expressiveness of the design goal model – The design goal model proposed in this
paper is based on goal model extension [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. That extension includes awareness
requirements and parameters, which are relevant as they correspond to the control theory
concepts of reference value and control input. However, as a result of the focus on these
control theory concepts, two other important concepts have been partially neglected:
contribution links and context. The explicit use of contribution links and context
annotations may improve the expressiveness of the design goal model. Nonetheless, it is
necessary to balance this expressivity with the complexity of the proposed model.
      </p>
      <p>Heuristics for selecting optimal flows – In the MULAS framework, we propose the
use of flow expressions to define the possible flows of the system. However, we do not
provide any guidance that helps the architect in the decision of which flow may be best
in different contexts and scenarios. Further investigation is required in order to identify
heuristics, patterns, or techniques to facilitate such decision.</p>
      <p>Tool support – A supporting tool was developed specifically to support the MULAS
framework. Even though this tool is functional, more effort is required in order to make
the tool suitable for public use, related not only to actual development but also to the
creation of user documentation, such as user guides or tutorials.</p>
      <p>
        Compositional adaptation – Parameterized adaptation is adaptation related to the
modification of variables. In contrast, compositional adaptation is related to modifying
structural parts of the system. While we have conducted early endeavours on the latter
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ][
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] during this research, the MULAS framework is focused only on the former.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Ongoing and Future Work</title>
      <p>
        This is an ongoing work, with early results presented in [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ][
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Its most recent results
composed a doctoral thesis [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] which includes: detailed description of the MULAS
framework; description of a support tool; case studies; experiments. We were able to
use this framework for developing information systems, which were verified by means
of simulation. Moreover, a mobile differential drive robot was designed and developed
using the MULAS framework, providing satisfactory results.
      </p>
      <p>Through an experiment with 15 requirements engineering students, we were able to
obtain evidence in favour of the feasibility of the framework. Nonetheless, further
experimentation is required in order to properly evaluate and evolve the proposal,
specifically in the context of large industrial system.</p>
      <p>
        Another interesting line of research is to adapt the MULAS framework for
developing context-sensitive systems [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. As future work, we intend to investigate the
integration of a control theoretic approach (Zanshin) with a context-based one, aiming to
expand the expressiveness of the proposal.
      </p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgments</title>
      <p>This work has been supported by the ERC advanced grant 267856 “Lucretius:
Foundations for Software Evolution”, as well as by the following Brazilian institutions:
FACEPE, CAPES and CNPq.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Souza</surname>
            ,
            <given-names>V.E.S.</given-names>
          </string-name>
          :
          <article-title>Requirements-based software system adaptation</article-title>
          ,
          <source>Ph.D. Thesis</source>
          (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Garlan</surname>
          </string-name>
          , D., Cheng, S.-W.,
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>A.-C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schmerl</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Steenkiste</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Rainbow: architecturebased self-adaptation with reusable infrastructure</article-title>
          .
          <source>Computer</source>
          ,
          <volume>37</volume>
          ,
          <year>2004</year>
          , pp.
          <fpage>46</fpage>
          -
          <lpage>54</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Angelopoulos</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Souza</surname>
            ,
            <given-names>V.E.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pimentel</surname>
          </string-name>
          , J.:
          <article-title>Requirements and Architectural Approaches to Adaptive Software Systems: A Comparative Study</article-title>
          . 8th
          <source>International Symposium on Software Engineering for Adaptive</source>
          and
          <string-name>
            <surname>Self-Managing</surname>
            <given-names>Systems</given-names>
          </string-name>
          ,
          <year>2013</year>
          , pp.
          <fpage>23</fpage>
          -
          <lpage>32</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Castro</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lucena</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Silva</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alencar</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santos</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pimentel</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <article-title>Changing attitudes towards the generation of architectural models</article-title>
          .
          <source>Journal of Systems and Software</source>
          ,
          <volume>85</volume>
          ,
          <year>2012</year>
          , pp.
          <fpage>463</fpage>
          -
          <lpage>479</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Yu</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mylopoulos</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lapouchnian</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Liaskos</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leite</surname>
            ,
            <given-names>J.C.S.P.</given-names>
          </string-name>
          <string-name>
            <surname>From Stakeholder</surname>
          </string-name>
          <article-title>Goals to High-Variability Software Design</article-title>
          .
          <source>Technical report csrg-509</source>
          , University of Toronto,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Pimentel</surname>
          </string-name>
          . J.,
          <string-name>
            <surname>Lucena</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Castro</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Silva</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santos</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alencar</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <article-title>Deriving software architectural models from requirements models for adaptive systems: the STREAM-A approach</article-title>
          .
          <source>Requirements Engineering Journal</source>
          ,
          <fpage>17</fpage>
          -
          <lpage>4</lpage>
          ,
          <year>2012</year>
          , pp.
          <fpage>259</fpage>
          -
          <lpage>281</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Dermeval</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Soares</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alencar</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santos</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pimentel</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Castro</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lucena</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Silva</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Souza</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Towards an i*-based Architecture Derivation Approach</article-title>
          .
          <source>Fifth International i* Workshop</source>
          ,
          <year>2011</year>
          , pp.
          <fpage>66</fpage>
          -
          <lpage>71</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Pimentel</surname>
          </string-name>
          , J.:
          <article-title>Systematic Design of Adaptive Systems -</article-title>
          A
          <string-name>
            <surname>Control-Based</surname>
            <given-names>Framework</given-names>
          </string-name>
          ,
          <source>Ph.D. thesis</source>
          (
          <year>2015</year>
          ). Available at http://www.cin.ufpe.br/~ler/supplement/istar2015/
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Pimentel</surname>
          </string-name>
          , J.;
          <string-name>
            <surname>Angelopoulos</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Souza</surname>
            ,
            <given-names>V. E. S.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Mylopoulos</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Castro J. From</surname>
          </string-name>
          <article-title>Requirements to Architectures for Better Adaptive Software Systems</article-title>
          .
          <source>6th International i* Workshop</source>
          ,
          <year>2013</year>
          , pp.
          <fpage>91</fpage>
          -
          <lpage>96</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Pimentel</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          et al.
          <article-title>From requirements to statecharts via design refinement</article-title>
          .
          <source>29th Symposium on Applied Computing</source>
          ,
          <year>2014</year>
          , pp.
          <fpage>995</fpage>
          -
          <lpage>1000</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Vilela</surname>
          </string-name>
          , J.;
          <string-name>
            <surname>Castro</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ; Pimentel; J.; Soares,
          <string-name>
            <given-names>M.</given-names>
            ;
            <surname>Lima</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ;
            <surname>Lucena</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. Deriving</surname>
          </string-name>
          <article-title>the behavior of context-sensitive systems from contextual goal models</article-title>
          .
          <source>30th Symposium on Applied Computing</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>