<!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>If when is better than if (and while might help): on the importance of influencing mental models in EUD (a pilot study)</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Giuseppe Gallitto</string-name>
          <email>giuseppe.gallitto@unitn.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Barbara Treccani</string-name>
          <email>barbara.treccani@unitn.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Massimo Zancanaro</string-name>
          <email>massimo.zancanaro@unitn.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Psychology and Cognitive Science, University of Trento</institution>
          ,
          <addr-line>Rovereto (Trento)</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Fondazione Bruno Kessler - FBK,</institution>
          ,
          <addr-line>Povo (Trento)</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we present a preliminary study aimed at improving the users' mental model of an automatic smart home system based on trigger-action rules. We hypothesized that a computational model of how the rules are evaluated and activated, coupled with a linguistic form of the rules that clarifies the difference between events and states, may improve accuracy in identifying buggy rules, which may eventually increase end-users' acceptance of this type of systems. This pilot study was conducted with non-programmers and provided some evidence in support of this hypothesis.</p>
      </abstract>
      <kwd-group>
        <kwd>1 End-User Development (EUD)</kwd>
        <kwd>trigger-action rules</kwd>
        <kwd>mental models</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        End-User Development (EUD) is defined as the possibility for people without programming
experience to create or modify their applications [12]. EUD approaches focus on empowering users
beyond their involvement in the design phases, as advocated by user-centered design, and propose a
vision in which design, learning, and development are an inherent part of technology in use [
        <xref ref-type="bibr" rid="ref6">6, 16</xref>
        ].
Empowering users is particularly important today, as the Internet of Things (IoT) is pushing for
digitalizing everyday objects: in this respect, EUD may prove crucial to facilitate the adoption of this
technology [
        <xref ref-type="bibr" rid="ref1">1, 17</xref>
        ].
      </p>
      <p>
        Programming is difficult for non-experts because it often requires expressing solutions in ways that
