<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Using ALF within the CoSTest process for Validation of UML-based Conceptual Schema</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Maria Fernanda Granda</string-name>
          <email>fernanda.granda@ucuenca.edu.ec</email>
          <email>fgranda@pros.upv.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nelly Condori-Fernández</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tanja E. J. Vos</string-name>
          <email>tvos@pros.upv.es</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Universitat Politècnica de València, PROS Research Centre</institution>
          ,
          <addr-line>Valencia</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of A Coruña</institution>
          ,
          <addr-line>Coruña</addr-line>
          ,
          <country country="ES">Spain</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Cuenca, Computer Science Department</institution>
          ,
          <addr-line>Cuenca</addr-line>
          ,
          <country country="EC">Ecuador</country>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Vrije Universiteit van Amsterdam</institution>
          ,
          <addr-line>Amsterdam</addr-line>
          ,
          <country country="NL">The Netherlands</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The Unified Modelling Language (UML) is widely used for modelling software systems and its integration with executable languages, such as the Action Language for Foundational UML (ALF), provides a bridge between the graphical specification techniques used by mainstream software engineers and the precise analysis and validation techniques essential for the model-driven development of information systems. As far as we know, the idea of transforming Conceptual Schemas (CS) based on UML Class Diagrams into ALF to execute systematic ALF-based test cases against these CSs and to report defects by checking logs has not been explored to date. In this paper, we use ALF to create a testing environment to validate requirements and verify some system properties at the CS level. We also report on some of the implementation details and design decisions of our proof-of-concept tool, as well as its limitations and possible use scenarios.</p>
      </abstract>
      <kwd-group>
        <kwd>UML to ALF</kwd>
        <kwd>conceptual schema validation</kwd>
        <kwd>model validation</kwd>
        <kwd>UML class diagram</kwd>
        <kwd>CoSTest tool</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In previous work we proposed an approach for testing-based validation of Conceptual
Schemas (CS) in a Model-driven environment [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], in which a group of engineers (e.g.
requirements engineers) specifies requirements models from which the test scenarios
are automatically generated with abstract test cases (i.e. a concrete story of a
usersystem interaction and the expected result). These test cases are then used to validate
the requirements in an early phase of software analysis and design (e.g. CS). However,
in order to execute the test cases systematically and automatically against conceptual
schemas, they must be translated into an executable language. In this context, the
Unified Modelling Language (UML) has been widely used to draw models for
analysing, designing and documenting software that can then be written/transformed
into any programming language. One of the crucial issues when creating precise,
standard UML models was the imprecision of semantics specified in the UML standard.
This issue was finally addressed with the adoption by the Object Management Group
(OMG) in 2008 of the Foundational UML (fUML) specification (an executable subset
of UML) and the Action Language for fUML (ALF) adopted in 2010. These standards
allow the UML model to be represented both graphically and textually (while
preserving its semantic level) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], e.g. with the Eclipse-based open-source UML
modelling tool Papyrus1. Papyrus provides the ability to execute fUML models, thanks
to its model execution platform Moka2, which makes it possible to interact with an
execution and analyse the manipulated values. However, this tool is limited by not
having access to ALF source-level debugging, which would make it a lot easier to test
complex behaviour [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] as well as execute several test cases and analyse the logs in a
systematic testing process. Since the open-source ALF Reference Implementation3 is
distributed without a graphical tool, it allows executable models to be written
completely textually in ALF. This opens up the possibility of using ALF to
automatically and systematically execute a set of test cases against CS and analyse their
execution trace in order to detect defects at the conceptual schema level. For this
solution to be viable a transformation from UML to ALF is also required.
      </p>
      <p>The paper describes the automatic transformation of a UML class diagram (CD) into
ALF language in the context of the CoSTest tool 4 for the systematic testing of
conceptual schemas. The resulting translated model is semantically equivalent to the
original, meaning that the contract semantics (i.e. pre and post conditions), derived
features, operation bodies, and association class are implemented as elements of the
ALF units. The paper’s contributions are: (1) Translating UML into ALF; (2) Using
ALF as a language for writing/executing test cases. We also evaluated these
transformations by using our freely available CoSTest validation tool with eight CS.</p>
      <p>The paper is structured as follows: Section 2 introduces a simple but representative
