<!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>Goal Models for Teaching Data Structures</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Marcela Ruiz</string-name>
          <email>marcela.ruiz@zhaw.ch</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xavier Franch</string-name>
          <email>xavier.franch@upc.edu</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>The 16th International iStar Workshop</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universitat Politècnica de Catalunya</institution>
          ,
          <addr-line>Barcelona</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Zürich University of Applied Sciences</institution>
          ,
          <addr-line>Winterthur</addr-line>
          ,
          <country country="CH">Switzerland</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <abstract>
        <p>Previous research has shown the feasibility of using goal models as a notation to describe data structures. Such results motivated further empirical research to elucidate the extent to which teaching data structures using goal models helps students to better understand (i.e., describe and compare) data structures, and be more eficient when solving their assignments. This paper reports on the experience of introducing goal models for teaching data structures in an undergraduate computer science program during the Autumn semester 2022. We report on the used teaching materials, partial results regarding students' performance, and our vision for building a platform for teaching data structures with goal models.</p>
      </abstract>
      <kwd-group>
        <kwd>iStar 2</kwd>
        <kwd>0</kwd>
        <kwd>data structures</kwd>
        <kwd>teaching experience</kwd>
        <kwd>experimental insights</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction and Motivation</title>
      <p>
        Previous research has shown the feasibility of using goal models based on the i* framework