are not familiar to them [15]. The concept of rule may provide an intelligible metaphor for programming
digital technologies since it embeds the idea that specific actions need to be taken in specific situations
[
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>In the context of IoT-based smart devices, the programming approach based on contextual rules has
evolved in the so-called trigger-action programming for which a rule takes the specific form of an
action that is performed upon the occurrence of condition. Such a metaphor is supposed to be easily
graspable by users since IoT devices are usually either sensors that detect events in the world or
actuators that operate changes in the world (of both).</p>
      <p>
        The simplicity of this approach is demonstrated by the success of web-based services, like IFTTT
(https://ifttt.com/) [20]. Nevertheless, for an effective programming of IoT devices, it is important to
allow more expressive triggering conditions and more elaborate actions [
        <xref ref-type="bibr" rid="ref1 ref3 ref8">1, 3, 8, 19</xref>
        ]. When the
triggering conditions become more complicated (for example allowing multiple conditions), the rule
metaphor becomes less simple and users are more prone to errors, for example by inaccurately
composing events or mistaking events with states [
        <xref ref-type="bibr" rid="ref2">10, 2</xref>
        ]. Another source of confusion are users’ wrong
or inaccurate mental models of the actual functioning of the system: for example, because users assume
default states when there is none [21].
      </p>
      <p>
        Indeed, mental models are important cognitive constructs that can explain how people interact with
the world and specifically with complex artifacts [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Roughly, a mental model is a simplified
representation of the mechanism and working of an artifact that a user develops in order to make sense
of the artifact itself and to effectively use it [13, 18]. Users’ mental models are not necessarily correct
and complete representations of an artifact, but they may have both predictive and explanatory power
for understanding the interaction between the user and the artifact.
      </p>
      <p>
        Mental models can and should be communicated to the user by proper design [14] but it might also
be effective to communicate them verbally, by providing the user with an adequate description of how
the system works. Regardless of their correctness, different mental models of the same object may lead
to dramatically different user-object interactions: Halasz and Moran’s study [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] is a compelling example
of how two different, albeit both correct, descriptions of the functioning of a reverse-polish calculator
can lead to different performances.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Research hypothesis</title>
      <p>The present study aims at investigating how end-users conceptualize EUD in smart homes and at
providing simple but effective design hints to improve understanding of trigger-action rules.</p>
      <p>Specifically, we would like to encourage accurate mental models by providing a better
representation of how rule-based systems works and by fostering a recognition of different important
concepts by imposing linguistic constraints to the rules.</p>
      <p>
        Regarding the first aspect, there is some of evidence that proper and short instructions may
contribute to develop accurate mental models [11] and that mental models arising from an explicit
description of the working mechanism (hereafter called “computational models”) are more effective
than models arising from a simple description of the procedure/rules of a given system (hereafter called
“descriptive models”) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. We therefore posit Hypothesis 1 as follows:
• Hypothesis 1: a short description of the cyclical mechanism of evaluation and activation of the
rules may improve the understanding of the effects of trigger-action rules.
      </p>
      <p>
        Regarding the second aspect, one key point is the difference between events and states [10]. In some
EUD implementations there is the possibility to associate a condition involving events and/or states
with the trigger [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Yet the distinction between events and states is difficult to understand because they
are often closely related [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] (for example, the state “the door is open” is related to the event “the door
opens”). Several types of error may be attributed to the confusion between these two concepts [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. We
therefore posit Hypothesis 2 as follows:
• Hypothesis 2: expressing the rule through a linguistic form that clarifies the event/state
distinction may improve the understanding of the effects of the rule; we proposed the form WHEN
&lt;event&gt; WHILE &lt;state or set of states&gt; DO &lt;list of actions&gt;
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. The study</title>
      <p>
        The study is based on the one presented by Brackenbury and colleagues [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] with some modifications.
It consists of eight scenarios in a smart-home setting, each one accompanied by two rules that may or
may not realize the purposes stated in the scenario. In some cases the rules are correct (i.e., they realize
the described scenario) while in other cases they are buggy (i.e., conditions described in the scenario
do not activate the rules or their activation have outcomes other than those intended – i.e., different
from those described in the scenario).
      </p>
      <p>Before the study, the users are offered a short tutorial with some examples about the distinction
between events and states (see Figure 1) and they have been told that rules have the form: WHEN
&lt;event&gt; WHILE &lt;state or set of states&gt; DO &lt;list of actions&gt;. However, they can be shortened as IF
&lt;event and/or set of states&gt; THEN &lt;list of actions&gt;.</p>
      <p>Following this, the scenarios were presented in random order. In the rules of the scenarios, the use
of the WHEN/WHILE/DO form is alternated (in a randomized way) with the form IF/THEN.</p>
      <p>Half of the subjects receive a computational description of how the system works that specifies the
cyclical nature of the rule evaluation-and-activation system (i.e., a “computational model”) while the
other half receive a simpler description of the possible rule structures (i.e., a “descriptive model”).</p>
      <p>Therefore, the study has two between-subject conditions (i.e., computational vs. descriptive models;
cf., Hypothesis 1) and two within-subject conditions (i.e., the two possible format/structure of the rules;
cf., Hypothesis 2).</p>
      <p>The study has been piloted with 12 bachelor students from the Department of Psychology and
Cognitive Science of the University of Trento; none of them had knowledge of, or prior experience
with, computer programming.</p>
      <p>Although the results are preliminary, they are promising and clearly show a trend that supports both
hypotheses.</p>
      <p>0.86
0.84
0.82
)10.80
0
:ge0.78
n
(ra0.76
y
c
rua0.74
c
c
an0.72
a
eM0.70
0.68
0.66
0.64
descriptive</p>
      <p>computational
Model</p>
      <p>WHEN/WHILE
IF</p>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion and further works</title>
      <p>The results of this pilot study are initial evidence supporting our hypotheses: Our manipulations
seem to be effective in increasing the participants’ understanding of the rules’ behavior and of their
effects. Consistent with our hypotheses, the use of a WHEN/WHILE format for the rules and (possibly)
the computational description of the system seems to improve users’ mental models of how the
smarthome automatic system works.</p>
      <p>The full study is ongoing. It will include a measure of comprehension of the training and more
detailed analyses of the results.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Acknowledgements</title>
    </sec>
    <sec id="sec-6">
      <title>6. References</title>
      <p>This work has been supported by the Italian Ministry of Education, University and Research (MIUR)
under grant PRIN 2017 "EMPATHY: EMpowering People in deAling with internet of THings
ecosYstems" (Progetti di Rilevante Interesse Nazionale – Bando 2017, Grant 2017MX9T7H).
[10] Huang, J. and Cakmak, M. 2015. Supporting mental model accuracy in trigger-action
programming. Proceedings of the 2015 ACM International Joint Conference on Pervasive and
Ubiquitous Computing - UbiComp ’15 (Osaka, Japan, 2015), 215–225.
[11] Kulesza T., et al., 2012. Tell Me More?: The Effects of Mental Model Soundness on Personalizing
an Intelligent Agent. In Proceedings of the SIGCHI Conference on Human Factors in Computing
Systems (CHI ’12).
[12] Lieberman, H., Paternò, F., Klann, M., Wulf, V., 2006. End-user development: an emerging
paradigm. In: Lieberman, Henry, Paternò, Fabio, Wulf, Volker (Eds.), End User Development.</p>
      <p>Springer, The Netherlands, pp. 1–8.
[13] Norman, D.A. 1983. Some Observations on Mental Models. In Gentner, D. and Stevens, A.L. eds.</p>
      <p>Mental models. Erlbaum.
[14] Norman, D.A. 2013. The design of everyday things. Basic Books.
[15] Pane, J.F. et al. 2001. Studying the language and structure in non-programmers’ solutions to
programming problems. International Journal of Human-Computer Studies. 54, 2 (Feb. 2001),
237–264.
[16] Paternò, F. 2013. End User Development: Survey of an Emerging Field for Empowering People.</p>
      <p>ISRN Software Engineering. 2013, (2013), 1–11.
[17] Paternò, F. and Santoro, C. 2019. End-user development for personalizing applications, things, and
robots. International Journal of Human-Computer Studies. 131:120–130.
[18] Payne, S.J. 2009, Mental Models in Human-Computer Interaction. In Sears, A. and Jacko, J.A.</p>
      <p>eds. Human-computer interaction. Fundamentals. CRC Press.
[19] Ur, B. et al. 2014. Practical trigger-action programming in the smart home. Proceedings of the
32nd annual ACM conference on Human factors in computing systems - CHI ’14 (Toronto,
Ontario, Canada, 2014), 803–812.
[20] Ur, B. et al. 2016. Trigger-Action Programming in the Wild: An Analysis of 200,000 IFTTT
Recipes. Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems - CHI
’16 (Santa Clara, California, USA, 2016), 3227–3231.
[21] Yarosh, S. and Zave, P. 2017. Locked or Not?: Mental Models of IoT Feature Interaction.</p>
      <p>Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems - CHI ’17
(Denver, Colorado, USA, 2017), 2993–2997.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Ardito</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          et al.
          <year>2018</year>
          .
          <article-title>From smart objects to smart experiences: An end-user development approach</article-title>
          .
          <source>International Journal of Human-Computer Studies</source>
          .
          <volume>114</volume>
          ,
          <string-name>
            <surname>(Jun</surname>
          </string-name>
          .
          <year>2018</year>
          ),
          <fpage>51</fpage>
          -
          <lpage>68</lpage>
          . DOI:https://doi.org/10.1016/j.ijhcs.
          <year>2017</year>
          .
          <volume>12</volume>
          .002.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Brackenbury</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          et al.
          <year>2019</year>
          .
          <article-title>How Users Interpret Bugs in Trigger-Action Programming</article-title>
          .
          <source>Proceedings of the 2019 CHI Conference on Human Factors in Computing Systems - CHI '19 (Glasgow</source>
          , Scotland Uk)
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Davidoff</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          , et al.
          <year>2006</year>
          .
          <article-title>Principles of smart home control</article-title>
          .
          <source>In Proceedings of ACM Ubicomp</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Desolda</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          et al.
          <year>2017</year>
          .
          <article-title>Empowering End Users to Customize their Smart Environments: Model, Composition Paradigms, and Domain-Specific Tools</article-title>
          .
          <source>ACM Transactions on Computer-Human Interaction. 24</source>
          ,
          <issue>2</issue>
          (Apr.
          <year>2017</year>
          ),
          <fpage>1</fpage>
          -
          <lpage>52</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Dey</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          et al.
          <year>2006</year>
          .
          <article-title>iCAP: Interactive Prototyping of Context-Aware Applications</article-title>
          .
          <source>In Proceedings of Pervasive Computing</source>
          <year>2006</year>
          (\,
          <year>2006</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Fischer</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          et al.
          <year>2004</year>
          .
          <article-title>Meta-design: a manifesto for end-user development</article-title>
          .
          <source>Communications of the ACM. 47</source>
          ,
          <issue>9</issue>
          :
          <fpage>33</fpage>
          -
          <lpage>37</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Gentner</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Stevens</surname>
          </string-name>
          , A.L. eds.
          <year>1983</year>
          .
          <article-title>Mental models</article-title>
          . Erlbaum.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Ghiani</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          et al.
          <year>2017</year>
          .
          <article-title>Personalization of Context-Dependent Applications Through TriggerAction Rules</article-title>
          .
          <source>ACM Transactions on Computer-Human Interaction. 24</source>
          ,
          <issue>2</issue>
          (Apr.
          <year>2017</year>
          ),
          <fpage>1</fpage>
          -
          <lpage>33</lpage>
          . DOI:https://doi.org/10.1145/3057861.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Halasz</surname>
            ,
            <given-names>F.G.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Moran</surname>
            ,
            <given-names>T.P.</given-names>
          </string-name>
          <year>1983</year>
          .
          <article-title>Mental models and problem solving in using a calculator</article-title>
          .
          <source>Proceedings of the SIGCHI conference on Human Factors in Computing Systems - CHI '83</source>
          (Boston, Massachusetts, United States,
          <year>1983</year>
          ),
          <fpage>212</fpage>
          -
          <lpage>216</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>