<!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>Intl. Workshop on Agile Methods for Information Systems Engineering, June</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Building a Software Architecture out of User Stories and BDD Scenarios: Research Agenda</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Samedi Heng</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Monique Snoeck</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Konstantinos Tsilionis</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>HEC Liège, Université de Liège</institution>
          ,
          <addr-line>Liège</addr-line>
          ,
          <country country="BE">Belgium</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>KU Leuven</institution>
          ,
          <addr-line>Leuven</addr-line>
          ,
          <country country="BE">Belgium</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>06</volume>
      <issue>2022</issue>
      <fpage>0000</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>User stories (US) are classically used as requirements engineering artifacts in agile methods like Scrum, these are sometimes associated with Behavior Driven Design (BDD) scenarios. Previous research allowed to unify US and BDD scenarios templates through the definition of a set of concepts from diferent nature traditionally used in instances of both of these concepts. When associated to these concepts, information is given on the nature of the US and BDD instances. So called high-level development languages provide strong abstractions on the basis of which software can be developed. These abstractions mimic human behavior at software runtime making the development process easier and understandable by human beings. Research has shown that functions of diferent nature defined in US and BDD instances do represent an interesting input to define a software architecture within Agent- and Object-Oriented (AO and OO) languages. While the mapping to AO is quite intuitive, the mapping to OO concepts is less one-on-one and requires a more in-depth analysis of the sentences that make part of the US and BDD definition. This can be done manually, but support by means of intermediate transformations or NLP is possible as well. This article summarizes the state of the art in the field and points to future work.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;User Stories</kwd>
        <kwd>Behavior Driven Development</kwd>
        <kwd>Acceptance Test</kwd>
        <kwd>Software Architecture</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction and Background</title>
      <p>1..n</p>
      <p>Role
name : String
dimension : String = WHO</p>
      <p>1..n
wants/wants to/needs/can/would like
wants/wants to/needs/can/would like name : String Task
1..n 0..n dimension : Enum{WHAT,WHY} 0..n
so that 0..n
0..nGoal
0..n
0..n so that 0..n 0..n
so that</p>
      <p>Capability
name : String
0..n dimension : String = WHAT
so that
0..n
0..n</p>
      <sec id="sec-1-1">
        <title>User-driven scenario</title>
        <p>Outcome
User_Behavior</p>
        <p>Context</p>
        <p>Both US and BDD scenarios contain relevant data and domain vocabulary useful for designing
the software system. Indeed, Agent- and Object-Oriented (AO and OO) software mimic real life
organizational behavior at application runtime to ease the implementation. Indeed, the intrinsic
attributes and behavioral characteristics of AO and OO can partly be found in the expression of
US/BDD. Also, meta-data furnished at modeling time on the type of element depicted in the US
and the BDD scenarios furnish relevant information to map the requirement-level element with
a design-level one.</p>
        <p>
          Wautelet et al. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] have investigated the US templates that are the most used in practice.
Out of them they selected the keywords that were the most relevant and associated them to a
particular semantic. Ultimately, a conceptual model made out of the most used concepts found
in US templates has been built supporting the creation and furnishing useful meta-data on the
nature of the depicted element when followed at modeling-time. This model is represented in
Fig. 1; the definitions of each concept can be found in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. A similar investigation has been
performed in Tsilionis et al. [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ] out of the BDD templates and lead to the unified conceptual
model presented in Fig. 2.
        </p>
        <p>wants/wants to/needs/can/would like</p>
        <p>THEN_Dimension
name : String</p>
        <p>1..n
induces</p>
        <p>0..n
WHEN_Dimension
name : String</p>
        <p>1..n
leads to</p>
        <p>0..n
GIVEN_Dimension
name : String</p>
        <p>Hard_Goal
dimension : Enum{WHAT,WHY}
name : String</p>
        <p>Soft_Goal
