<!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>Workshops, Doctoral Symposium, and
Poster &amp; Tools Track, Birmingham, UK</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>xPACE and TASC Modeler: Tool Support for Data-Driven Context Modeling</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Rodrigo Falcão</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rafael King</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Antônio Lázaro Carvalho</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Computer Science Graduate Program, UFBA</institution>
          ,
          <addr-line>Av. Milton Santos s/n, Salvador, 40170-110</addr-line>
          ,
          <country country="BR">Brazil</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Fraunhofer IESE</institution>
          ,
          <addr-line>Fraunhofer-Platz 1, Kaiserslautern, 67663</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>2</volume>
      <fpage>1</fpage>
      <lpage>03</lpage>
      <abstract>
        <p>From a requirements engineering point of view, the elicitation of context-aware functionalities calls for context modeling, an early step aimed at understanding the application contexts and how it may influence user tasks. In practice, however, context modeling activities have been overlooked by practitioners due to their high complexity. To improve this situation, we implemented xPACE and TASC Modeler, which are tools that support the automation of context modeling based on existing contextual data. In this demonstration paper, we present our implementation of a data-driven context modeling approach, which is composed of a contextual data processor (xPACE) and a context model generator (TASC Modeler). We successfully evaluated the results provided by the tools in a software development project.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;requirements elicitation</kwd>
        <kwd>context modeling</kwd>
        <kwd>automation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Computers have become increasingly ubiquitous, and we are witnessing the rise of applications,
