<!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>Using Product Lines to Manage Variability in Mobile Context-Aware Applications</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Dean Kramer</string-name>
          <email>dean.kramer@tvu.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>School of Computing and Technology Thames Valley University</institution>
          ,
          <addr-line>London, UK, W5 5RF</addr-line>
        </aff>
      </contrib-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Today, the penetration of modern smart phones is vastly increasing with over
172 million smart phones shipped worldwide in 2009 [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. It is quickly becoming
predictable that these smart phones will contain sensors such as Global
Positioning System (GPS) receivers, accelerometers, close proximity sensors and digital
compasses. These components make smart phones a good candidate for
pervasive computing and context-awareness. Context-awareness can be described as
a systems ability to adapt and alter its behavior based on the situation it is
current aware of [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Pervasive computing and context-awareness are becoming a
highly interested area as it allows for applications to become more intelligent and
more usable, unlike traditional software applications which would only respond
to direct user input [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        People and clients using software systems are becoming increasingly
demanding regarding configuration and system features, thus requiring customization.
In software development, re-developing software from scratch for each difference
is purely uneconomical. This can be solved using Software Product Lines (SPL),
creating many similar products from a single set of core assets [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Systems
can be customized using variation points within its design, thus allowing for
variants to shape the final product based on the configuration. This variability
can be modeled using commonly used feature-modeling, which can help express
different required features and variations of features. Because of the
fragmentation of hardware/firmware, firmware/hardware constrained features should be
modeled identifying this dependency which currently is not supported in feature
modeling.
      </p>
      <p>Though a SPL approach offers a viable approach to handling variability,
deriving products from SPLs can be a challenging task. To compliment SPLs,
the use of Model-Driven Development (MDD) and Domain Specific Languages
can help allow for model transformations.</p>
      <p>
        Domain Specific Languages (DSL) allow the developer to raise abstraction
away from the software implementation making development easier. DSLs can
be used within SPL engineering [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], and used to help provide model
transformations. These transformations include horizontal (model to model), and more
importantly in my case, vertical (model to code).
      </p>
      <p>In this research, I propose to help integrate the modeling of context, features
and their dependencies on hardware and firmware platforms. To compliment this,
a DSL will be defined as method of expressing the model, which can then provide
model-code transformations providing large amounts of application structure
and features based on the domain feature implementations and variations.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        Developing for mobile platforms vastly differs to desktop and larger systems.
Firstly, there are many different constraints that need to be considered. These
constraints include lack of screen size, processing power, memory, and power
consumption [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Though this idea may look out-dated, the expediential growth
in software complexities and sizes causes this to remain true. Furthermore single
application development is becoming increasing rare, with the trend more on a
set of similar applications. Because of this, and increasing software complexities,
the management of this re-usable software needs to be made simpler. The use of
product lines is already evident in mobile gaming [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
2.1
      </p>
      <sec id="sec-2-1">
        <title>Context-Awareness</title>
        <p>
          Much work in the past for aiding the production of context-ware applications
has been through the developments of frameworks. The Java Context-Aware
Framework [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] is a lightweight Java-based framework for creating context-aware
applications. The feasibility of using this framework is help backed by its use in
medical scenarios [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. An issue with using this approach is the dependence on
an external context-service, which for smart phone applications is not a desired
method and can also bring security issues when transmitting sensitive data.
Context-reasoning and challenges of mobility have been addressed with the use
of a sentient object model [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
        </p>
        <p>
          MDA approaches have been proposed for context-aware software
development. CAMEL (Context Awareness Modeling Language) [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ], a DSL design for
the initial stage of software development provides a method for modeling context
dependent behaviors. Authors pointed out that currently the language does not
handle model transformations to executable code.
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Software Product Lines</title>
        <p>
          UbiFEX [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] has been presented as a feature model notation to context-aware
SPLs. This notation allows for context rule specific product configuration, but
does not complete the need for modeling the complete system combining features
and contexts.
        </p>
        <p>
          Modeling context and its adaptation requires modelling within a product
line, to help indicate how it relates to each feature. Parra et al. [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] creates
a composition of assets binding context adaptation to features. This was later
used with the FraSCAti platform1, an open source implementation of the
Service Component Architecture standard. This approach is similar to my plans,
but there is a lack of concern for issues relating to how hardware/firmware may
constrict different contexts being monitored and how features within the
application may/may not be compatible with differing requirements. Furthermore,
though the use of dynamic product line derivation is a useful approach for larger
systems, because of different issues relating to mobile development a less
dynamic derivation may prove more suitable. Firstly if a high amount of variation
is in the application, this may ’bloat’ the application unnecessarily, taking up
already limited space on the device.
        </p>
        <p>
          Despite the research being carried out into making product lines easier to
implement, the use of SPLs for asset re-use is still having low adoption rates.
This is because it affects the whole software life cycle, compared to other
methods including Model Driven Development and Service Oriented Architecture [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
Reasons for the lack of adoption include hardware/software integration issues,
unpredictability caused by the recession and lack of SPL experts and low cost
training.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Proposed Research</title>
      <p>The primary aim of this research is to experiement and explore with a DSL
to help support product derivation in context-aware mobile software product
lines. This product-derivation will need to handle platform version differences,
hardware differences and context differences. The proposed research will be a
combination of action research and case-study based research. Within the
research, two case studies will be developed, creating differing product-lines. The
first of these case studies will be on a sports application, with the second more
focusing on a mobile enterprise application.
3.1</p>
      <sec id="sec-3-1">
        <title>Research Objectives</title>
        <p>1. Investigate how you express the context aware environment and it’s
impact on application development. Modeling and defining the contexts for the
product line and how it relates to the main application logic will be required.
Metamodels for context, platform and application will be developed which
will form the basis for the DSL.
2. Research into how to manage variability with the different contexts that will
be supported within the application. Also, variability will need to be mapped
and modeled to deal with different smart-phone hardware components and
firmware versions.
3. Acquirement and analysis of DSL requirements, primarly driven through the
development of two software product lines.
1 http://frascati.ow2.org
4. Define and develop a DSL to help enable model-code transformations using
Domain Specific Modelling (DSM) and implement over several iterations to
suit case studies.
5. Use or develop an analysis framework for validating the proposed DSL. This
validation will help ensure that the language meets all the requirements of
a language.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Product Line Approach</title>
        <p>The approach I propose for the product line is shown in Figure 1. This approach
is made up of a product line (PL) meta model, and the DSL to specialise and
deviate products into specialised applications (App). To help gain requirements
of the DSL, meta-models will be developed including:
– Context Metamodel, a model indicating the different conditions that will
constitute a context including user and environmental conditions.
– Platform Metamodel, a model showing the similarities and variability within
the platforms. This will include hardware and software differences.
– Application Metamodel, a model describing the application. This will
include different components and features included, with emphasis on core
and additional/alternative parts of the application.</p>
        <p>For code generation, the PL will have software assets produced by MDD
using a mix of Aspect-Oriented Programming (AOP) and Component-Oriented
Programming (COP). Using aspects can easily seperate application concerns, in
this case different platforms and/or contexts. These assets are then specialised
using the DSL to produce partial application specific code, to which further
implementation can be added.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bardram</surname>
            ,
            <given-names>J.E.</given-names>
          </string-name>
          :
          <article-title>The java context awareness framework (jcaf) - a service infrastructure and programming framework for context-aware applications</article-title>
          .
          <source>In: Pervasive Computing</source>
          .
          <year>2005</year>
          : Munchen. pp.
          <fpage>98</fpage>
          -
          <lpage>115</lpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Bardram</surname>
            ,
            <given-names>J.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nørskov</surname>
          </string-name>
          , N.:
          <article-title>A context-aware patient safety system for the operating room</article-title>
          .
          <source>In: UbiComp '08: Proceedings of the 10th international conference on Ubiquitous computing</source>
          . pp.
          <fpage>272</fpage>
          -
          <lpage>281</lpage>
          . ACM, New York, NY, USA (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Biegel</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cahill</surname>
          </string-name>
          , V.:
          <article-title>A framework for developing mobile, context-aware applications</article-title>
          .
          <source>In: PERCOM '04: Proceedings of the Second IEEE International Conference on Pervasive Computing and Communications (PerCom'04)</source>
          . p.
          <fpage>361</fpage>
          . IEEE Computer Society, Washington, DC, USA (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Catal</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Barriers to the adoption of software product line engineering</article-title>
          .
          <source>SIGSOFT Softw. Eng. Notes</source>
          <volume>34</volume>
          (
          <issue>6</issue>
          ),
          <fpage>1</fpage>
          -
          <lpage>4</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>De La Vergne</surname>
            ,
            <given-names>H.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Milanesi</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zimmermann</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cozza</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nguyen</surname>
            ,
            <given-names>T.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lu</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Competitive landscape: Mobile devices, worldwide, 4q09 and 2009</article-title>
          . Tech. rep.,
          <string-name>
            <surname>Gartner</surname>
          </string-name>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Du</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Context-aware application programming for mobile devices</article-title>
          .
          <source>In: C3S2E '08: Proceedings of the 2008 C3S2E conference</source>
          . pp.
          <fpage>215</fpage>
          -
          <lpage>227</lpage>
          . ACM, New York, NY, USA (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Fernandes</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Werner</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Murta</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Feature modeling for context-aware software product lines</article-title>
          .
          <source>In: SEKE</source>
          . pp.
          <fpage>758</fpage>
          -
          <lpage>768</lpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Gaedke</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Beigl</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gellersen</surname>
            ,
            <given-names>H.W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Segor</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Web content delivery to heterogeneous mobile platforms</article-title>
          .
          <source>In: ER '98: Proceedings of the Workshops on Data Warehousing and Data Mining</source>
          . pp.
          <fpage>205</fpage>
          -
          <lpage>217</lpage>
          . Springer-Verlag, London, UK (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Häkkilä</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schmidt</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mäntyjärvi</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sahami</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Åkerman</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dey</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          :
          <article-title>Context-aware mobile media and social networks</article-title>
          .
          <source>In: MobileHCI '09: Proceedings of the 11th International Conference on Human-Computer Interaction with Mobile Devices and Services</source>
          . pp.
          <fpage>1</fpage>
          -
          <lpage>3</lpage>
          . ACM, New York, NY, USA (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Nascimento</surname>
            ,
            <given-names>L.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Almeida</surname>
            ,
            <given-names>E.S.d.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Meira</surname>
            ,
            <given-names>S.R.</given-names>
          </string-name>
          <string-name>
            <surname>d</surname>
          </string-name>
          .L.:
          <article-title>A case study in software product lines - the case of the mobile game domain</article-title>
          .
          <source>In: SEAA '08: Proceedings of the 2008 34th Euromicro Conference Software Engineering and Advanced Applications</source>
          . pp.
          <fpage>43</fpage>
          -
          <lpage>50</lpage>
          . IEEE Computer Society, Washington, DC, USA (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Parra</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Blanc</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duchien</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Context awareness for dynamic service-oriented product lines</article-title>
          .
          <source>In: SPLC '09: Proceedings of the 13th International Software Product Line Conference</source>
          . pp.
          <fpage>131</fpage>
          -
          <lpage>140</lpage>
          . Carnegie Mellon University, Pittsburgh, PA, USA (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Pohl</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Böckle</surname>
          </string-name>
          , G.,
          <string-name>
            <surname>van der Linden</surname>
          </string-name>
          , F.: Software Product Line Engineering: Foundations, Principles, and Techniques. Springer (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Sindico</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grassi</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Model driven development of context aware software systems</article-title>
          .
          <source>In: COP '09: International Workshop on Context-Oriented Programming</source>
          . pp.
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          . ACM, New York, NY, USA (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Voelter</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>Using domain specific languages for product line engineering</article-title>
          .
          <source>In: SPLC '09: Proceedings of the 13th International Software Product Line Conference</source>
          . pp.
          <fpage>329</fpage>
          -
          <lpage>329</lpage>
          . Carnegie Mellon University, Pittsburgh, PA, USA (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>