<!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>
      <journal-title-group>
        <journal-title>International Conference on Advanced Aspects of Software Engineering
ICAASE, December</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>An Islamic application based on self-adaptive component</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Meghnous Malak 1</string-name>
          <email>MeghnousMalak@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Atil Fadila</string-name>
          <email>atil_fadila@yahoo.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>1Complex System Engineering Laboratory, (LISCO), Department of Computer Science, Badji Mokhtar University</institution>
          ,
          <addr-line>POB 12, 23000 Annaba</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Complex System Engineering Laboratory, (LISCO), Department of Computer Science, Badji Mokhtar University</institution>
          ,
          <addr-line>POB 12, 23000 Annaba</addr-line>
          ,
          <country country="DZ">Algeria</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <volume>0</volume>
      <fpage>1</fpage>
      <lpage>02</lpage>
      <abstract>
        <p>Self-adaptive systems are software systems that have to dynamically adapt their behavior in response to environment changes and users fluctuations. Thus, variability is a key concept in these systems; and handling it in early stages in the software development life cycle, helps to control complexity. The Design of these systems using component based architecture, enhances reuse and promotes dynamic reconfiguration, enabling system's modification without intercepting its execution, thus ensuring continuity of service. In this paper, we propose the dynamic adaptation of a component based Islamic application according to the user context (expert/novice), using orthogonal variability modeling and an aspect-oriented approach. We aim at combining UML Component Model and the orthogonal variability model in order to document variability. This allows to decrease system's complexity and to maintain whole view of the system's component based architecture and ensures variability traceability.</p>
      </abstract>
      <kwd-group>
        <kwd>- Self-adaptive system</kwd>
        <kwd>Variability modeling</kwd>
        <kwd>Orthogonal variability Model</kwd>
        <kwd>Component based architecture</kwd>
        <kwd>Aspect oriented paradigm</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Self-adaptive systems are software systems that have
to dynamically alter their behavior in response to
environment changes and user’s fluctuations, e.g. system
shifts from state N (configuration N) to a new state N+1
(new configuration N+1).</p>
      <p>Copyright © by the paper’s authors. Copying permitted only for private
and academic purposes.
Thus, modeling these systems is complex and crucial step
in the development process, due to the large number of
configurations and contexts.</p>
      <p>Handling variability is a common activity between
Software Product lines and self-adaptive systems. Hence,
using SPLs mechanisms to model variability in
selfadaptive systems will help to maintain the complexity.</p>
      <p>Component based development is a paradigm in which
the construction of applications is essentially based on
assembly and reuse of existing entities called "software
components”. Thus, it promotes reuse and provides a
component based architecture of system that can be
configured and reconfigured by adding, altering or
deleting components or connectors or interfaces.</p>
      <p>The contribution of this paper is to construct an
adaptive Islamic application according to the user
context. The idea is to develop a component based
architecture of the application to enhance component
reuse and to benefit from the architecture
reconfiguration. Also, and in in order to decrease
system’s complexity, we propose to model variability by
using SPLs mechanisms, for instance, the OVM.
Furthermore, to resolve variability at runtime and in
order to guarantee separation of concerns, we propose
an aspect oriented approach.</p>
      <p>The remainder of this paper is structured as follows:
section 2 and 3 introduce briefly self-adaptive systems
and variability management respectively. Section 4
details our proposed approach, and illustrate it with a
running example. Finally, section 5 concludes and
addresses future works.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Self-adaptive systems</title>
      <p>Dynamically adaptable software (DAS) self-adapts
according to context information gathered from the
surrounding environment [San17]. I.e. these systems
alter their own behavior dynamically in response to
change in its operating environment, such as end-user
inputs, external hardware devices and sensors, or
program instrumentation [Sai09].</p>
      <p>This behavioral change requires structural change, and