sensors, and networks that together deliver smart behaviors to users. Context awareness plays
a key role in this game as a core characteristic of ubiquitous computing [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and is frequently
behind the perceived “intelligence” of modern software solutions[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        Context-aware functionalities are functionalities that consider context to produce a certain
system behavior, typically an adaptation or recommendation. From a requirements engineering
point of view, the elicitation of context-aware functionalities requires context modeling, an
early step involving identification of contextual elements, analysis of accessibility (i.e., which
contextual elements have available sources from which their values can be read), analysis of the
relevance of these contextual elements for user tasks of interests, and analysis of combinations of
contextual elements for these user tasks [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The analysis of relevance and combinations can be
challenging, though: In a scenario with dozens of contextual elements, how to figure out which
contextual elements, particularly in combination with each other, may influence a given user
task? As the number of contextual elements increases, the number of potential combinations
grows exponentially. In practice, practitioners have overlooked these context modeling activities
due to their high complexity, regarding them as time-consuming, non-intuitive, and error-prone
[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Hence, opportunities for discovering unexpected context-aware functionalities are missed.
      </p>
      <p>
        We approached this problem by automating context modeling for the elicitation of
contextaware functionalities. For this purpose, we designed a data-driven context modeling process
(first introduced in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]) that has three parts. First, the user task of interest is analyzed; then,
contextual data that relates to the user task is collected; and finally, at the core of the data-driven
context modeling process, the contextual data is processed to identify relevant combinations of
contextual elements – and finally a context model is generated. Note that the model does tell
how the context influences the task, but describing requirements based on it is a creative step.
      </p>
      <p>To come alive, the proposed automation in the process requires the implementation of
two software components. One is the Contextual Data Processor, which is responsible for
analyzing a contextual dataset. Its output is used by the other component, the Context Model
Generator, which is responsible for creating the concrete context model that is expected to
support requirements engineers in the elicitation of context-aware functionalities. In this paper,
we present our implementations of these software components: xPACE and TASC Modeler 1,
and briefly discuss its application in a software development project at Fraunhofer IESE.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Solution overview</title>
      <p>Once a user task of interest has been chosen and corresponding contextual data has been
collected, a contextual dataset is available. Then the requirements engineer uses TASC Modeler
to generate the desired context model, providing the contextual dataset as input, in addition
to a metadata file that configures the behavior of both the context model generator – how the
contexts will be presented in the model – and the contextual data processor – how the dataset
should be analyzed. The detailed specification of the input files can be found with the source
code1. TASC Modeler forwards the dataset and the metadata to xPACE, which analyzes the data
and returns the findings in a data structure named standardized task-specific contexts , which is
created to decouple the data analysis from the context model generation. Then TASC Modeler
translates the standardized task-specific contexts provided by xPACE into a context model
representation. Figure 1a shows the component diagram of the solution.</p>
      <p>In our case, the context model is represented as a directed acyclic graph with one root node.
This representation supports data-driven context modeling approaches, expressing how the
context influences individual user tasks. Each path from the root node towards a leaf describes
how a context influences a user task of interest. Figure 2 shows an example. Consider the user
task “Prepare a cup of cofee”. Each of the two paths contains a set of instantiated contextual
elements that, together, were found to influence the task (e.g., “When location = WORK and
time = AFTERNOON then user prepares a cup of cofee”, i.e., the context “location =WORK and
time = AFTERNOON” influences the user task “Prepare a cup of cofee”, according to the model).
Note in the example how the model structure diferentiates intrinsic contextual elements (those
that intrinsically characterize the entity “cup of cofee”, which is the object of the task), from
extrinsic ones.</p>
      <sec id="sec-2-1">
        <title>1Source code available: https://github.com/rmfalcao/tasc-modeler-xpace</title>
        <p>3. xPACE – eXtended Pairwise Analysis of Contextual Elements
The eXtended Pairwise Analysis of Contextual Elements (xPACE) was implemented using a
strategy that can be divided into two parts. First, it uses statistical methods to search for
correlations between pairs of contextual elements (CEs) in the contextual dataset. Whenever
correlations are found, the algorithm identifies which CE instances (i.e., concrete values of the
CEs) are correlated. This is necessary because it is not enough to know that two CEs relate to
each other (e.g. “location” and “time”), but it also needs to be know which instances relate to
each other (e.g., “at home” and “evening”). After that, the pair is ordered to express the direction
of the relationship. After analyzing all pairs of CEs, we end up with a list of pairwise relations,
which is a set of directed pairwise relations among CE instances. The second part of the strategy
takes the list of pairwise relations and builds a graph  by treating each pair as an edge of the
graph. When all pairs have been added to , each path in the graph starting from a root node
and ending on a leaf node will represent a relevant combination of CEs that were found by
xPACE to influence the user task. Figure 3 contains an activity diagram that illustrates the data
processor algorithm. The employed statistical methods are named in the corresponding steps.</p>
        <p>The algorithm is implemented using the R language2, and a Web API component implemented
in Java provides handy access to it. The core takes as input the name of the user task and two
ifles: a contextual dataset and a metadata file that describes the dataset; as output, it produces
a standardized task-specific contexts file, which can be used by any context model generator
lca sd
i
t o
ttsaS tehmCombine CEs in
i</p>
        <p>pairs
h iss
no
yes
no
iasvnaeilxatbplea?ir yes Te(Ksrtucskoarlr-Welaaltisio,n</p>
        <p>Cramer's V)
correlation? yes (ISdtaenndtairfdyiziendsrteasnidcuealss,
is there</p>
        <p>Conover's Test)</p>
        <p>Order CEs
(Kruskal-Wal is,</p>
        <p>Theil's U)</p>
        <p>Add relation to
list of pairwise</p>
        <p>relations
does relation
start with root
element?</p>
        <p>Add all paths
yes from root until leaves
into list of contexts</p>
        <p>Create standardized</p>
        <p>task-specific
contexts file from
list of contexts
that complies with its layout. Figure 1b shows the internal structure of xPACE. The principal
ifle in the core is main.R. It contains the algorithm that we implemented to analyze contextual
data to identify potential relevant contexts for the user task in focus. The other R files are
helpers (“load_libraries.R” loads the necessary packages into the memory, “util.R” defines some
functions, and “load_data.R” reads the input files into the memory).</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>4. TASC Modeler</title>
      <p>The Task-specific Context Modeler (TASC Modeler) is responsible for creating the graphical
representation of the context model. The requirements engineer interacts directly with TASC
Modeler, providing the contextual dataset, the metadata, and the task name as input. TASC
Modeler then interfaces with a contextual data processor to provide the input data and receive the
standardized task-specific context files as response. In our case, TASC Modeler uses xPACE, but
it could be any other contextual data processor implementation able to generate the standardized
task-specific context file via a REST API. TASC Modeler reads from a configuration file the
information about which contextual data processor it should use.</p>
      <p>PE.1(n=5)
PE.2(n=5)
PE.3(n=5)
20.0%</p>
      <p>80.0%
100% 80% 60% 40% 20% 0% 20% 40% 60% 80% 100%</p>
      <p>(a) Performance expectation.</p>
      <p>We implemented TASC Modeler as a single-page application written in Typescript using
the React Library3. When the application is loaded, the user is presented a form where they
can provide the dataset file, the metadata file, and the name of the user task in focus. When
the button “Generate” is pressed, the application sends the input data to xPACE through its
Web API. Then xPACE returns its implementation of the standardized task-specific contexts file,
which is used by TASC Modeler to build the context model.</p>
    </sec>
    <sec id="sec-4">
      <title>5. Application and evaluation</title>
      <p>
        We used TASC Modeler and xPACE to support the elicitation of context-aware functionalities
for DorfFunk4, a live communication app with approx. 25,000 active users developed and
maintained by Fraunhofer IESE. We chose a user task (“create a comment”), collected contextual
data (approx. 56,000 tuples from 15 contextual elements), and used the tools. Figure 4 shows a
screenshot of TASC Modeler with an excerpt of the data-driven context model generated using
DorfFunk data. The generated context model was evaluated in a controlled experiment with
professional software engineers (because elicitation of context-aware functionalities is often not
limited to requirements engineers [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]), where it showed its potential to support the identification
of relevant contexts for given user tasks. All participants were asked to elaborate context-aware
functionalities to improve the targeted user task. Participants of the treatment group received
the data-driven context model, whereas participants of the control group received the list of
contextual elements that were available to describe context-aware functionalities. On average,
participants of the treatment group were able to elaborate context-aware functionalities that
combine more contextual elements. They also stated that they found the context model valuable
for supporting the elicitation of context-aware functionalities.
      </p>
      <p>
        While the details of the experiment can be found in our previous paper [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], we here reproduce
some parts that concern the usage of the context model. Our hypothesis was: “The data-driven
context model is perceived by individuals as a useful instrument to support the elicitation
of context-aware functionalities”. In order to test this hypothesis, we employed the UTAUT
      </p>
      <sec id="sec-4-1">
        <title>3https://reactjs.org/ 4https://www.digitale-doerfer.de/unsere-loesungen/dorfunk/</title>
        <p>100.0%
100.0%</p>
        <p>
          AT.1(n=5)
(Unified Theory of Acceptance and Use of Technology [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]). In Figure 5, the positive trend
towards the acceptance of the context model can be noted.
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>6. Conclusion and future work</title>
      <p>Context modeling to support the elicitation of context-aware functionalities has been
disregarded by practitioners due to its high complexity. To improve this scenario, we designed and
implemented a data-driven context modeling process that automates the analysis of
combinations of contextual elements that influence user tasks and the generation of the context model.
The automation of this process is supported by two tools: the Contextual Data Processor and
the Context Model Generator. In this demo paper, we presented our implementation of these
tools: xPACE and TASC Modeler.</p>
      <p>
        As future work, we plan to apply the tools in diferent projects and evaluate their quality
attributes, in particular time behavior, capacity, and scalability, when they have to deal with
much bigger contextual datasets. So far, our evaluation has focused on the results produced
by the tools and not on their usage, so we will now also evaluate their usability, which is a
essential step towards enabling adoption by practitioners. Moreover, since data processing
and context model representation are decoupled, we also want to check to which extent other
representations (such as CGM [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]) may be suitable for this particular purpose.
      </p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <sec id="sec-6-1">
        <title>This work was partially supported by CNPq, Brazil.</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Poslad</surname>
          </string-name>
          ,
          <article-title>Ubiquitous computing: smart devices, environments and interactions</article-title>
          , John Wiley &amp; Sons,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R. O.</given-names>
            <surname>Spínola</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. H.</given-names>
            <surname>Travassos</surname>
          </string-name>
          ,
          <article-title>Towards a framework to characterize ubiquitous software projects</article-title>
          ,
          <source>Information and Software Technology</source>
          <volume>54</volume>
          (
          <year>2012</year>
          )
          <fpage>759</fpage>
          -
          <lpage>785</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>M. K.</given-names>
            <surname>Pinheiro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Souveyet</surname>
          </string-name>
          ,
          <article-title>Supporting context on software applications: a survey on context engineering, Modélisation et utilisation du contexte 2 (</article-title>
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Falcão</surname>
          </string-name>
          ,
          <article-title>Improving the elicitation of delightful context-aware features: A data-based approach</article-title>
          ,
          <source>in: RE17</source>
          ,
          <year>2017</year>
          , pp.
          <fpage>562</fpage>
          -
          <lpage>567</lpage>
          . doi:
          <volume>10</volume>
          .1109/RE.
          <year>2017</year>
          .
          <volume>42</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>Falcão</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Villela</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Vieira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Trapp</surname>
          </string-name>
          , I. L. de Faria,
          <article-title>The practical role of context modeling in the elicitation of context-aware functionalities: a survey</article-title>
          ,
          <source>in: RE21</source>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>35</fpage>
          -
          <lpage>45</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>R.</given-names>
            <surname>Falcão</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Trapp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Vieira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Vianna</surname>
          </string-name>
          <article-title>Dias da Silva, Using a data-driven context model to support the elicitation of context-aware functionalities-a controlled experiment</article-title>
          ,
          <source>in: PROFES 2021</source>
          , Springer,
          <year>2021</year>
          , pp.
          <fpage>119</fpage>
          -
          <lpage>135</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>V.</given-names>
            <surname>Venkatesh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. G.</given-names>
            <surname>Morris</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. B.</given-names>
            <surname>Davis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F. D.</given-names>
            <surname>Davis</surname>
          </string-name>
          ,
          <article-title>User acceptance of information technology: Toward a unified view, MIS quarterly (</article-title>
          <year>2003</year>
          )
          <fpage>425</fpage>
          -
          <lpage>478</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R.</given-names>
            <surname>Ali</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Dalpiaz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Giorgini</surname>
          </string-name>
          ,
          <article-title>A goal-based framework for contextual requirements modeling and analysis</article-title>
          ,
          <source>Requirements Engineering</source>
          <volume>15</volume>
          (
          <year>2010</year>
          )
          <fpage>439</fpage>
          -
          <lpage>458</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>