so that dimension : Enum{WHAT,WHY}
0..n 0..n name : String</p>
      </sec>
      <sec id="sec-1-2">
        <title>System-driven scenario</title>
        <p>PostCondition
System_Behavior</p>
        <p>State
PreCondition
2. Building a Software Architecture From User Stories and BDD</p>
        <p>
          Scenarios
This section overviews how to transform the concepts presented in both US and BDD scenarios
to an AO architecture (Sect. 2.1) as well as OO software (Sect. 2.2). For the agent architecture, we
provided the tranformation for both Belief-Desire-Intention (BDI [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]) agent (using JaCaMo [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ])
and none-BDI agent (using JADE [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]). We have chosen these high-level programming paradigms
because the OO paradigm is the most used paradigm by many programming language such
as Java, Python, etc., while, the AO paradigm is a new paradigm and it provides higher level
abstraction compared to the OO paradigm. It allows to design software be more autonomous
and social [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. We focus on transforming the BDD System-Behavior scenarios to both AO and
OO architecture. Sect.2.3 illustrates the transformation examples.
2.1. Agent-Oriented Architecture Transformation
2.1.1. Transforming to a None-BDI Agent Architecture (JADE framework)
        </p>
        <p>A JADE agent is composed of Behaviour and MessageQueue properties. The MessageQueue
is used to store the communication message from others agents. The Behaviour is a task
that an agent can carry out so it implements its possible actions. There are two types of
Behaviour: SimpleBehaviour and CompositeBehaviour. The SimpleBehaviour is atomic, while
the CompositeBehaviour can be composed of other behaviours (see Fig. 3).</p>
        <p>
          With respect to US concepts, previous work [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ] showed that the concept of Role in the
WHO-dimension of a US can be mapped to an Agent in JADE. The concept of Task presented
in both WHAT- and WHY-dimensions of the US are mapped into CompositeBehaviours.
Finally, the concepts of Capability presented in the WHAT-dimension of US can be mapped to
SimpleBehaviours.
        </p>
        <p>With respect to the BDD concepts, the GIVEN- and THEN-dimensions do refer to states.
They indeed describe state of a system or an agent rather then an action. Therefore, these
concepts can be mapped to the Property characteristic of an agent which is a JAVA object. Since
it is a state, it could represent the received message from another agent as well; hence, they
could be transformed to an ACLMessage. In turn, the WHEN-dimension represents an action
potentially performed by an agent. This concept can then be transformed to a Behaviour in
JADE. The latter BDD dimension operationalizes the WHAT-dimension of a US, therefore, we
argue that it should be implemented within the Behaviour of the US it operationalizes. Fig. 3
shows the mapping of US and BDD scenarios concepts to the architectural ones of JADE.
2.1.2. Transforming to a BDI Agent Architecture (JaCaMo framework)</p>
        <p>
          A BDI agent in JaCaMo is composed of the concepts of Belief, Goal, Plan and Event. A Belief
describes a piece of knowledge that an agent has about itself and its environment. Events
describe stimuli, emitted by agents or automatically generated in response to which other or
the same agents must take action. A Goal “represents future states of the environment that are
desirable to the agent” [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. A Plan describes a sequence of actions that an agent can take when
an event occurs. In JaCaMo, a Plan is composed of an Action (see Fig. 4).
        </p>
        <p>
          In the work of Wautelet et al. [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ], the authors demonstrated that the concept of Role in the
WHO-dimension of the US can be transformed into a BDI Agent. The concept of Task presented
in both WHAT- and WHY-dimensions of a US are transformed into a Plan. The concept of
Capability presented in the WHAT-dimension of a US can be transformed into an Event but
with the JaCaMo framework the Capability can be mapped to a Plan which should, however, be
composed of one Action only.
        </p>
        <p>
          Hard- and soft-goals found in US can be mapped to the Goal part of the Agent. The BDD
GIVEN- and THEN-dimensions of the BDD scenario can be mapped to the Beliefs and Events of
an Agent. Lastly, the BDD WHEN-dimension can be mapped to the Action belonging to the Plan
of mapped from the US it operationalizes. Fig. 4 shows the mapping of US and BDD scenarios
to the Agent architecture in JaCaMo.
2.2. Object-Oriented Architecture Transformation
Mapping the elements of a US directly to elements of an OO design of an application is not
straightforward: the US is formulated at a too high level to directly retrieve the necessary
elements from it. The BDD scenarios corresponding to a US provide a more detailed and
concrete specification. But even the mapping of BDDs to elements of an OO design is not
straigthforward. More explanation could be found in [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. Tab. 2 exemplifies the object types,
attributes, and object type states that can be derived from each element of a BDD scenario.
Object types and attributes can be used to defined the class diagram defining the persistent
objects, while the states will be used for defining state charts per object type. Input and output
services will be used to defined getters and setters for object types, and for defining user
interfaces required for the interaction with the user.
        </p>
        <p>
          Given the required expertise for deriving the elements needed for the application design from
US, many researchers have already investigated possible forms of automated support for the
business analys. An example is the work of [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], where US are translated to an intermediate
formal language, that is subsequently used to generate UML diagrams from, making use of NLP
techniques. This is by far not the only work that uses NLP to assist the analysis of US. Raharjana
et al. [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] identified through an SLR a broad range of purposes of using NLP to extract some
aspects of US, but conclude that it remains a significant challenge to understand a sentence’s
context. While the dificulties associated with NLP persist, such support can nevertheless help
e.g. to improve the completeness and conciness of extracted domain models by providing
traceability, as in DoMoBOT [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
2.3. Illustration examples
Our illustration is based on a US and BDD scenarios taken from an opensource project (Simple
online shop1). The example US is related to buying product online. The transformations to AO
and OO architecture are presented in Tabs. 1 and 2 respectively.
3:
4:
4: ItemInCart
exists
        </p>
        <sec id="sec-1-2-1">
          <title>1: Cart Exists 2: ItemInCart Exists 3:</title>
        </sec>
        <sec id="sec-1-2-2">
          <title>5: Cart Exists, ItemInCart Exists</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>3. Conclusion</title>
      <p>
        Our research aims at using US and BDD scenarios as a basis for building AO and OO software
architecture. This paper reports the primary results of the research. We argue that some
concepts presented in both US and BDD scenarios can be mapped intuitively to agent concepts.
However, the mapping to object oriented models requires more in-depth analysis. This can be
improved with the help of NLP which is our plan for future work as the works of [
        <xref ref-type="bibr" rid="ref12 ref13 ref14 ref15">12, 13, 14, 15</xref>
        ].
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wautelet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Heng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kolp</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Mirbel</surname>
          </string-name>
          ,
          <article-title>Unifying and extending user story models</article-title>
          ,
          <source>in: CAiSE2014</source>
          , Springer,
          <year>2014</year>
          , pp.
          <fpage>211</fpage>
          -
          <lpage>225</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>K.</given-names>
            <surname>Tsilionis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wautelet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Faut</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Heng</surname>
          </string-name>
          ,
          <article-title>Unifying behavior driven development templates</article-title>
          ,
          <source>in: RE2021</source>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>454</fpage>
          -
          <lpage>455</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wautelet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kolp</surname>
          </string-name>
          ,
          <article-title>Business and model-driven development of bdi multi-agent systems</article-title>
          ,
          <source>Neurocomputing</source>
          <volume>182</volume>
          (
          <year>2016</year>
          )
          <fpage>304</fpage>
          -
          <lpage>321</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>O.</given-names>
            <surname>Boissier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. H.</given-names>
            <surname>Bordini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Hübner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ricci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Santi</surname>
          </string-name>
          <article-title>, Multi-agent oriented programming with jacamo</article-title>
          ,
          <source>Science of Computer Programming</source>
          <volume>78</volume>
          (
          <year>2013</year>
          )
          <fpage>747</fpage>
          -
          <lpage>761</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>F. L.</given-names>
            <surname>Bellifemine</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Caire</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Greenwood</surname>
          </string-name>
          ,
          <article-title>Developing multi-agent systems with JADE</article-title>
          , John Wiley &amp; Sons,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>E.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <article-title>Agent-oriented modelling: software versus the world</article-title>
          , in: International Workshop on Agent-Oriented Software Engineering, Springer,
          <year>2001</year>
          , pp.
          <fpage>206</fpage>
          -
          <lpage>225</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wautelet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Heng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kiv</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Kolp, User-story driven development of multi-agent systems: A process fragment for agile methods</article-title>
          ,
          <source>COMLAN</source>
          <volume>50</volume>
          (
          <year>2017</year>
          )
          <fpage>159</fpage>
          -
          <lpage>176</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wautelet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Heng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kolp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Scharf</surname>
          </string-name>
          ,
          <article-title>Towards an agent-driven software architecture aligned with user stories</article-title>
          .,
          <source>in: ICAART (2)</source>
          ,
          <year>2016</year>
          , pp.
          <fpage>337</fpage>
          -
          <lpage>345</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>M.</given-names>
            <surname>Snoeck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wautelet</surname>
          </string-name>
          ,
          <string-name>
            <surname>Agile</surname>
            <given-names>MERODE</given-names>
          </string-name>
          :
          <article-title>A Model-Driven Software Engineering Method for User-Centric and Value-Based Development, Software and Systems Modeling (accepted for publication)</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>T.</given-names>
            <surname>Yue</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. C.</given-names>
            <surname>Briand</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Labiche</surname>
          </string-name>
          ,
          <string-name>
            <surname>Atoucan:</surname>
          </string-name>
          <article-title>An automated framework to derive uml analysis models from use case models</article-title>
          ,
          <source>ACM Trans. Softw. Eng. Methodol</source>
          .
          <volume>24</volume>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>I. K.</given-names>
            <surname>Raharjana</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Siahaan</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Fatichah, User stories and natural language processing: A systematic literature review</article-title>
          ,
          <source>IEEE Access 9</source>
          (
          <year>2021</year>
          )
          <fpage>53811</fpage>
          -
          <lpage>53826</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>R.</given-names>
            <surname>Saini</surname>
          </string-name>
          , G. Mussbacher,
          <string-name>
            <given-names>J. L.</given-names>
            <surname>Guo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kienzle</surname>
          </string-name>
          ,
          <article-title>Domobot: A modelling bot for automated and traceable domain modelling</article-title>
          ,
          <source>in: RE2021</source>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>428</fpage>
          -
          <lpage>429</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>F.</given-names>
            <surname>Gilson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Galster</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Georis</surname>
          </string-name>
          ,
          <article-title>Generating use case scenarios from user stories</article-title>
          ,
          <source>in: Proceedings of the International Conference on Software and System Processes</source>
          ,
          <year>2020</year>
          , pp.
          <fpage>31</fpage>
          -
          <lpage>40</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>T.</given-names>
            <surname>Kochbati</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Gérard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Mraidha</surname>
          </string-name>
          ,
          <article-title>From user stories to models: A machine learning empowered automation</article-title>
          .,
          <source>in: MODELSWARD</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>28</fpage>
          -
          <lpage>40</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>M.</given-names>
            <surname>Soeken</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Wille</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Drechsler</surname>
          </string-name>
          ,
          <article-title>Assisted behavior driven development using natural language processing</article-title>
          ,
          <source>in: International Conference on Modelling Techniques and Tools for Computer Performance Evaluation</source>
          , Springer,
          <year>2012</year>
          , pp.
          <fpage>269</fpage>
          -
          <lpage>287</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>