the system shifts from state N to a new state N+1. Thus,
a DAS needs to be able to sense its environment, to
autonomously select an appropriate configuration and to
efficiently migrate to this configuration. Handling these
issues at the programing level proves to be challenging
due to both the large number of contexts and the large
number of software configurations which have to be
considered. The use of modeling and the exploitation of
models at runtime level provide solutions to cope with
the complexity and the dynamic nature of DAS [Arc09].</p>
      <p>Moreover, DAS can be considered as a software
product line in which variability is resolved and bound at
runtime. Hence, variability modeling techniques used in
SPLs, could also be applied during design phase of DAS.</p>
      <p>Designing such complex computing systems has been
enhanced by the help of structural organization support
of component-based architecture and model, in which
software components encapsulates functionalities that
can be accessed through well-defined interfaces that do
not depend on their particular implementations. In
addition to the benefits of modularity and reuse that
result from this structural organization, adaptability and
dynamic reconfigurability are key properties sought with
this approach: it is possible to dynamically reconfigure
the components assembly during runtime to cope with
environment or user’s fluctuations [Alv17].</p>
      <p>Thereby, resolving variation points at runtime leads to
dynamically reconfigure the component based
architecture, by means of binding variants, e.g. adding,
removing, replacing or altering components, connectors
and interfaces.</p>
      <p>In order to obtain a clear separation of concerns
between the adaptation code and the computational
code, we consider the management of variability as a
non-functional requirement. Indeed, we use the aspect
oriented approach to weave or unweave variants (in our
work components) during runtime.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Variability management</title>
      <p>Variability is usually understood as the ability of a
software artifact to be changed (configured, customized,
extended or adapted) in order to fit different contexts
and environments. Variability can also be seen as the
anticipated change [Gal14]. Variation has been largely
addressed in the context of software product lines.
Indeed, it is a key fact of most systems, if not all. In such
systems, variation occurs for the same reasons as for the
product lines [Hil10] [Gal11]; including:</p>
      <p>I. Defer decisions about design or implementation.
II. Support multiple deployments.</p>
      <p>III. Achieve system qualities such as adaptability.</p>
      <p>Accordingly, handling variability (representing,
managing, and reasoning about) in early stages of the
software development lifecycle has become a relevant
concern [Gal11].</p>
      <sec id="sec-3-1">
        <title>3.1 FODA approach</title>
        <p>Variability representation consists on capturing
commonalities and differences between potential
variants. In product line engineering, the FODA
(Feature-Oriented Domain Analysis) model describes the
visible properties of systems, in terms of product
features. A feature is any stakeholder-relevant
characteristic of a system [Hil10]. Indeed, the FODA
model models such variability in a tree graph using
variants (features that might be mandatory, optional or
alternative) and variation points representing logical
relationships between variants [Bos15].</p>
        <p>On the basis of FODA, several extensions and
enhancement of feature modeling and feature models
were proposed, e.g. the FORM approach (Feature
Oriented Reuse Method), that aim to enriching feature
models with additional information, e.g., regarding
feature cardinalities propositional constraints and
nonfunctional properties of features [Hil10] [Bos15].</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2 The orthogonal variability model</title>
        <p>Modeling the variability within the traditional
software development models has some significant
drawbacks. For instance, it increases models complexity,
because these techniques specify both common and
variable parts of the system. Moreover, Variability
informations cannot be traced if they are scattered among
different models [Poh05] [Poh07].</p>
        <p>The orthogonal variability model is a language and a
methodology for superimposing variability over any
software development artifact without interfering into its
contents [Ecc16].</p>
        <p>The OVM approach can be used to document the
variability of arbitrary development artifacts, ranging
from textual requirements to design models and even test
cases. Also, the documentation of variability is separated
from the technical realization of variability in the
development artifacts and as such provides a further level
of abstraction that aids developers in managing
complexity and tracing variability [Poh07].</p>
        <p>To that end, in our work we specified variability
separately using the OVM as in figure 1, which depicts
the graphical notations of this model.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. The proposed approach</title>
      <p>This section addresses the problem of developing an
Islamic component-based application, that allows the
inspection of food according to the Islamic percepts, and
makes a verdict to classify them into Halal or not.
Page 123</p>
      <p>As early mentioned, the component based
