<!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>Industrial approach in requirement engineering</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Igor Chernorutsky</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>P.D. Drobintsev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>V.P. Kotlyarov</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ph.</institution>
          <addr-line>D., assistant prof., SPbPU</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Ph.</institution>
          <addr-line>D., prof., SPbPU</addr-line>
        </aff>
      </contrib-group>
      <fpage>388</fpage>
      <lpage>400</lpage>
      <abstract>
        <p>The article describes the approach how to transform initial requirements in natural language into the formal requirement model. The model is used to analyze the behavior of the designed system to meet the original requirements during the design stage. Successfully verified the formal requirement model is used to generate test cases that completely cover the behavior of the analyzed application.</p>
      </abstract>
      <kwd-group>
        <kwd>requirement engineering</kwd>
        <kwd>requirement specification</kwd>
        <kwd>formal specifications development</kwd>
        <kwd>requirements behavioral model</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>The issue of verifying implementation of large-scale and complicated requirements
specification is among the main issues of industrial software development and test
automation. Documents with requirements specification are usually formulated in
natural language and may contain hundreds and thousands of requirement items.
Therefore requirements formalization for describing behavioral scenarios used for
automated tests or manual test procedures development is characterized as a task of
huge complexity and big efforts.</p>
      <p>
        Applicability of formal methods in the industry is largely determined by the level