and its corresponding language iStar 2.0 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] as a notation to describe data structures to be
used in classical imperative programs written in e.g., Java or C# [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. In this line of work new
constructs were introduced in iStar2.0 and adding them to the iStar2.0 metamodel to allow
the description of well-known abstract data types [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] like sequences, functions, and graphs,
and the data structures implementing them [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Such results motivated empirical research to
elucidate the extent to which teaching data structures using goal models help students to better
understand (i.e., describe and compare) data structures, and be more eficient when solving their
assignments [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. This paper reports on the experience of introducing goal models using the
iStar 2.0 language for teaching data structures in an undergraduate computer science program
during the Autumn semester 2022. We built knowledge capsules containing the description
and implementation of data structures, and in contrast to previous empirical evaluations, we
expanded the analysis by evaluating subjects’ performance in terms of efort. We report on the
used teaching materials, partial results from the quasi-experiment, and our vision for building
a platform for teaching data structures with goal models. The rest of the paper is structured
as follows: Section 2 presents the design of the quasi-experiment; Section 3 presents partial
results about subjects’ performance in terms of validity of described data structures and efort,
and we conclude the paper with main insights and outlook about the future work.
2. Teaching Data Structures with Goal Models: Design of a
      </p>
      <p>
        Quasi-Experiment
During the Autumn semester 2022 (from September 2022 to January 2023) we conducted a
quasiexperiment [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] (subjects and objects of study were not randomly selected from the population) to
investigate students’ performance’ efects when describing and comparing data structures (DS)
after being exposed to DS described using iStar 2.0. This quasi-experiment has been designed
according to Wohlin et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], and it is reported according to Jedlitschka and Pfahl [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. This
report diferentiates from a previous experiment we conducted in 2020, in which we did not
measure efort and we clearly did not have questions regarding the main diferences between
DS belonging to two diferent hierarchies [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>The subjects were formed by a group of third-semester computer science students enrolled
in the course of Algorithms and DS (ADS) ofered at the Zürich University of Applied Sciences.
The total number of subjects was 54 belonging to two distinct groups with the same schedules.
Both groups have students with experience in industry. In general, some students are currently
working in industry (part-time students), and none of them had been in contact with the
i* framework or used iStar2.0 for describing DS. The course planning was not updated to
incorporate the experimental set-up, still maintaining the original course objectives. However,
the content presented to one of the two groups was updated adding iStar2.0 to some of the DS
descriptions and examples taught. The group who received materials of DS with iStar 2.0 was
considered as experimental group. The subjects executed the experimental task as part of the
course’s end-of-semester (closed book) oral exam. The main research goal (MRG) and research
question (RQ) of our study are presented below:</p>
      <p>
        MRG: The main research goal, according to the Goal/Question/Metric template [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] is to gain
empirical knowledge on the use of iStar 2.0 to describe data structures for the purpose of
understanding whether a high-level, goal-oriented approach as provided by iStar 2.0 could help to
describe data structures in a more structured form [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], with respect to subjects’ accuracy and
efort in selecting and comparing data structures from the point of view of computer science
students and the researchers (authors of this paper) in the context of an algorithms and data
structures course at the Zürich University of Applied Sciences in Switzerland.
RQ1: When the subjects analyse diferent DS, to what extent do they identify the
intrinsic characteristics of each data structure in the right way? To answer this research
question, we compare completeness, validity, and efort when data structures are described
and characterized by subjects that have been exposed to DS taught using iStar 2.0; to a control
group that has been exposed to DS taught in the traditional way (without iStar 2.0).
      </p>
      <p>
        Variables. We consider one independent variable: DS specification, i.e., the way DS are
described:
• DS specified with iStar 2.0, as defined in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
• DS specified in the traditional way, serving the purpose of a control group.
      </p>
      <p>For this study, we consider the following dependent variables, which are expected to be
influenced to some extent by the independent variable:</p>
      <p>Completeness. The degree to which all the intrinsic characteristics of a certain data structure
have been properly described. To facilitate this calculation, the researchers take into account a
reference solution containing the minimum indispensable description.</p>
      <p>Validity. The degree to which the characteristics of a certain data structure are described
in the right way. Acting as reviewers, the researchers identify properly or wrongly described
characteristics based on a reference model, and then discuss them until they agree on the verdict.</p>
      <p>Eficiency. The degree to which the subjects’ eficiency is afected when describing DS.
Acting as reviewers, the researchers take note of the time each subject took when describing
DS.</p>
      <p>Hypotheses. We define null hypotheses (represented by a 0 in the subscript) that correspond to
the absence of an impact of the independent variables on the dependent variables. Alternative
hypotheses (represented by a 1 in the subscript, e.g.,  1 1 is the alternative hypothesis to  1 0)
suppose the existence of such an impact. Alternative hypotheses correspond to our expectations:
DS specified with iStar 2.0 will have a positive impact on the dependent variables.
 1 0 ∶ DS specified with iStar 2.0 do not influence the completeness of described DS.
 1 1 ∶ DS specified with iStar 2.0 do influence the completeness of described DS.
 2 0 ∶ DS specified with iStar 2.0 do not influence the validity of described DS according to
incorrect characteristics.</p>
      <p>2 1 ∶ DS specified with iStar 2.0 do influence the validity of described DS according to
incorrect characteristics.</p>
      <p>3 0 ∶ DS specified with iStar 2.0 do not influence the subjects’ efort when describing DS
measured in time unit (minutes and seconds).</p>
      <p>3 1 ∶ DS specified with iStar 2.0 do influence the subjects’ efort when describing DS
measured in time unit (minutes and seconds).</p>
      <p>The subjects were provided with four diferent types of input questions to increase the external
validity of the experiment based on the questions’ objective (see Table 1). A summary of the
experimental procedure is presented in Figure 1, and a sample description of the experimental
objects is presented in Table 2.</p>
      <p>Both control and experimental groups were provided with the original materials for teaching
DS in the traditional way. In addition, both groups were exposed to a set of self-assessment
tests that would allow them to monitor their learning progress during the semester. For the
experiment, the experimental group was exposed to DS specified using iStar 2.0 by means of
descriptions and examples called knowledge capsules. The knowledge capsules were built for
three hierarchies of DS: sequences, graphs, and maps. The knowledge capsules are available in
the online appendix (https://shorturl.at/oxT38).</p>
      <sec id="sec-1-1">
        <title>Distribution of experimental objects per group.</title>
      </sec>
      <sec id="sec-1-2">
        <title>Data Structures Specification</title>
      </sec>
      <sec id="sec-1-3">
        <title>Control Group (24</title>
      </sec>
      <sec id="sec-1-4">
        <title>Subjects exposed to data structures subjects) specified in the traditional way</title>
      </sec>
      <sec id="sec-1-5">
        <title>Experimental group</title>
      </sec>
      <sec id="sec-1-6">
        <title>Subjects exposed to data structures (30 subjects) specified with iStar 2.0</title>
      </sec>
      <sec id="sec-1-7">
        <title>Input DS question type (i.e., object)</title>
      </sec>
      <sec id="sec-1-8">
        <title>Group 1</title>
      </sec>
      <sec id="sec-1-9">
        <title>Question A1</title>
      </sec>
      <sec id="sec-1-10">
        <title>Question B1</title>
      </sec>
      <sec id="sec-1-11">
        <title>Question C1</title>
      </sec>
      <sec id="sec-1-12">
        <title>Question D1</title>
      </sec>
      <sec id="sec-1-13">
        <title>Question A3</title>
      </sec>
      <sec id="sec-1-14">
        <title>Question B3</title>
      </sec>
      <sec id="sec-1-15">
        <title>Question C3</title>
      </sec>
      <sec id="sec-1-16">
        <title>Question D3</title>
      </sec>
      <sec id="sec-1-17">
        <title>Group 2</title>
      </sec>
      <sec id="sec-1-18">
        <title>Question A2</title>
      </sec>
      <sec id="sec-1-19">
        <title>Question B2</title>
      </sec>
      <sec id="sec-1-20">
        <title>Question C2</title>
      </sec>
      <sec id="sec-1-21">
        <title>Question D2</title>
      </sec>
      <sec id="sec-1-22">
        <title>Question A4</title>
      </sec>
      <sec id="sec-1-23">
        <title>Question B4</title>
      </sec>
      <sec id="sec-1-24">
        <title>Question C4</title>
      </sec>
      <sec id="sec-1-25">
        <title>Question D4</title>
        <p>TRADITIONAL
SLIDES OF ADS
CONTROL
QUESTIONS
EXPERIMENTAL
QUESTIONS
CONTROL
GROUP
LEARN DATA</p>
        <p>STRUCTURES
TRADITIONAL WAY
ALL SUBJECTS
EXPERIMENTAL</p>
        <p>GROUP
KNOWLEDGE CAPSULE:
INTENTIONAL USE OF DS
WITH ISTAR 2.0
LEARN DATA
STRUCTURES
iSTAR 2.0
SOLVE SELF-ASSESSMENT
TESTS DURING LECTURES
AND PRACTICAL LABS
SOLVE QUESTIONS</p>
        <p>TYPE A, B, C, D</p>
        <p>ANSWERS TO
QUESTIONS A, B, C, D</p>
      </sec>
      <sec id="sec-1-26">
        <title>Question A1: Which are the diferences and similarities between stacks and lists in ADS?</title>
      </sec>
      <sec id="sec-1-27">
        <title>Answer: Diferences: Stacks return the top element in the stack; lists return a specific element from the list. In addition, lists can be traversed. Similarities: both data structures have elements arranged linearly, operations for element addition and removal; and a get operation that is specialised for stacks and lists.</title>
        <p>B. Description of the main requirements (i.e., operations) of a given DS.</p>
      </sec>
      <sec id="sec-1-28">
        <title>Question B1: What is an AVL tree, and which are its main operations?</title>
      </sec>
      <sec id="sec-1-29">
        <title>Answer: Greater/Smaller than function, Update, Insert, Delete, Get… Individual access to elements greater or smaller than a given key.</title>
        <p>C. Description of the main diferences between two DS from two diferent hierarchies</p>
      </sec>
      <sec id="sec-1-30">
        <title>Question C1: We need to create a data structure that we can control its size, provides fast lookup to elements by providing a key. Having the elements ordered is not a requirement. What is the most appropriate data structure and why?</title>
      </sec>
      <sec id="sec-1-31">
        <title>Answer: Hash tables are the most appropriate data structure because they demand a known approximate size. This size can be extended in the future if needed. A hash function needs to be provided to store and find elements. There is not a specific order to store elements.</title>
        <p>D. Control question about DS without associated iStar 2.0 language description.</p>
      </sec>
      <sec id="sec-1-32">
        <title>Question D1: What is the main diference between a singly and doubly linked list?</title>
      </sec>
      <sec id="sec-1-33">
        <title>Answer: Doubly linked lists have a pointer to the previous element.</title>
        <p>3. Students’ Performance: Partial Results Regarding Answers’</p>
        <p>Validity and Subjects’ Efort
After collecting all the results from the exams, the descriptive result for the variable validity is
presented in Figure 2. Regarding efort, the average time taken by the groups on each question
is summarized in Table 3.
4. Analysis of Threats to Validity of the Results
The execution of the quasi-experiment and partial results presented in this paper have some
threats to validity that we want to highlight.</p>
        <p>Conclusion validity: The random heterogeneity of the subjects is a threat to the validity of
the results of this quasi-experiment. We have selected two distinct groups that are enrolled in
the DS courses. However, we did not run any randomization analysis or techniques to select
the subjects and groups. This threat afects the potential generalization of the results.</p>
        <p>Internal validity: In this comparative quasi-experiment the control and experimental groups
received dissimilar materials for learning data structures with and without using iStar 2.0. There
is a threat regarding the interaction of groups and treatment. Despite the groups not being mixed
in with other courses or activities in their study program, there is the possibility that subjects
have exchanged materials and experiences. To mitigate this threat, we created control questions
to evaluate how diferent both groups are regarding experience and knowledge regarding data
structures without iStar 2.0. Since the experiment takes place during the whole academic
semester, it is dificult to control the potential interaction between groups and treatment.
Regarding instrumentation, the evaluators used chronometers to take note of the time each
subject took to answer each question. There is a threat regarding the precision in which the
chronometers were started or stopped. To mitigate this threat, both evaluators took measures
separately and the values were checked for consistency and error analysis.</p>
        <p>Construct validity: It is important to highlight that the experimenter was also involved
in the evaluation of the results from the subjects, which can generate regarding experimenter
expectancies. To mitigate this threat, one evaluator who is not involved in the experiment
evaluated the results from the subjects.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>5. Conclusions and Future Work</title>
      <p>This paper summarizes our ongoing efort on investigating the efects of introducing iStar 2.0
for teaching data structures in undergraduate programs in Computer Science. For this purpose,
we have conducted a quasi-experiment in which we introduce a set of knowledge capsules for
teaching and exemplifying data structures using iStar 2.0. In contrast to previous empirical
evaluations, we extend our variable set and introduce the analysis of subjects’ efort when
describing data structures. The partial results presented in this paper show that subjects exposed
to data structures described with iStar 2.0 outperform subjects in a control group following the
regular teaching material. On the other hand, the average of efort taken by the subjects when
solving an exercise shows that subjects in the control group were faster. This can probably
be explained by the fact that iStar 2.0 notation motivates students to further think about the
applications and requirements of each data structure. These results further motivate research in
the line of exploring the extent students’ eficiency can increase with the constant use of data
structures specified with iStar 2.0.</p>
      <p>
        We plan to further analyze the partial results obtained from this experiment and conduct
subsequent replications to collect more empirical data in the Autumn semester 2023-2024. In
addition, we plan to build a platform to make available the knowledge capsules with examples.
The first prototype of a tool to allow the modelling and simulation of data structures is
currently under construction and we envision the platform will facilitate the massive adoption
of intentional modelling for describing and comparing data structures. We want to explore if
these knowledge capsules can be connected with the module concept [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] that we are using
as model encapsulation mechanism for the DS themselves [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>F.</given-names>
            <surname>Dalpiaz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          ,
          <source>J. Horkof, istar 2.0 language guide</source>
          ,
          <year>2016</year>
          . arXiv:
          <volume>1605</volume>
          .
          <fpage>07767</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          ,
          <article-title>Using i* to describe data structures</article-title>
          , in: Thirteenth International iStar Workshop (iStar
          <year>2020</year>
          ),
          <article-title>CEUR-WS.org</article-title>
          .,
          <year>2020</year>
          , pp.
          <fpage>49</fpage>
          -
          <lpage>54</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          ,
          <year>Extending istar2</year>
          .
          <article-title>0 metamodel to define data structures</article-title>
          ,
          <source>in: Proceedings of the 14th International iStar Workshop</source>
          (iStar
          <year>2021</year>
          ),
          <article-title>CEUR-WS.org</article-title>
          .,
          <year>2021</year>
          , pp.
          <fpage>28</fpage>
          -
          <lpage>34</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          , Estructuras de Datos: Especificación, Diseño e Implementación, Ed. UPC,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Ruiz</surname>
          </string-name>
          ,
          <article-title>Goal-oriented models for teaching and understanding data structures, in: Conceptual Modeling (ER</article-title>
          <year>2021</year>
          ), Springer International Publishing,
          <year>2021</year>
          , pp.
          <fpage>227</fpage>
          -
          <lpage>241</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>C.</given-names>
            <surname>Wohlin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Runeson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hst</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. C.</given-names>
            <surname>Ohlsson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Regnell</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wessln</surname>
          </string-name>
          , Experimentation in Software Engineering, Springer Publishing Company, Incorporated,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Jedlitschka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pfahl</surname>
          </string-name>
          ,
          <article-title>Reporting guidelines for controlled experiments in software engineering</article-title>
          , in: 2005
          <source>International Symposium on Empirical Software Engineering</source>
          ,
          <year>2005</year>
          .,
          <year>2005</year>
          , pp.
          <volume>10</volume>
          pp.
          <article-title>-</article-title>
          .
          <source>doi:10</source>
          .1109/ISESE.
          <year>2005</year>
          .
          <volume>1541818</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R.</given-names>
            <surname>Solingen</surname>
          </string-name>
          , E. Berghout,
          <article-title>The goal/question/metric method: A practical guide for quality improvement of software development (</article-title>
          <year>1999</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          ,
          <article-title>Incorporating modules into the i* framework</article-title>
          , in: B.
          <string-name>
            <surname>Pernici</surname>
          </string-name>
          (Ed.),
          <source>International Conference on Advanced Information Systems Engineering (CAiSE)</source>
          , Springer Berlin Heidelberg,
          <year>2010</year>
          , pp.
          <fpage>439</fpage>
          -
          <lpage>454</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>A.</given-names>
            <surname>Maté</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Trujillo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Franch</surname>
          </string-name>
          ,
          <article-title>Adding semantic modules to improve goal-oriented analysis of data warehouses using i-star</article-title>
          ,
          <source>Journal of Systems and Software</source>
          <volume>88</volume>
          (
          <year>2014</year>
          )
          <fpage>102</fpage>
          -
          <lpage>111</lpage>
          . doi:https://doi.org/10.1016/j.jss.
          <year>2013</year>
          .
          <volume>10</volume>
          .011.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>