development provides, an entire view of the system
which helps to reduce complexity; emphasize reuse; and
promotes reconfiguration. Consequently, and due to its
dynamic reconfiguration feature, we use the Fractal
Component Model.</p>
      <p>Moreover, our application is contextually adaptable,
especially according to the user context, in order to offer
different modes of operation, for users of different skill
level (Novice user/ Expert User).</p>
      <p>Variability management is a common key between
software product lines and self-adaptive system. Thereby,
several works have been established to identify synergy
points and cross-fertilization opportunities between the
two domains, such as [Alv12]. Correspondingly, we use
the orthogonal variability model, which is a variability
modeling mechanism in SPLs, to model information
about variability in our system.</p>
      <p>Furthermore, the dynamic adaptation of our
architecture, which can be considered as the resolution of
variation points, is implemented in AOP that proposes
the separation of concerns, which allows the reuse of the
same aspect in different components of the system. Thus,
we use aspects to specify when, where, and how to
reconfigure the system’s architecture with variants</p>
      <p>The following sub-sections detail each parts of our
work.</p>
      <sec id="sec-4-1">
        <title>4.1 Variability modeling and components design</title>
        <p>We model the component based architecture with
UML 2.0 Component diagram. In addition to, the
Orthogonal Variability Model to document variability in
design phase, in particular, to document our Islamic
Component based architecture. This is depicted in figure
2, and table 1, which provides a brief description of
composite components.</p>
        <p>Also, we adopt the orthogonal variability modeling
technique with a different semantic. Variation points
indicate the containing relationship between components,
e.g. TypeF Variation point indicates the potential
subcomponents of the Food component (what
subcomponents could be contained in the Food
component), which are, the three variants: meat,
additives, and drinks. The alternative choice with [1..3]
cardinality, signify that the Food component must at least
contain one subcomponent.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2 Adaptation of the architecture according to the context</title>
        <p>Adaptation of the architecture, as shown in Figure 3,
shifts the architecture of an application from a
configuration (state N) to a new configuration (N + 1)
according to a well-defined context, and following the
adaptation policy.</p>
        <p>4.2.1</p>
      </sec>
      <sec id="sec-4-3">
        <title>Context representation</title>
        <p>The context groups all the information about the
running environment. In this work, we are interested in
the user context, in particular, the expertise level of
users.</p>
        <p>As illustrated in figure 4, user context is characterized
by, the current state of the architecture and, the incoming
change of users which, in our work, is interpreted as
events.</p>
        <p>In our user context, we have two types of users:
i. A novice user: a user who does not need
proof/evidence about the classification of the
food.
ii. An expert user: a user who needs accurate and
detailed proof and justifications about the
classification of the food. This proof may be
extracted from the Holy Quran or the
Sunnah of the Prophet or both.
Page 124
Page 125</p>
        <p>We have used a rule-based approach, specifically
ECA (event, condition, action) rules, to resolve
variability at both design and runtime.</p>
        <p>The adaptation policy is a function that transforms a
series of events that represent the context into a set of
actions by respecting a set of conditions and starting
from an initial state (configuration N).</p>
        <p>In order to resolve variation point at the
implementation level and provide dynamic adaptation, we
have used the aspect oriented paradigm. It is a
programming paradigm that allows isolating
crosscutting concerns, which are so-termed non-business
functionalities (security, dynamicity). There are two main
symptoms related to cross-cutting concerns: scattered
and entangled code.</p>
        <p>In our approach, the aspect intercepts and captures
the state (configuration (N)) of the system as well as the
event describing the context (Expert/Novice) (see figure
5). From these data and conditions (in the ECA rules), a
series of actions (in the ECA rules) that serve to
transform the system to a new state (an N + 1
configuration), are executed. Specifically, the aspect
specify when, where, and weave/unweave components.</p>
        <p>Lesson 1, illustrates an example of ECA-rule based
adaptation policy.
Page 127</p>
        <p>In order to understand the adaptation, we propose the