of formalization language adequacy to the engineering practice involving not only
code developers and testers but also customers, project managers of different levels,
marketers and other specialists. Quite obvious that none of the logical languages can
be used for adequate requirements formalization which would keep the semantics of
the developed application and at the same time satisfy all «persons involved» [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>In contemporary project documentation initial requirements are formulated either
constructively, when scenario of requirement fulfillment checking can be extracted
directly from the text of this requirement in natural language, or unconstructively,
when there is no clarification how to check some feature contained in the
requirement.</p>
      <p>For example, behavioral requirements for telecommunication applications are
formulated constructively given that requirements execution procedure is specified, and
in this case verification and testing can be used to check their feasibility. Non
behavioral requirements are often formulated unconstructively, which requires some
additional information in formalization process allowing to work out scenarios of their
checking or in other words to transform unconstructive way of formulation into
constructive one.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Checking requirements fulfillment</title>
      <p>Procedure of a requirement checking is exact sequence of causes and consequences of
some activities (encoded by actions, signals and states), whose analysis allows to
confirm whether this requirement has been fulfilled or not. Such checking procedure
being used as criteria of requirement fulfillment can be called criteria procedure. The
term "sequence" or "chain of events" will be used along with the term “criteria
procedure” in the text of this article.</p>
      <p>Tracking the steps of performing criteria procedure in system’s behavioral
scenario (either hypothetical or implemented in a model or in a real system) can be
served as confirmation that the corresponding requirement is fulfilled in the
system under analysis.</p>
      <p>
        Procedure of a requirement checking (a chain) is formulated by specifying the
following information for all elements of this chain:
• conditions (a set of causes) required for activation of some activity;
• the activity, which shall be executed under current conditions;
• consequences - observable (measurable) results of activity execution.
All the following is used to specify causes and consequences: signals, messages or
transactions, commonly used in communications between instances of reactive
systems [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], as well as variables states specified in terms of values or restrictions on
region of admissible values. Coverage of corresponding chains can be observed by
tracing changes in the states caused by chains activities. During analysis it is allowed to
consider direct transition into a state with empty activity and alternative ways of
changing states in case of nondeterministic behavior.
      </p>
      <p>Issues with unconstructive formulating of requirements are solved in the process of
procedures development that should check requirements fulfillment on user interfaces
or interfaces between components. It means that the requirement for some
functionality should be interpreted by functions of user interface or API (Application Program
Interface) of components. These functions should describe the encoded functionality
in such a way that, based on this interpretation, you can set the procedure for checking
the corresponding functionality in the application.</p>
      <p>
        Similar interpretation is formulated in Use Case [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] diagrams based on knowledge
of GUI (Graphical User Interface) of the developed application or API (Application
Program Interface) of its components.
      </p>
      <p>Thus, chains with sequences of activities and states can be used as criterion of
requirements fulfillment. Besides that, there may be cases in which the criterion for the
fulfillment of a certain requirement is specified by several chains instead of a single
chain.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Initial documents with requirements specification</title>
      <p>The following types of documentation are usually used while formulating technical
requirements in industrial software projects:
• Marketing Requirement Specification (MRS) – enumeration of new functionality
from customer's point of view, often described in Use Case format;
• Technical Requirement Specification (TRS) – enumeration of complete
functionality to be implemented with brief explanation of each function;
• Functional Requirement Specification (FRS) – detailed description of complete
functionality to be implemented, full enough for test set creation to test software
product on all stages of the lifecycle.</p>
      <p>Each requirement in these documents is more often formulated in natural language
and expressed in one of two ways:
• as behavioral requirement, when scenario of requirement fulfillment checking can
be extracted directly from the text of this requirement in natural language;
• as non behavioral requirement, when just a structure or wish of having some
feature is expressed without explanation of how this feature can be checked or tested.
Due to constructive way of expression behavioral requirements allow static and/or
dynamic methods of verification and testing for checking their implementation.</p>
      <p>Non behavioral requirements are expressed in unconstructive way and require
additional information for creating a constructive scenario of their checking in order to
make verification and testing applicable.</p>
      <p>
        Formalization of any constructively formulated requirement as well as effective
automated analysis of software requirements are possible and implemented in VRS/TAT
technology [
        <xref ref-type="bibr" rid="ref4 ref5 ref6">4, 5, 6</xref>
        ].
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>UCM notation</title>
      <p>
        Use Case Maps (UCM) notation [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] is used in VRS/TAT technology for high level
model description while tools which perform automation of checking and generation
processes work with model in basic protocols language [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ].
      </p>
      <p>
        UCM notation is clear for a designer, a tester and a customer. It allows describing
behavior of complex software projects in a formal way. Although a transition from
informal requirements to their formal model is performed manually, it can be
significantly simplified by using developed solutions based on templates. The rest stages of
VRS/TAT verification and testing integrated technology are automated [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. For
application or tests source code generation a detailing (technique of Lowering [
        <xref ref-type="bibr" rid="ref11 ref12">11, 12</xref>
        ]) can
be used which does not break proved results of abstract model’s correct behavior.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Expressing initial requirements</title>
      <p>
        Considered below are the stages of requirements processing on the example of
Extensible Messaging Presence Protocol (XMPP) implementation project. XMPP [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] is
extensible protocol for publish-subscribe systems, VoIP, video, files transfers,
Internet of Things (IoT) applications, games and so on. XMPP is an open standard based
on XML.
      </p>
      <p>This paper illustrates integrated methodic for formalizing initial requirements and
creating requirements formal model which can be applied after detailing for symbolic
verification and generation of symbolic test scenarios and further executable test sets.
Functioning XMPP server called Apache Vysper is used as a system under test (SUT)
in this project.</p>
      <p>Example fragment of XMPP initial requirements version is shown in Fig. 2:</p>
      <p>Each requirement in Fig. 2 has a corresponding criteria chain or a test procedure
(Fig. 3). Test procedure contains pre- and post- conditions as well as actions for
covering the requirement.</p>
      <p>For example, the ReqXMPP0003 requirement: «Server must allow
sending/receiving messages between clients» has the corresponding TestProсXMPP0003
test procedure which covers this requirement.</p>
      <p>Pre-condition: Clients have been initialized on the server.</p>
      <p>Step 1. The first client sends a message to the second client.</p>
      <p>Step 2. The server confirms message dispatch.</p>
      <p>Step 3. The second client receives the message from the first client.</p>
      <p>Post-condition: The message has been successfully delivered.</p>
      <p>UCM diagram is used in the project as a requirements model. UCM diagram
shown in Fig. 4 describes communication between XMPP server and XMPP client.</p>
      <p>The trace marked with green color on the diagram corresponds to the
TestProcXMPP0003 test procedure.</p>
      <p>Note that requirement fulfillment can be traced by its steps:
1. Four events Login1, Login2, Confirm_Login1 and Confirm_Login2 (both clients
logging in to the server and get confirmation from the server) altogether compose a
precondition for the send_message event - sending a message from the first client
to the second client (Precondition: Clients have been initialized on the server).
2. The confirm_send event is the server's confirmation of message dispath.
3. The consume_message event means that the second client has successfully
received the message and post-condition has been achieved: the message has been
successfully delivered. The fact, that the EndPoint1 point has been reached, means
the end of the test procedure and successful fulfillment of the ReqXMPP0003
requirement.</p>
      <p>
        A scenario generated from a formal model in UCM format and corresponding to the
test procedure can be automatically presented as a symbolic test scenario in MSC
[
        <xref ref-type="bibr" rid="ref5 ref8">5,8</xref>
        ] format (Fig. 5).
      </p>
      <p>If criteria chains checking requirements fulfillment are formulated and agreed
with customer for all requirements, it provides criteria for functionality checking of
the whole software product.</p>
      <p>Checking criteria chains for each constructive requirement means checking its
semantics from customer’s point of view, of course only after all criteria procedures had
been approved by the customer. Implementation of such check is rather complex task
if it is not fully automated.</p>
      <p>UCM models of requirements may have complicated structured view (Fig. 6). For
example, UCM model of the ReqXMPP0007 requirement: «Server must allow client
to unsubscribe other client at any time» is represented in Figure 6 and contains
encapsulated UCM diagram.</p>
      <p>The test procedure corresponding to the ReqXMPP0007 requirement model
contains joint sequence of events from both diagrams in its behavioral scenario (Fig. 7):</p>
      <p>
        Symbolic MSC scenario uses signals with identification parameters of the jid1
and jid2 communicating clients, i.e. the described behavior can be spread on a number
of clients. Allowed restrictions on region of admissible values for any parameter shall
be controlled by means of static and dynamic control [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
      </p>
      <p>
        Means of automated model correctness checking are provided by VRS/TAT [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
integrated technology of verification and testing which includes tools for symbolic
verification, test sets generation and tests execution within a single automated process
with minimal efforts required for tests development and execution steps.
6
      </p>
    </sec>
    <sec id="sec-6">
      <title>Detecting and fixing bugs in requirements</title>
      <p>The criterion of error in the specification of the requirement is the fact that the criteria
chain is unreachable and this fact is detected during the verification process (Fig. 8).
The reason of test scenario unreachability (or failing) detected during verification
process lies in incorrect formulation of the ReqXMPP0016 requirement (Fig.9). The
problem is that it is not enough to enter a room to be allowed to send messages in this
room. In other words, an invitation received by a user shall not give him rights to use
this room.</p>
      <p>The corrected ReqXMPP0016 requirement is the following: «Client who received
invitation to enter a room but didn’t enter a room can’t send messages to this room.
Server shall response to the client with «error» message».</p>
      <p>Changes in the semantics of requirement lead to corresponding correction of UCM
model (Fig. 9), where the ReqXMPP0016 requirement is reachable.</p>
      <p>Covered requirements are displayed on UCM model with colored path. There can
be individual color for each requirement which is very useful for coverage analysis or
model correction.</p>
      <p>Providing the full coverage of all requirements implies proving the correctness of
all behavioral scenarios kept in requirements. However this does not guarantee
absence of some incorrect (not specified in requirements) behavior which can be a result
of the environment not considered in behavioral model.</p>
      <p>
        The described approach provides features of automated analysis of incorrect
behavior conditions [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] and algorithms (filters) for their detection in the process of
application functioning. This is done in the process of backword - the reverse proof of
the correctness of the trace from the found point of unreachability to the beginning
with the addition of the indispensable Precondition As a result the correspondence
between behavioral model and initial requirements is provided.
7
      </p>
    </sec>
    <sec id="sec-7">
      <title>Results</title>
      <p>The proposed approach was tested in industrial telecommunications projects of the
Motorola Saint-Petersburg department of software development and allowed to
automate the process of designing and developing functional tests. Due to automation it
was possible to reduce the complexity of this process more than 5 times, while
ensuring the guaranteed completeness of testing.
8</p>
    </sec>
    <sec id="sec-8">
      <title>Conclusion</title>
      <p>
        The proposed approach has the following advantages:
• Usage of formal methods is a good practice to guarantee the software quality.
• High abstraction level of formal model allows working with customer on the
development phase. It provides proving the model’s behavior correctness.
• Analyzing the behavior of all functionality modes mapped to requirement
specifications.
• Calculate permissible range of parameters used in the behavioral scenarios.
• For application or tests source code generation a detailing (technique of Lowering
[
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]) can be used which does not break proved results of abstract model’s correct
behavior.
• Generation of software filters to control and prevent behavioral scenario from
leaving the calculated limits.
• The integrated technology of design and testing was applied in the domain of
wireless telecommunications applications and demonstrated efforts reduction in 26%
on software product development.
      </p>
      <p>Acknowledgments. The results of this work were obtained using ccNUMA system
and RSC Tornado cluster in Supercomputer Center of Peter the Great St. Petersburg
Polytechnic University. The work was financially supported by the Ministry of
Education and Science of the Russian Federation in the framework of the Federal
Targeted Programme for Research and Development in Priority Areas of Advancement of
the Russian Scientific and Technological Complex for 2014-2020 (№ 14.584.21.0022,
ID RFMEFI58417X0022).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Baranov</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kotlyarov</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Letichevsky</surname>
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>An Industrial Technology Mobile System Test Automation Based on Verified Behavioral Models of Project Requirement Specifications</article-title>
          . In: Proc.
          <article-title>International scientific conference: space, astronomy and programming</article-title>
          .
          <source>Lavrov Readings. May</source>
          <volume>20</volume>
          -22, SPbU, Math-Mech Feculty, St.
          <source>Petersburg</source>
          (
          <year>2008</year>
          ), pp.
          <fpage>134</fpage>
          -
          <lpage>145</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Z.</given-names>
            <surname>Manna</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. Pnueli.</surname>
          </string-name>
          :
          <article-title>The Temporal Logic of Reactive and Concurrent Systems</article-title>
          . SpringerVerlag,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Recommendation</given-names>
            <surname>ITU-T Z</surname>
          </string-name>
          .
          <volume>151</volume>
          .
          <article-title>User requirements notation (URN</article-title>
          ),
          <volume>11</volume>
          /
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>S.</given-names>
            <surname>Baranov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kotlyarov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Drobintsev</surname>
          </string-name>
          .
          <source>The technology of Automation Verification and Testing in Industrial Projects. // Proc.of St</source>
          .Petersburg IEEE Chapter, International Conference, May
          <volume>18</volume>
          -21, St.Petersburg, Russia, 2005 - pp.
          <fpage>81</fpage>
          -
          <lpage>86</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>A.</given-names>
            <surname>Letichevsky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kapitonova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. Letichevsky</given-names>
            <surname>Jr.</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Volkov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Baranov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kotlyarov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Weigert</surname>
          </string-name>
          .
          <article-title>Basic Protocols, Message Sequence Charts, and the Verification of Requirements Specifications</article-title>
          .
          <source>Proc of ISSRE04 Workshop on Integrated-reliability with Telecommunications and UML Languages (ISSRE04:WITUL)</source>
          ,
          <source>02 Nov</source>
          <year>2004</year>
          : IRISA Rennes France.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>I.</given-names>
            <surname>Anureev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Baranov</surname>
          </string-name>
          ,
          <article-title>and others. Tools for supporting integrated technology of analysis and verification of specifications for telecommunication applications</article-title>
          // SPIIRAN works- 2013-№
          <fpage>1</fpage>
          -
          <lpage>28P</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Day</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rosenberg</surname>
            <given-names>J. and H.</given-names>
          </string-name>
          <string-name>
            <surname>Sugano</surname>
          </string-name>
          , “
          <article-title>A Model for Presence and</article-title>
          Instant Messaging,” RFC 2778,
          <year>February 2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Recommendation</surname>
            <given-names>ITU</given-names>
          </string-name>
          _T Z.
          <volume>120</volume>
          . Message Sequence Chart (MSC),
          <volume>11</volume>
          /
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Kolchin</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kotlyarov</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Drobintsev</surname>
            <given-names>V</given-names>
          </string-name>
          .
          <article-title>Method of generating test scenarios in the environment insertion simulation</article-title>
          .
          <source>// "Control systems and machines"</source>
          , Kiev, "Academperiodika, t.6
          <article-title>-2012</article-title>
          , S.
          <fpage>42</fpage>
          -
          <lpage>48</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Drobintsev</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kotlyarov</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nikiforov</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Letichevsky</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Peschanenko</surname>
            <given-names>V</given-names>
          </string-name>
          . Approach to Behavior Scenarios Debugging,
          <source>Modeling and Analysis of Information Systems</source>
          ,
          <year>2015</year>
          , p.
          <fpage>14</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Drobintsev</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kotlyarov</surname>
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Nikiforov</surname>
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Voinov</surname>
            <given-names>N.</given-names>
          </string-name>
          <article-title>Model Oriented Approach for Industrial Software Development</article-title>
          ,
          <source>Modeling and Analysis of Information Systems</source>
          ,
          <year>2015</year>
          , p.
          <fpage>10</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Drobintsev</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kotlyarov</surname>
          </string-name>
          , I. Nikiforov,
          <string-name>
            <given-names>N.</given-names>
            <surname>Voinov</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Selin.</surname>
          </string-name>
          <article-title>Conversion of abstract behavioral scenarios into scenarios applicable for testing</article-title>
          .
          <source>SYRCoSE-2016</source>
          , ISPRAS, pp.
          <fpage>96</fpage>
          -
          <lpage>101</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>