example of the UML CD-based CS used. Section 3 summarizes the background.
Section 4 reviews related work. Section 5 describes the mapping rules between UML
and ALF notation by describing its application to the example. Section 6 gives an
overview of the last phase of CoSTest to generate ALF based-test cases, as well as
execution details of our validation approach. Section 7 demonstrates the application of
the transformations to ALF in eight CS. Section 8 discusses the design decisions,
limitations and alternative applications of the approach. The conclusions and future
work are outlined in Section 9.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Motivating Example</title>
      <p>To show how ALF supports the validation in the CoSTest tool, we will use a simple
model of an order from the domain of e-commerce. The first thing to decide is the
1 https://eclipse.org/papyrus/
2 http://wiki.eclipse.org/Papyrus/UserGuide/ModelExecution
3 http://modeldriven.github.io/Alf-Reference-Implementation/
4 https://staq.dsic.upv.es/webstaq/costest.html
information that needs to be kept on an order and how this is related to information on
the customer placing the order. This can be clearly represented by using a UML class
diagram, such as the one shown in Figure 1 with part of an Order CS using an UML
class diagram. This diagram was entered graphically using the Papyrus tool and it
models an order as recording the date it was received, prepayment and dispatch status,
and has a set of order lines, each of which specifies the quantity of a certain product
included in the order. It also shows that an order is placed by a single customer (i.e.
corporate or personal customer), who may make many orders over time. Each of these
orders has several order lines, each of which refers to a single product, with net price
and quantity available. Each customer has a name and address. A personal customer
also has a credit card number and a corporate customer has a contact name, credit rating
and credit limit. The products are identified by a name in a language, a description and
a url.</p>
    </sec>
    <sec id="sec-3">
      <title>Background</title>
      <sec id="sec-3-1">
        <title>Executable Conceptual Schema using ALF</title>
        <p>
          Since the executable CS of a system should describe its structure and behaviour. A class