following scenario:</p>
        <p>We suppose that the system’s current configuration
corresponds to figure 6.a.</p>
        <p>1. The user writes the word “ةريبلا” as the name
of the food he wants to search its
classification, and checks the checkbox “
ناءرقالنم ليلدلا” in order to get evidence from
the holy Quran about the classification of the
searched word.</p>
        <p>The system considers this user as expert (expert
event), because he required evidence along with the
answer.</p>
        <p>2. The aspect checks if the current
configuration of the system (figure 6.a)
contains the Quran component:
2.1 In the case, the answer is “yes”: the</p>
        <p>system provides the answer.
2.2 In the case, the answer is “no”: the
aspect adds the Quran component
dynamically to the architecture (figure
6.b), which allows the system to provide
the answer.
3. The system displays the answer which is :
“مارح ةريبلا معن” along with the evidence
(number of surah=05 , number of verse=90).</p>
        <p>In order to simplify the representation we consider:
Q1 is the question asked by the user, and A1 is the
answer displayed by the system.</p>
        <p>Figure 7 depicts the corresponding activity diagram to
the up-mentioned scenario.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Related work</title>
      <p>Several researches have been contributed for runtime
adaptation of systems. Similarly to our work, [Lou13]
proposed an aspect oriented approach to dynamically
adapt a component based system. However, variability is
modeled implicitly by architectural aspect at the design
level and no formal method to represent variation
method has been used. Unlikely, in our approach, the
variability is represented explicitly using the OVM.</p>
      <p>In [Wol08], SPL engineering and plugin techniques
have been combined to perform runtime adaptation.
Based on the information documented in the variability
models, and a plugin developed upon the .Net platform,
runtime adaptation and dynamic reconfiguration are
achieved. On the other hand,, our approach is based on
components and aspect oriented paradigm that satisfy the
separation of concerns property.</p>
      <p>[Cos07], is another work that used the AOP
combined with the computational reflection, to
dynamically adapt the internal structure of
aspectoriented component. On the contrary, our approach
achieve adaptation by reconfiguring the whole
architecture. Moreover, the proposed adaptation has as
purpose, correction or maintenance, while in our work,
we focus on adaptation according to the user context.
Finally, the variability modeling is not considered in this
work.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion and future work</title>
      <p>This paper addresses the adaptation of an Islamic
application according to the user context. We have
modeled this application using a combination of UML
Component Model and the orthogonal variability model
in order to document variability. This combination
reduces system’s complexity and maintains a whole view
of the system’s component based architecture and
ensures traceability of the variability.</p>
      <p>Based on this view and the OVM model, we have
proposed an aspect oriented approach to reconfigure the
architecture in order to satisfy the user’s needs.</p>
      <p>Context representation in a formal way is one of the
trends of self-adaptive systems. Our perspective is
therefore to explore context variability representation.</p>
      <p>7. References