diagram is the UML’s main building block and shows structural elements of the system
at an abstract level (e.g. class, association class), their properties (owned attribute),
relationships (e.g. association and generalization) and operations [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. On the other
hand, the behavioural part, is specified by characterizing how event execution can come
about (unfold). In UML, this is done by collaboration, sequence, activity and state chart
models, as well as the textual specification of methods.
        </p>
        <p>
          In this context, an executable model is at the next higher layer of abstraction,
abstracting away both specific programming languages and decisions about the
organization of the software (e.g. data structure and partitioning) so that a specification
built in Executable UML can be deployed in various software environments without
change [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. A key ingredient of any Executable UML variant is the use of an Action
language (type of pseudocode) that allows designers to completely specify fine-grained
behavioural aspects of the model (e.g. to define the behaviour of a method of a class).
ALF is a platform-independent language that works at the same semantic level as the
rest of the UML-based CS. This means that actions allow directly a manipulation of the
elements of the conceptual schema (no assumptions are made about middleware,
implementation language or software design policy) and they are capable of being
translated into different implementations for different platforms and languages.
        </p>
        <p>In this paper we propose to use a UML-based Class diagram and derive part of the
CS behaviour from the constructor operations, constraints, invariants, pre and post
conditions represented in the class diagram by translating them into ALF code as part
of the specification of a method (i.e. constraints and invariants) or a conditional inside
of the method specification (i.e. pre and post conditions).
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>CoSTest process for validating Conceptual Schemas</title>
        <p>
          We developed an early testing technique supported by the CoSTest tool to validate
requirements at model level [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. Figure 2 provides an overview of how CoSTest
operates by covering three main phases: (i) test suite generation, (ii) CS under test
generation, (iii) test execution and report generation with the faults detected and the
coverage analysis. The red frame corresponds to the work presented in this paper.
i) Test Suite Generation. This phase supports the semi-automatic generation of test
cases using a model-driven process. The first two steps of this process are explained in
detail in a previous work [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]: (1) transform a Requirements Model (i.e. system
requirements at business level) into Test Model (i.e. contains information about the test
items and their order of precedence); (2) transform the Test Model into Test Scenario
Model identifying the different sequences of events (i.e. test paths) from test model; (3)
generate the test values for test cases; (4) transform each test scenario into Test case
scripts (ALF script), which contains the abstract test cases; (5) select the type of test
cases (e.g. positive test cases only or including negative test cases); (6) generate
concrete and executable test cases into ALF textual specifications; and (7) prioritize
and select the test cases for execution based on mutation testing [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. Steps 5-6 are
explained in greater detail in Section 6. Figure 2 shows some artefacts used in our Order
example.
ii) Generation of the Executable Conceptual Schema under test. In this phase the
executable CS using ALF is generated (see Step 8 in Figure 2) using the UML-to-ALF
transformation described in Section 5. Then (Step 9), we can parse the CS before
starting the execution of CS in the testing process (see Section 5).
5
iii) Test Execution. In this phase the test cases are executed against the CS and a list
of defects and a coverage analysis are reported (see Steps 10 and 11 in Figure 2). Further
information is given in Section 6.
4
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Related Work</title>
      <p>
        Although there are a number of studies addressing the verification of UML models that
include actions [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], only some of them [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] are aligned with the
ALF action language standard.
      </p>
      <p>
        The Papyrus tool [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ][
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], an open-source UML tool under the Eclipse Modelling
Project uses ALF to validate UML models. This tool has executable modelling
capabilities including: (1) creating a complete program as a graphical UML class
model, with detailed behavioural code written textually using ALF; (2) synchronizing
the graphical representation of a UML class with its textual representation in ALF; (3)
concurrent execution of an activity and (4) debugging an executing activity. This means
a user (modeller/analyst/tester) can manually enter the tests as an activity diagram to
perform the testing and debugging process. There is also a work [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] that provides
feedback and lessons learned by the Papyrus team regarding the implementation and
use of the fUML with ALF from the perspective of domain-specific users. Research
has also been carried out [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ][
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] on using fUML and ALF as the basis for specifying
the semantics of domain-specific modelling languages. However, to authors’
knowledge, there is no possibility of automatically obtaining a full version of the UML
model in ALF code from these tools.
      </p>
      <p>
        This paper describes the use of ALF for generating/writing executable test cases as
well as for transforming a UML CD-based CS in an executable model. These
ALFbased artefacts are then used within the CoSTest process for validation of UML-based
Conceptual Schemas by executing the test cases against the executable CS in an
ALFbased testing environment. We also report on the usefulness of our UML-to-ALF
transformation and its parsing to validate a set of mutation operators [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] and a mutation
tool [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] implemented with the intention of evaluating the effectiveness of the test cases
generated by CoSTest [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and to prioritize them.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Generation of Executable Conceptual Schema using ALF</title>
      <p>We use the ALF language as a notation for representing UML CD-based CS and for
reasoning about this model. To obtain the result outlined in the previous section we
defined a model-to-text transformation of UML to ALF, which we describe in this
section. The mapping is specified as an Acceleo5 transformation included in CoSTest
and we outline here its points of interest. Table 1 provides information about the main
transformations according to the ALF standard.</p>
      <p>For derived associations, we add an attribute to the class (e.g. sequence) and create
a getter operation (e.g., association_&lt;DerivedAssociationName&gt;_derivation). We then
attach the operation generated from the constraint expression to the getter. Figure 4
shows highlighted with red rectangles the ALF code for the pendingDispatch derived
association of our example. All the examples given in this section have been translated
into ALF using our ALF translator implemented in CoSTest, and executed using the
fUML execution engine.</p>
      <p>We decided to use the Reference Implementation6 as an fUML engine because (1) it
is based on the reference implementation and (2) it provides an execution log. Thanks
to (1) we have confidence in its conformity to the fUML specification. And (2) means</p>
      <sec id="sec-5-1">
        <title>5 https://www.eclipse.org/acceleo/</title>
        <p>6 http://modeldriven.github.io/fUML-Reference-Implementation/
that systematic testing (i.e. reviewing hundreds of logs) is simpler than with the Moka7
implementation, which is more suitable for an interactive testing.</p>
        <p>The transformation of UML CD-based CS into ALF is performed in two steps:
1. Model-to-text transformation translates the UML CD-based CS into ALF units.</p>
        <p>This transformation is written in Acceleo code. It takes as inputs an UML CD-based
CS, and gives as output an ALF -based CS. The resulting ALF-based CS contains
the elements generated from the transformation of all CS elements given as input.</p>
      </sec>
      <sec id="sec-5-2">
        <title>7 https://wiki.eclipse.org/Papyrus/UserGuide/ModelExecution</title>
        <p>
          2. ALF unit parsing. Semantically, ALF maps the CS to the Foundational UML
(fUML [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ]) subset. The resulting ALF-base CS is semantically equivalent to the
original one. Then fUML provides the virtual machine for the execution of the ALF
units. Further details can be found in the ALF Reference Implementation.
The current version of our ALF transformation supports most UML CD constructs with
the following notable exceptions: (1) features required to specify abstractions could be
added with relatively little work; (2) transformation of OCL constraints. Currently, the
UML CD-based CSs used in our approach use directly the ALF language to specify the
constraints. But, there is an approach enabling OCL and fUML Integration by
transformation that could be used to address this issue [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ].
        </p>
        <p>
          We applied our ALF -based tool to check the generation of CoSTest test cases and
measure their effectiveness in several subject CS [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. In addition, we conducted
research [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ][
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] into using UML-to-ALF transformation as the basis for specifying
valid mutation operators and parsing mutants in the context of our validation tool for
UML CD-based CS.
6
        </p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Generation and Execution of Test Cases using ALF</title>
      <p>The last step executed in CoSTest to generate test scenarios (see Section 3.2) is the
transformation into ALF code of the abstract test cases (e.g. services, triggers,
assertions and links exemplifying the interaction of actors with the system) using
Acceleo, which are concretized with values entered by the tester or generated from the
data model. The result of this transformation is a test suite with concrete and executable
ALF-based test cases.</p>
      <p>In ALF, an executable test case is an activity that provides the specification of
parameterized behaviour as the coordinated sequencing of subordinate ALF units
including assertions which describe how the model should behave. A CS can
demonstrate semantic correctness and completeness with its requirements specification
if no assertion is violated when executing the test suite.</p>
      <p>
        Correctness covers both syntactic correctness (right or well-formedness syntax) and
semantic correctness (right meaning and relations relative to the knowledge about the
domain) [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. Completeness is to have all the necessary information according to the
purpose of modelling [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. Incompleteness of the UML CD-based CS can also be
detected via testing of the translated ALF, enabling particular test scenarios to be
executed. For example, in the Order CS specification the lack of an invariant to ensure
that creditCardNumber of a PersonalCustomer class is unique can be identified by
instantiating two PersonalCustomer with the same credit card number, if the scenario
is executed without reporting an error then the invariant is required, otherwise the CS
contains the invariant (the required invariant is context PersonalCustomer inv
UniqueCreditCard: body: PersonalCustomer-&gt;isUnique e(e.creditCardNumer)).
      </p>
      <p>The semantic correctness of UML-CD-based CS with respect to a domain can also
be checked against the evaluation of constraints. Then the elements exercised in the test
cases can be used to identify other defects, such as redundant (e.g. duplicated element)
and extraneous (e.g. CS elements not used by test cases) elements.</p>
      <p>A test suite generated by CoSTest contains hundreds of test cases, so that this
automatic generation could not have been produced without ALF.</p>
      <p>CoSTest generates three kinds of test cases and focuses on instantiation semantics
of UML Structures to test:
1. The occurrence of events. An event is the execution of some operation (method) of
the CS, which may have several kinds of defects, of which the following can be
highlighted: (a) the pre-conditions of the event may not allow the occurrence of valid
events. (b) the post-conditions may not precisely define the intended effect of events.
(c) the method of an operation may produce a state that does not satisfy the CS
invariants.</p>
      <p>AssertTrue (“Object created”, order_ instanceof Order);</p>
      <p>AssertTrue("Association Created", order_.orderlines-&gt;size()&gt;0);
2. The non-occurrence of events. For the set of constraints defined in the CS to be
correct and complete, not only must the constraints be satisfied by valid CS states,
but those constraints must also rule out invalid states. Testing the CS may be a
practical mean of detecting missing constraints. This is done by setting up one or
more test cases, with a state established in the requirements as invalid, such as values
of the range, minimum cardinality violation, unique value violation for class
attributes, followed by an assertion that the state does not satisfy at least one CS
constraint. For example, when an attribute of an object should be unique (e.g. unique
name for Customer) CoSTest generates a test case including two instances of this
object (customer in our example) with the same value in the unique attribute (i.e.
name) and test the required constraint with an assertion as follows:
customer_=new Customer (p_atrname=”name”, p_atraddress=”Address1”);
customer2_=new Customer (p_atrname=”name”, p_atraddress=”Address2”);
AssertFalse (“Not Exist”, customer_ instanceof Customer);
3. The contents of CS objects. It is often useful to include an assertion on the current
state of an object instance in the CS in a test case. The purpose may be to check that
one or more derivation rules derive the expected results, or that a navigational
expression yields the expected results or that the effect of one or more events implies
an expected result in the CS object instance. For example, CoSTest generates the
following two assertions to test the derivation rules corresponding to the total
derived attribute (in Order class) and the pendingDispatch derived association of our
example (see Figure 1).</p>
      <p>AssertEqual(“property_total_derivation”, order_.total, order_.
orderLines-&gt;collect e(e.price)-&gt;reduce Sum);
AssertEqual (“association_pendingDispatch_derivation”, customer_.
pendingDispatch, customer_.orders-&gt;select e(e.dispatched=false));
The oracle and test goal of each test case is derived from the type of test cases selected
(i.e. positive or negative). The expected value (oracle) for the positive test cases
(assertionEqual or assertionTrue) is “true” and with negative conditions the False
assertion (assertionFalse) must be true, otherwise the test case fails. The test cases are
then evaluated by using these oracles and goals included in the test cases. A test case
returns the verdict Pass (if the assertion is satisfied), Fail (if the assertion is not satisfied)
or Inconclusive (if it was not possible to execute all the statements previous to the
assertion). When the verdict of the assertion is Fail or Inconclusive, the execution trace
(i.e. ALF execution log) is analysed to report the defects by using the information
shown in Table 2.</p>
    </sec>
    <sec id="sec-7">
      <title>Application of ALF within the CoSTest process</title>
      <p>
        In order to evaluate the syntactic correctness and completeness of the transformation
rules to ALF used in CoSTest (i.e. for CSUT and executable test cases), we applied our
UML-to-ALF transformation (see steps 8 and 9 in Figure 2) and our generator of
ALFbased test cases (see step 6 in Figure 2) to eight CSs. In particular, this experiment took
as input CSs containing a variety of characteristics that can be present in UML
CDbased CS, including classes, relations (i.e. association, composite aggregation, and
generalization) and different types of constraints (i.e. pre-condition, post-condition and
body condition). These CSs were of different sizes and domains (e.g. information
systems, games). On case is taken from industrial (i.e. IM), others CSs were found in
the literature (i.e. [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ], [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ], [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ], [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] and [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]). The different CSs were specified using
UML2 and Papyrus8 tools. Table 3 shows the number of the ALF-based test cases and
test scenarios generated for different CSs by CoSTest. Test suites used in this study
include tests checking all the CS class operations and constraints. Table 4 summarizes
the characteristics (i.e. UML class diagram elements) of these CSs.
      </p>
      <p>This experiment let us to evaluate the transformation rules of the CoSTest by
verifying the syntactic correctness and evaluating the completeness of the transformed
CSUT. Then, the results obtained by parsing for these transformations to ALF (i.e.
CSUT and test cases) were 100% well-formed and complete. These CSs are publicly
available in the project website https://staq.dsic.upv.es/webstaq/costest.html, so that,
the test cases can be again generated and the experiment can be replicated with the
CoSTest tool.</p>
      <p>
        In order to validate the subject CSUT by executing test cases against them, we
injected faults into subject CSs and executed the CoSTest testing process (see steps
88 https://eclipse.org/papyrus/
11 in Figure 2). Then, defects such as missing (e.g. class, attribute, constraint,
operation, association), incorrect (e.g. operation, parameter) and extraneous elements
(e.g. derived attribute, attribute) were reported by CoSTest. These data are outside the
scope of this paper, so that, more detailed information on the testing process (e.g.
injected defects, founded defects) can be found in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
8
      </p>
    </sec>
    <sec id="sec-8">
      <title>Discussion</title>
      <p>
        Conceptual schemas are particularly useful in discussions with problem domain
stakeholders. They are straightforward to understand and a lot of detail can be presented
in a well-laid-out, compact diagram. For most people, this is far easier to understand
than large blocks of text or written descriptions. However, in order to execute a large
number of test cases (i.e. hundreds of them) in a systematic way by exercising different
test scenarios and elements of the UML CD-based CS and then to report the defects
found, we require a tool that allows us to execute a set of test cases against a CS, so we
used ALF in the context of CoSTest tool as the execution environment that provides
the ability to execute UML models and report their defects systematically. A tool such
as CoSTest, which is based on ALF for representing UML CD-based CD, has two main
usage scenarios:
1. Verifying well-formed UML models by parsing. The syntax of the language
provides the rules for how to construct well-formed statements. The semantics of the
language provides the specification of the meaning of well-formed statements. Users
(analysts/modellers/testers) could therefore use our ALF–based tool for verifying
that a model is actually well-formed. This model can be a conceptual schema under
test, as in our validation approach, or a mutant model used to evaluate mutation
operators [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], to implement a mutation tool [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] and to evaluate the effectiveness
of the test cases of a tool such as CoSTest [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
2. Validating UML models by execution. CoSTest performs verification and
validation of UML CD-based CS. This means the tool performs correctness and
completeness checks on sets of elements of a CS as well as the elements covered in
the test cases are used to identify other defects such as redundant (e.g. duplicated
element) and extraneous (e.g. CS elements not used by test cases) elements.
Finally, there is still a long way to go to bring ALF tooling to a level comparable with
other existing professional environments that execute and test CS, such as placing
breakpoints into ALF specifications, which would make it a lot easier to test and debug
complex behaviour.
9
      </p>
    </sec>
    <sec id="sec-9">
      <title>Conclusions and Future Work</title>
      <p>ALF and fUML are relatively new standards for building further executable UML
specifications and their implementations have only appeared recently. So far, however,
most fUML-based execution tooling has been intended to primarily address needs for
system simulation and analyse the behaviour of the model with values manipulated by
a tester.</p>
      <p>
        In this paper we have shown that ALF could be used to validate requirements at
model level by systematically executing a set of the ALF-based tests. To do so, in
Section 2 we described a simple UML CD-based CS built in Papyrus, which was then
translated into ALF using a transformation we had developed. The result was a model
of a system ready to be tested (i.e. executable) using the CoSTest tool and a set of the
ALF-based test cases generated by it. The tool is able to report defects (i.e. syntactically
incorrect elements) by parsing the CS, missing and incorrect elements by executing the
model, as well as redundant and extraneous elements by coverage analysis of the testing
process. We have also used our ALF-based approach in other scenarios to evaluate
mutation operators [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], to implement a mutation tool [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] and to evaluate the
effectiveness of the test cases of a tool such as CoSTest [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>We have also reported some limitations of the current ALF-based tool from user
feedback. We hope the issues that are related to the standards will be addressed by the
Executable UML Working Group in the near future, so that technological
improvements resulting from these refinements of the standards can be integrated in the
future development of CoSTest. In addition, we will do a comparative analysis of the
use of other languages to write the test scripts.</p>
    </sec>
    <sec id="sec-10">
      <title>Acknowledgments</title>
      <p>This work is supported by SENESCYT of the Republic of Ecuador, Spanish Ministry
of Economy, Industry, Competitiveness and the Generalitat Valenciana under the
projects the PGE (TIN2016-78011-C4-1-R), FEDER (TIN2013-46238-C4-3-R),
TIN2016-80811-P and PROMETEO II/2014/039, and cofinanced with ERDF.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Granda</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Condori-Fernandez</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vos</surname>
            ,
            <given-names>T.E.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pastor</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Towards the automated generation of abstract test cases from requirements models</article-title>
          .
          <source>In: 1st International Workshop on Requirements Engineering and Testing</source>
          . pp.
          <fpage>39</fpage>
          -
          <lpage>46</lpage>
          . IEEE, Karlskrona, Sweden (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Seidewitz</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tatibouet</surname>
          </string-name>
          , J.: Tool Paper :
          <article-title>Combining Alf and UML in Modeling Tools - An Example with Papyrus -</article-title>
          .
          <source>In: OCL@MoDELS</source>
          . pp.
          <fpage>105</fpage>
          -
          <lpage>119</lpage>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3. Object Management Group:
          <article-title>Unified Modeling Language (UML)</article-title>
          .
          <article-title>(</article-title>
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Mellor</surname>
            ,
            <given-names>S.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Balcer</surname>
            ,
            <given-names>M.J.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Executable</surname>
            <given-names>UML</given-names>
          </string-name>
          :
          <article-title>A Foundation for Model-Driven Architecture</article-title>
          .
          <source>Addison Wesley</source>
          (
          <year>2002</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Granda</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Condori-fernández</surname>
          </string-name>
          , N.,
          <string-name>
            <surname>Vos</surname>
            ,
            <given-names>T.E.J.</given-names>
          </string-name>
          , Pastor, Ó.:
          <article-title>CoSTest : A tool for Validation of Requirements at Model Level</article-title>
          . In: 25th International Requirements Engineering Conference - Tool
          <string-name>
            <surname>Demo</surname>
          </string-name>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Granda</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Condori-Fernández</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vos</surname>
            ,
            <given-names>T.E.J.</given-names>
          </string-name>
          , Pastor, Ó.:
          <article-title>Effectiveness Assessment of an Early Testing Technique using Model-Level Mutants</article-title>
          .
          <source>In: 21st International Conference on Evaluation and Assessment in Software Engineering</source>
          . ,
          <string-name>
            <surname>Karlskrona</surname>
          </string-name>
          , Sweden (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Graw</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Herrmann</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Transformation and Verification of Executable UML Models</article-title>
          .
          <source>Electron. Notes Theor. Comput. Sci. 101</source>
          ,
          <fpage>3</fpage>
          -
          <lpage>24</lpage>
          (
          <year>2004</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Hansen</surname>
            ,
            <given-names>H.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ketema</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Luttik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mousavi</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Van de Pol, J.,
          <source>Marchi dos Santos, O.: Automated Verification of Executable UML Models. In: International Symposia on Formal Methods for Components and Objects</source>
          . pp.
          <fpage>225</fpage>
          -
          <lpage>250</lpage>
          (
          <year>2010</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Laurent</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bendraou</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baarir</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gervais</surname>
          </string-name>
          , M.-P.: Formalization of fUML :
          <article-title>An Application to Process Verification</article-title>
          .
          <source>In: International Conference on Advanced Information Systems Engineering</source>
          . pp.
          <fpage>347</fpage>
          -
          <lpage>363</lpage>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Xie</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Levin</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Browne</surname>
            ,
            <given-names>J.C.</given-names>
          </string-name>
          :
          <article-title>Model Checking for an Executable Subset of UML</article-title>
          .
          <source>In: 16th IEEE International Conference on Automated Software Engineering</source>
          (
          <year>2001</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Lai</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Carpenter</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Defining and Verifying Behaviour of Domain Specific Language with fUML Categories and Subject Descriptors</article-title>
          .
          <source>In: Proceedings of the Fourth Workshop on Behaviour Modelling - Foundations and Applications</source>
          (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Micskei</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Konnerth</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Benedek</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Semeráth</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vörös</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Varró</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>On Open Source Tools for Behavioral Modeling and Analysis with fUML and Alf</article-title>
          .
          <source>In: 1st Workshop on Open Source Software for Model Driven Engineering</source>
          . pp.
          <fpage>31</fpage>
          -
          <lpage>41</lpage>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Planas</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cabot</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gómez</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Lightweight and static verification of UML executable models</article-title>
          .
          <source>Comput. Lang. Syst. Struct</source>
          .
          <volume>46</volume>
          ,
          <fpage>66</fpage>
          -
          <lpage>90</lpage>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Guermazi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tatibouet</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cuccuru</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dhouib</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gérard</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seidewitz</surname>
          </string-name>
          , E.:
          <article-title>Executable Modeling with fUML and Alf in Papyrus : Tooling and Experiments</article-title>
          .
          <source>In: 1st International Workshop on Executable Modeling</source>
          . pp.
          <fpage>3</fpage>
          -
          <lpage>8</lpage>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Tatibouët</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cuccuru</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sébastien</surname>
            <given-names>Gérard</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Terrier</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Formalizing Execution Semantics of UML Profiles with fUML Models</article-title>
          .
          <source>In: International Conference on Model Driven Engineering Languages and Systems</source>
          . pp.
          <fpage>133</fpage>
          -
          <lpage>148</lpage>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Mayerhofer</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Langer</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wimmer</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>xMOF : A Semantics Specification Language for Metamodeling</article-title>
          .
          <source>In: Satellite Events of MODELS</source>
          (
          <year>2013</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Granda</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Condori-Fernandez</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vos</surname>
            ,
            <given-names>T.E.J.</given-names>
          </string-name>
          , Pastor, Ó.:
          <article-title>Mutation Operators for UML Class Diagrams</article-title>
          . In: CAiSE (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Granda</surname>
            ,
            <given-names>M.F.</given-names>
          </string-name>
          ,
          <article-title>Condori-fernández, N.: A Model-level Mutation Tool to Support the Assessment of the Test Case Quality</article-title>
          . In: ISD (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19. Object Management Group:
          <article-title>Semantics of a Foundational Subset for Executable UML Models (fUML)</article-title>
          .
          <article-title>(</article-title>
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Massimo</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jouault</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Saidi</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Delatour</surname>
          </string-name>
          , J.:
          <article-title>Enabling OCL and fUML Integration by Transformation</article-title>
          .
          <source>In: European Conference on Modelling Foundations and Applications</source>
          . pp.
          <fpage>156</fpage>
          -
          <lpage>172</lpage>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Mohagheghi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dehlen</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Neple</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Definitions and approaches to model quality in model-based software development - A review of literature</article-title>
          .
          <source>Inf. Softw. Technol</source>
          .
          <volume>51</volume>
          ,
          <fpage>1646</fpage>
          -
          <lpage>1669</lpage>
          (
          <year>2009</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>España</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>González</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pastor</surname>
          </string-name>
          , Ó.,
          <string-name>
            <surname>Ruiz</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Technical Report Communication Analysis and the OO-Method : Manual Derivation of the Conceptual Model the SuperStationery Co</article-title>
          . Lab Demo. ,
          <string-name>
            <surname>Valencia</surname>
          </string-name>
          (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <surname>España</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>González</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pastor</surname>
          </string-name>
          , Ó.,
          <string-name>
            <surname>Ruiz</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Integration of Communication Analysis and the OO-Method: Rules for the manual derivation of the Conceptual Model</article-title>
          . ,
          <string-name>
            <surname>Valencia</surname>
          </string-name>
          (
          <year>2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Tort</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Olivé</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Case Study: Conceptual Modeling of Basic Sudoku</article-title>
          , http://guifre.lsi.upc.edu/Sudoku.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Tort</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>A Basic Set of Test Cases for a Fragment of the osCommerce Conceptual Schema</article-title>
          , http://hdl.handle.net/2117/6130.
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>Planas</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Olivé</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <source>The DBLP Case Study</source>
          , http://guifre.lsi.upc.edu/DBLP.pdf.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>