[Hil10]
[Poh05]
[Poh07]
[Sai09]
[San17]
[Wol08]</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Bencomo</surname>
          </string-name>
          , P. Grace, “
          <article-title>Comparitive study of variability management in software product lines and runtime adaptable systems”, Variability Modelling of Software-Intensive Systems</article-title>
          , Sevilla, Spain, vol.
          <volume>1</volume>
          , pp.
          <fpage>9</fpage>
          -
          <lpage>17</lpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <given-names>F.</given-names>
            <surname>Alvares</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Rutten</surname>
          </string-name>
          , L. Seinturier, “
          <article-title>Domain-specific language for the control of self-adaptive component-based architecture”</article-title>
          , 1st ed., vol
          <volume>130</volume>
          ,
          <source>Journal of Systems and Software</source>
          , pp.
          <fpage>94</fpage>
          -
          <lpage>112</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>M. Acher</surname>
          </string-name>
          et al., “
          <article-title>Modeling context and dynamic adaptations with feature models”</article-title>
          , International Workshop Models at Run.time, Denver, USA, pp.
          <fpage>10</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <given-names>J.</given-names>
            <surname>Bosch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Capilla</surname>
          </string-name>
          , R. Hilliard, “
          <source>Trends in systems and software variability”</source>
          , 3rd ed., vol.
          <volume>32</volume>
          , IEEE Software, pp.
          <fpage>44</fpage>
          -
          <lpage>51</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <given-names>C.</given-names>
            <surname>Costa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pérez</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.Á</surname>
          </string-name>
          .Carsí, “
          <article-title>Dynamic adaptation of aspect-oriented components”</article-title>
          ,
          <source>Component-Based Software Engineering</source>
          , Medford, USA, vol.
          <volume>1</volume>
          , pp.
          <fpage>49</fpage>
          -
          <lpage>65</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <given-names>J.</given-names>
            <surname>Echeverria</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Pérez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Cetina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Pastor</surname>
          </string-name>
          , “
          <article-title>comprehensibility of variability in model fragments for product configuration”</article-title>
          ,
          <source>Conference on Advanced Information Systems Engineering</source>
          , Ljubljana, Slovenia, vol.
          <volume>1</volume>
          , pp.
          <fpage>476</fpage>
          -
          <lpage>490</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <given-names>M.</given-names>
            <surname>Galster</surname>
          </string-name>
          , P. Avgeriou, “
          <article-title>Variability in software architecture: current practice and challenges”</article-title>
          , 5th ed., vol.
          <volume>36</volume>
          , ACM SIGSOFT Software Engineering Notes, pp.
          <fpage>30</fpage>
          -
          <lpage>32</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Michalik</surname>
          </string-name>
          , P. Avgeriou, “
          <article-title>Variability in software systems- a systematic literature [Lou13] review”</article-title>
          , 3rd ed., vol.
          <volume>40</volume>
          , IEEE Transactions on Software Engineering, pp.
          <fpage>282</fpage>
          -
          <lpage>306</lpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <string-name>
            <given-names>R.</given-names>
            <surname>Hilliard</surname>
          </string-name>
          , “
          <article-title>On representing variation”</article-title>
          ,
          <source>ECSA 2010 workshops: Workshop on Variability in Software Product Line Architectures</source>
          , Copenhagen, Denmark, vol.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          companion, pp.
          <fpage>312</fpage>
          -
          <lpage>315</lpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <given-names>S.</given-names>
            <surname>Loukil</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kallel</surname>
          </string-name>
          , M. Jmaiel, “
          <article-title>Runtime adaptation of component based systems”</article-title>
          ,
          <string-name>
            <surname>Networked</surname>
            <given-names>Systems</given-names>
          </string-name>
          , Marrakech, Morocco, vol.
          <volume>1</volume>
          , pp.
          <fpage>284</fpage>
          -
          <lpage>288</lpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <given-names>K.</given-names>
            <surname>Pohl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Böckle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.V.</given-names>
            <surname>Linden</surname>
          </string-name>
          , “
          <article-title>Software product line engineering - foundations, principles</article-title>
          , and techniques”, Springer,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <string-name>
            <given-names>K.</given-names>
            <surname>Pohl</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . Metzger, “
          <article-title>Variability management in software product line engineering”</article-title>
          , International Conference on Software Engineering, Minneapolis, USA, vol. companion, pp.
          <fpage>186</fpage>
          -
          <lpage>187</lpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <given-names>M.</given-names>
            <surname>Salehie</surname>
          </string-name>
          , L. Tahvildari, “
          <article-title>Self-Adaptive software: landscape and research challenges”</article-title>
          , 2n ed.,
          <source>vol. 4, ACM Transactions on Autonomous and Adaptive Systems</source>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>42</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <string-name>
            <surname>Andrade</surname>
          </string-name>
          , “
          <article-title>Dynamically adaptable software is all about modeling contextual variability and avoiding failures”</article-title>
          , 6th ed., vol.
          <volume>34</volume>
          , IEEE Software, pp.
          <fpage>72</fpage>
          -
          <lpage>77</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          1, pp.
          <fpage>21</fpage>
          -
          <lpage>30</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>