<!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>Multi-Fragment Markov Model Guided Online Test Generation for MPSoC</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Juri Vain</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Leonidas Tsiopoulos</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vyacheslav Kharchenko</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Apneet Kaur</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maksim Jenihhin</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jaan Raik</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>National Aerospace University KhAI</institution>
          ,
          <addr-line>Kharkiv</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Tallinn University of Technology</institution>
          ,
          <addr-line>Tallinn</addr-line>
          ,
          <country country="EE">Estonia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Online monitoring and model-based validation are commonly accepted quality assurance measures for mission critical systems. We propose an integrated approach where the Multi-Fragment Markov Models (MFMM) are used for specifying the system reliability and security related behavior on high-level of abstraction, and the more concrete state and timing constraints related with MFMM are speci ed explicitly using Uppaal Probabilistic Timed Automata (UPTA). To interrelate these two model classes we demonstrate how the MFMM is mapped to UPTA. The second contribution is the test case selection mechanism for online testing where the test cases are prioritized by probabilities of execution modes. The hypotheses on which mode the system switches next are provided by MFMM and the hypotheses are tested using UPTA models that specify the mode behavior forming a test suite for online conformance testing of modes. The approach is illustrated with the Bon re Multi-Processor System-on-Chip.</p>
      </abstract>
      <kwd-group>
        <kwd>Formal methods</kwd>
        <kwd>Uppaal Timed Automata</kwd>
        <kwd>veri cation</kwd>
        <kwd>Markov models</kwd>
        <kwd>model-based testing</kwd>
        <kwd>Multi-Processor System-on-Chip</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The spacecraft systems are inherently mission critical. Their veri cation can be
undertaken during several di erent stages [
        <xref ref-type="bibr" rid="ref1 ref12 ref8">2, 9, 13</xref>
        ]. Such stages are (i)
development stage, (ii) quali cation stage, (iii) acceptance stage, (iv) ight preparation
stage, (v) ight execution stage and (vi) after landing stage. For spacecraft
systems the complete veri cation functions cannot be exercised in full on the ground
due to the inability to simulate complete conditions of the ight. Faults can occur
during the ight due to, e.g. cosmic particles and aging. Furthermore, blocking
of certain functions due to hardware and software faults might be necessary in
order to guarantee the safe operation of the system.
      </p>
      <p>
        Following from the results presented in [
        <xref ref-type="bibr" rid="ref12">13</xref>
        ], in this paper we focus on the
online corrective veri cation implemented by combining predictive Markov
modeling with online Model-Based Testing (MBT).
      </p>
      <p>
        Online monitoring and model-based validation techniques are commonly
accepted quality assurance measures for mission critical systems. Online testing is
considered to be the most appropriate technique for MBT of embedded systems
where the implementation under test (IUT) is modeled using nondeterministic
models [
        <xref ref-type="bibr" rid="ref17">18</xref>
        ]. The nondeterminism stems from the physical nature of the IUT,
particularly, its internally interacting parallel processes, loose timing conditions,
and hardware related jitter. Often, the term on-the- y is used instead of online
testing to describe the test generation and execution at runtime.
      </p>
      <p>If the critical system behavior is complex it is hard or practically impossible to
predict all potential causes why the system can deviate from its speci ed
behavior, e.g. would it be due to the bugs, hardware faults or cyber-attacks, unexpected
load pro les or other reasons that have impact on systems QoS. Therefore, in
model-based approaches the causal relations are often approximated with
probabilistic ones. On the other hand, for error detection and correction the online
veri cation of design correctness should explore the more concrete state space
for explicit conditions under which the faults expose.</p>
      <p>
        We propose an integrated approach with Multi-Fragment Markov Models
(MFMM) [
        <xref ref-type="bibr" rid="ref15">16</xref>
        ] and Uppaal Probabilistic Timed Automata (UPTA) [
        <xref ref-type="bibr" rid="ref7">8</xref>
        ]. MFMM
are used for specifying the system reliability and security related probabilistic
behavior on high-level of abstraction which is relevant for Markov analysis and
assessment of the availability of system functions depending on scenarios for
online execution and veri cation. Besides, MFMM allow to describe probabilistic
behavior considering time-varying system parameters, in particular, failure rate
caused by software design faults. The more concrete state and timing constraints
related with MFMM are speci ed explicitly with UPTA. To interrelate these two
model classes we demonstrate how the MFMM is mapped to UPTA which is more
relevant for explicit state model checking and model-based test generation.
      </p>
      <p>The second contribution is the test case selection mechanism for online testing
which prioritizes the test cases by probabilities of modes to be con rmed by
online testing. The hypotheses on which mode the system switches next are
provided by MFMM and the hypotheses are tested by running conformance
tests against the UPTA models that specify the mode to be identi ed.</p>
      <p>
        The approach is illustrated with the Bon re Multi-Processor System-on-Chip
(MPSoC) example maintained as an open-source project, available at [
        <xref ref-type="bibr" rid="ref3">4</xref>
        ], where
the probabilistic model checking of high-level mode switching scenarios is applied
on MFMM. A set of UPTA models that re nes the behavior of MFMM modes is
applied thereafter as a test suite for model-based conformance testing to con rm
the hypothesis that the system is in a given mode.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Related Work</title>
      <p>
        Markov chains is a well established model-based analytical tool for understanding
stochastic systems behavior [
        <xref ref-type="bibr" rid="ref10">11</xref>
        ]. Stochastic approaches based on Markov models
have been applied on multi-processor systems [
        <xref ref-type="bibr" rid="ref4">5</xref>
        ].
      </p>
      <p>
        Related to the integration of Markov models and system MBT approaches,
several works exist for improving the testing e ciency. For example one of the
rst works presented a method for statistical testing based on a Markov chain
model of software usage [
        <xref ref-type="bibr" rid="ref18">19</xref>
        ]. A more recent related work by Kashyap et al. [
        <xref ref-type="bibr" rid="ref9">10</xref>
        ]
proposes using Markov chains to create system models from available system
usage data in order to create test plans that employ a \likelihood-based", test
prioritization scheme considerably improving the coverage of generated test suites.
      </p>
      <p>
        Corresponding testing methodology for the automotive domain is presented
by Siegl et al. [
        <xref ref-type="bibr" rid="ref13">14</xref>
        ]. A Markov Chain Usage Model is studied to describe all
possible usage scenarios of the IUT and provided a basis to derive systematically test
cases. These test cases can be further processed inside the Extended
Automation Method employed by AUDI AG. The approach makes it also possible to
get both indicators for the test-planning in advance and to obtain dependability
measures after the test cases have been processed.
      </p>
      <p>All the aforementioned works are concerned with o ine MBT while our
approach is targeting online MBT. This provides the mechanism of e cient veri
cation by conformance testing the hypothesis about system current mode predicted
by the Markov model. To the best of authors' knowledge this is the rst work
to combine Markov models and UPTA for model checking and online MBT.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Online Model-Based Testing</title>
      <p>The state-based explosion problem experienced by many model-based o ine test
generation methods is avoided by the online techniques because only a limited
part of the state-space needs to be kept track of when a test is running. However,
exhaustive planning would be di cult on-the- y because of the limitations of
computational resources at the time of test execution. Thus, developing a
planning strategy for online testing should address the trade-o between reaction
time and online planning depth to reach the practically feasible test cases.</p>
      <p>
        The simplest approach to on-the- y selection of test stimuli in online MBT
is to apply so called random-walk strategy where no computation sequence of
IUT has an advantage over the others. The test is performed usually to discover
violations of input/output conformance relation IOCO [
        <xref ref-type="bibr" rid="ref14">15</xref>
        ] or timed
input/output conformance relation TIOCO [
        <xref ref-type="bibr" rid="ref6">7</xref>
        ] between the IUT and its model. Random
exploration of the state space may lead to test cases that are unreasonably long
and nevertheless may leave the test purpose unachieved. On the other hand, such
long test cases, when a test runs hours or even days, might help detect intricate
bugs that do not t under well-de ned test coverage criteria.
      </p>
      <p>
        In order to overcome the de ciencies of long lasting testing usually additional
heuristics, e.g. \reactive planning tester" [
        <xref ref-type="bibr" rid="ref16">17</xref>
        ], are applied for guiding the
exploration of the IUT state space. The extreme of guiding the selection of test stimuli
is exhaustive planning by solving at each test execution step a full constraint
system set by the test purpose and test planning strategy possibly leading to
the explosion of the state space. Therefore, model checking based approaches
are used mostly in o ine test generation.
      </p>
      <p>Another option for reducing the online test generation and planning overhead
is to partition the test models into smaller ones where the test cases do not need
the full blown model coverage. Following this idea we de ne in this paper the
test models by system availability modes so that each of the test models re nes
only one state (availability mode) of the abstract Markov model. By reducing
the size of test models in this way we can apply simple random-walk strategy
instead of those that require computationally expensive state space exploration.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Multi-Fragment Markov Models</title>
      <p>
        Kharchenko et al. [
        <xref ref-type="bibr" rid="ref12">13</xref>
        ] developed a set of potential scenarios of reaction for
veri cation of detected faults during execution of spacecraft software and de ned
a basic set of availability models. In order to assess the availability depending on
such scenarios a set of corresponding single- [
        <xref ref-type="bibr" rid="ref8">9</xref>
        ] and multi-fragment [
        <xref ref-type="bibr" rid="ref11">12</xref>
        ] Markov
models were developed. Some possible scenarios are as follows: SC1 - all possible
types of veri cation are performed. Online veri cation and correction of faults are
impossible during the ight; SC2 - all possible types of veri cation are performed.
Online veri cation is impossible during the ight. Some correction of faults is
possible and made only in case of detecting of fault; SC3 - all possible types of
veri cation are performed. Correction of all faults is performed; SC4 - all possible
types of veri cation are performed (in ground conditions and during the ight).
Correction of detected faults is performed. Blocking of parts of functions and
system degradation is possible.
      </p>
      <p>For the work in this paper we are concerned with scenarios SC3 and SC4.
The availability model corresponding to these scenarios is presented in Fig. 1.
The model includes a set of states and transitions caused by failures and repairs
of hardware and software and possibilities of failure detection and system repair.
There is a tree-like graph of transitions; the type of transition depends on the
type of event occurred: detecting of fault or start of veri cation process. The
graph models for scenarios SC3 and SC4 are equal; scenario SC4 models
additionally the degradation of system functions. Thus, the probability of transition
into the state of veri cation (and detecting of fault) may be higher for scenario
SC4. In Fig. 1 failure rate of both software and hardware is represented by .</p>
      <p>The availability model for the Bon re MPSoC inspired by this Markov-chain
based availability model will be presented and discussed in Section 6.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Uppaal Probabilistic Timed Automata</title>
      <p>
        Uppaal Timed Automata (UTA) [
        <xref ref-type="bibr" rid="ref5">6</xref>
        ] address behavioral and timing aspects of
systems providing e cient data structures and algorithms for their
representation and analysis through model checking. An Uppaal Timed Automaton (UTA)
is given as the tuple (L, E, V , CL, Init, Inv, TL), where L is a nite set of
locations, E is the set of edges de ned by E L G(CL; V ) Sync Act L,
where G(CL; V ) is the set of constraints in guards. Sync is a set of
synchronisation actions over channels. Act is a set of sequences of assignment actions
with integer and boolean expressions as well as with clock resets. V denotes the
set of integer and boolean variables. CL denotes the set of real-valued clocks
(CL \ V = ?). Init Act is a set of assignments that assigns the initial
values to variables and clocks. Inv : L ! I(CL; V ) is a function that assigns
an invariant to each location, I(CL; V ) is the set of invariants over clocks CL
and variables V . TL : L ! fordinary; urgent; committedg is the function that
assigns the type to each location of the automaton.
      </p>
      <p>
        Uppaal Probabilistic Timed Automata (UPTA) [
        <xref ref-type="bibr" rid="ref7">8</xref>
        ] is a stochastic and
statistical modeling extension of UTA. UPTA preserves the standard UTA input
language such as integer variables, data structures and user-de ned C-like
functions. Additionally, UPTA automata support branching edges where weights can
be added to give a distribution on discrete transitions. It is important to note
that rates and weights may be general expressions that depend on the states
and not just simple constants. For the work in this paper we use the branching
edges with probability weights.
6
      </p>
    </sec>
    <sec id="sec-6">
      <title>Availability MFMM and Mapping to UPTA</title>
      <p>The Bon re MPSoC employs a Network-on-Chip with a 2D mesh topology. Each
router uses wormhole switching equipped with fault tolerant mechanisms. A
processor is connected to each router via a network interface. The router comprises
of an input bu er, a routing computation unit, a switch allocator granting
requests to the same output based on Round-Robin policy and a crossbar switch to
forward the packets. An abstract view of Bon re is presented in Fig. 2. a. For this
paper we are considering an instantiation of the platform with four processors
and four routers. Since the routing mesh of Bon re is the IUT the availability
of which is studied in this paper, the test interface (denoted by dashed line in
Fig 2. a) is de ned by the interfaces between the network interfaces and routers,
i.e., the processors constitute an environment for the IUT.</p>
      <p>The availability model for Bon re is shown in Fig. 2. b. Note that for
simplicity we do not present a Multi-Fragment Markov model. Naturaly the multiple
fragments expand to the right of the rst fragment after software corrections. It
is assumed that the right-most fragment would not include any software faults.
The single fragment model of Fig. 2. b is adequate to be used for the
presentation of our integrated approach in this paper. The area within the dashed lines
in Fig. 2. b corresponds to the part of the Markov model which will be mapped
to UPTA for modeling of the mode switching and for stochastic model checking.</p>
      <p>Initially the system implements all functions according to the speci cation
and stays at the S0, normal operational mode. Due to possible hardware
(physical) faults the system can transit to modes S1 and S2 which model the degraded
and low operational modes we have de ned for this case study. State S3 models
the System Down mode where the system is not operable anymore. Due to
possible recovery functions the system operation can be restored from other states.
Moreover, in each operational mode, system failure might occur due to software
(design) fault causing the system to transit to state S4. This transition is
executed when the process of online MBT (which is applicable in each operational
mode) has detected a software fault. The online MBT process corresponds to the
veri cation process shown in the lower part of Fig. 1. For clarity it is not shown
explicitly in Fig. 2. b. We assume that the system software can be corrected by
some means, e.g. software update (not shown in Fig. 2. b), and the system can
then transit back to any of the operational modes where the fault occured.</p>
      <p>The UPTA model corresponding to the Markov Bon re model is presented
in Fig. 3. a. The transitions of the Markov model in Fig. 2. b are mapped
to probabilistic transitions (denoted by dotted line and labeled with
probabilities) of UPTA shown in Fig. 3. a. The probabilities of UPTA are computed
based on failure rates of Fig. 2. b. They specify the probabilities of events that
cause transition from one mode to another. The probabilities of events that
trigger transitions are normalized with respect to the model time unit denoted by
tu. Combining the probabilities with explicit clock constraints in the model of
Fig. 3.a is needed for SMC of timing properties.</p>
      <p>The UPTA automata that interface the abstract availability model in Fig. 3.a
with detailed mode behavior models are shown in Fig. 3.b. Initially all automata
are in location Passive waiting for synchronisation from the Mode switching
automaton. Upon synchronisation they will either return back to the Passive
location or the relevant internal behavior of a mode will be triggered.
Locations Actions of Mn, Actions of Md and Actions of Ml represent respectively
each mode which are elaborated in the next subsections.
7</p>
    </sec>
    <sec id="sec-7">
      <title>UPTA Models of the Bon re MPSoC</title>
      <p>We have created the models of the main components of the Bon re MPSoC
platform, namely, the processor and the router considering an instantiation of
the platform with four processors and four routers. These models can be used
for online MBT for each di erent operational mode of the system. The
processor component model comprises the behavioral view that is assumed to be
unchanging throughout the modes and the router component models comprise the
behaviors in normal, degraded and low mode that represent respectively
functioning under ideal conditions, the reliability and security views. Here by views
we mean design views which should be consistent with each other to ensure the
soundness of design.</p>
      <p>The reliability view concerns the probability of data packet transmission
failure on any link between processors and routers as well as between the routers.
The security view concerns the possibility of cyber attack to some processor
after which the attack should be detected by the tra c pattern generated by this
processor and the attacked processor should be blocked. Note that the timing
view is implicitly conjoined with the aforementioned views due to the modeling
formalism. Thus, in this paper the behavioral view of Bon re relates to the
normal operational mode of the system, the reliability view relates to the degraded
mode with all processors still operating and the security view relates to the low
mode. If more than one processors are blocked then the system is shut down.
7.1</p>
      <sec id="sec-7-1">
        <title>Behavioral view</title>
        <p>The UPTA templates representing the behavioral view of the processors and
routers are shown in Fig. 4 a and Fig. 4 b, respectively. The environment to
the routing system consists of four processors which are instantiated with four
processes, each sending and receiving frames to and from the routing system.
The routing system is modeled as UPTA processes parameterized with source
and destination router id-s respectively. The router template speci es (i) the
case where there is no frame in its input queue (the edge from W ait location
down) and (ii) the case where there is at least one frame in the input queue to
be forwarded to the next router (the edge from W ait location to right and its
subsequent edges and locations reachable before return to location W ait).</p>
        <p>The composed model of the behavioral view represents design assumptions
A1 to A10 and guarantees G1 to G3 of routing as follows. A1 - Processors are
indexed clock-wise from 0 to 3 in the mesh and denoted respectively with Pi,
where i : [0; 3]. The same holds for local routers Ri; A2 - Processors communicate
by sending and receiving frames; A3 - Any processor Pi can send at most one
frame per tu to its local router Ri; A4 - Any pair of neighbor routers has direct
communication link in two directions, a link(i; j) denotes a link from Ri to Rj
and link(j; i) a link from Rj to Ri, where each link link(i; j) has a bu er buf (i; j)
to store the frame postponed due to congestion; A5 - An oldest element in the
bu er buf (i; j) is forwarded along the link link(i; j); A6 - Bu er emptiness is
checked and content sent once at any tu; A7 - A frame is written by router Ri
to bu er buf (i; j) of its outgoing link link(i; j) during the same tu when it is
read from some of its incoming link link(k; i); A8 - Congestion rises when the
frames of di erent incoming links link(i; j) and link(k; j) of router Rj arriving
in the same tu need to be forwarded along the same outgoing link link(j; l); A9
- The congestion can rise at most between two incoming links in one tu; A10
The frames are identi ed by their source and destination processor id-s.</p>
        <p>The explicit design guarantees for the processors and routers are as follows.
G1 - Any frame sent from a processor Pi does not have congestion on any link
with some other frame sent from the same processor Pi; G2 - The frames once
routed along link(i; j) are never routed backwards along link(j; i); G3 - In the
routing system satisfying assumptions A1 to A10 any frame can be routed to
its destination with at most three hops, i.e. one along local link and two along
links between routers while the congestion can occur in inter router link only.
We additionally assume that the frames are never sent to the processor itself
and reading a frame by processor from the routing system never blocks.</p>
        <p>Each router in normal mode implements the design assumptions A4 A7 and
provides the guarantees G2, G3 and ensures that no package loss occurs.
7.2</p>
      </sec>
      <sec id="sec-7-2">
        <title>Reliability view</title>
        <p>The UPTA template for the reliability view of the system is presented in the
upper part of Fig. 5. While the processor template remains the same, the routing
template for the reliability view extends the behavioral view assumptions with
the assumptions about the correct delivery of the frame over the link between
routers is p and frame transmission failure with probability 1 p. The re nement
of the edge with label \Forward the frame" with two alternative outcomes - one
for successful and the other for failure of transmission between a pair of routers
introduces probabilities p and 1 p respectively of these options. The guarantees
G2 and G3 still hold. The probability of packet delivery with two hops and with
the same upper time bound as in behavioral view is p2.
7.3</p>
      </sec>
      <sec id="sec-7-3">
        <title>Security view</title>
        <p>The UPTA model template for the security view of the system is presented in
the lower part of Fig. 5. The assumptions of the security view maintain the
assumptions of the behavioral view regarding writing and reading frames to and
from processors. The assumptions are extended with the possibility of cyber
attack resulting in the corruption of processor code in one of the processors P0
P3. We have to introduce a new guarantee G4 which ensures that the detection
of the attack occurs at latest during r tu after corrupted code is activated in a
processor Px. The detection is implemented by monitoring the tra c between
a processor Px and its local router Rx, i.e the frames sent over link(x; x) (see
edge &lt; s1 1; s1 2 &gt; in the template).</p>
        <p>Another guarantee related to attacks is G5 which ensures that the processor
Px under attack (with corrupted code) should not interfere with the functioning
of the routing system including Rx. This is implemented as follows: when the
number of consecutive sends from processor Px to some processor Pj exceeds a
threshold value r then Boolean variable attack is assigned the value true causing
the link link(x; x) from Px to Rx to be blocked for further communication with
Px (edge &lt; W ait; s1 1 &gt; is not enabled). Note that router Rx can still forward
packages from other routers.
7.4</p>
      </sec>
      <sec id="sec-7-4">
        <title>Correctness properties</title>
        <p>Proving the correctness of the model of the IUT means that the guarantees of
the routing system design need to be veri ed provided the assumptions A1 to
A10 are properly implemented and represented in the design models as of Fig 4
to Fig 5. In the following we introduce some examples of integral QoS related
assume-guarantee properties that rely on above mentioned design assumptions
and guarantees.</p>
        <p>For the behavioral view, property i) states that any frame sent from processor
Pi to Pj for i; j = 0; :::; M 1 where i 6= j, will reach its destination at most with
t k time units. Property ii) states that under given environment assumptions
(including the contention mode) the length of message queue buf (i; j) at any
link(i; j) does not exceed the bu er size BS.</p>
        <p>For the reliability view, property i) states that any frame sent from processor
Pi to Pj for i; j = 0; :::; M 1 where i 6= j, will reach its destination during k
time units with probability p k. Property ii) states that under given environment
assumptions (message loss rate) the length of message queue buf (i; j) at any link
(i; j) does not exceed the bu er size BS with probability p l.</p>
        <p>For the security view, property i) states that the maximum time of cyber
attack detection and mitigation (processor blocking) has upper bound. Property
ii) states that in case of attack the maximum package delivery time of remaining
routing system does not drop below t k time units.
7.5</p>
      </sec>
      <sec id="sec-7-5">
        <title>Veri cation of Router's Multi-View Operational Modes</title>
        <p>Let us elaborate on the veri cation of the interrelated properties regarding the
sending of data frames to their destination address of the views that could
interfere. Similar reasoning holds for the veri cation of the interrelated properties
regarding the bu er size for the behavioral and reliability views.</p>
        <p>For verifying property i) of the behavioral view we construct a property
recognizing automaton by applying a \Stopwatch" UPTA template (see Fig. 6)
and compose it with the behavioral model by synchronizing Stopwatch start
action with frame send action from processor Pi to router Ri and stop action
with receive action when the frame is sent to link Rj Pj . There are several
veri cation assumptions as follows. Since the routing architecture is North-South
and East-West symmetric, the maximum transport delay can be measured from
any processor Pi to processor Pj where i 6= j and Pi and Pj are in the mesh
opposite diagonal corners. Veri cation of Pi to Pj transport delay can be done
w.r.t. any generated single frame separately without considering the full ow
from same Pi because of G1. Frame generation time instant T gen at Pi can
vary from 0 to load stabilization time in the routing system. Time out T out, i.e
the upper time bound we check can be 6 since due to the topology maximum 2
hops should be performed to reach the destination and each hop may have one
congestion at most due to G2 (to one link i; j, where i 6= j only Pi and Ri can
compete). To identify the receive event for model checking end-to-end transfer
time we have to encode also the sender address Pi in the traceable frame. So
we use encoding of frames as a pair of constants where the rst corresponds to
source address and the second to destination address. AB means P0 sends to P1,
DB means P3 sends to P1, etc.</p>
        <p>Stopwatch automaton is used for verifying the guarantee that the
end-toend delay upper bound is T out. This is proven by model checking MB j=
A Stopwatch:P ass.</p>
        <p>In addition to the veri cation scheme for property i) of the behavioral view,
property i) of the reliability view for successful end-to-end delivery needs to be
calculated by adding an update: p route = p route pij , to each router process
transition labeled with \Forward the frame" where pij denotes the probability
of successful transmission over link(i; j) provided the link is on the route. Under
the assumptions of the given view the validity of the guarantee of the property
is veri ed by checking MRel j= A Stopwatch:P ass &amp;&amp; p route &gt;= p k.</p>
        <p>Similarly to verifying property i) of the behavioral view, the model
checking task for verifying interrelated property ii) of the security view is MSec j=
A Stopwatch:P ass.
8</p>
      </sec>
    </sec>
    <sec id="sec-8">
      <title>Online MBT of Bon re MPSoC Execution Modes</title>
      <p>
        In the case of online test generation the model is executed in lock step with the
IUT. The communication between the model and the IUT involves controllable
inputs of the IUT and observable outputs of the IUT. For UPTA there exists the
online MBT tool Uppaal Tron [
        <xref ref-type="bibr" rid="ref2">3</xref>
        ]. The UPTA models developed in Section 7 for
conformance testing of Bon re MPSoC modes consist of IUT which is the routing
system and the environment of IUT which consists of processors. Interactions
between the environment and IUT constitute the symbolic representation of
the test run against which the conformance of real I/O sequences are checked.
Since we have a di erent IUT model for each mode the test cases concern only
those models that correspond to the mode. As mentioned before the models of
environment, i.e. processors are the same in all test cases.
      </p>
      <p>The overall test setup used in the context of MBT with Uppaal Tron as
the test engine and dTron [1] as the adapter generation framework is given
in Fig. 7. The test model represents symbolically the interaction between IUT
and its environment components. The test adapter is responsible for translating
symbolic I/O of the test model to frames passed to the routing system and
mapping the frames received at the destination processor back to model symbolic
output. The dTron layer allows the adapters to be distributed over the routing
system ports while ensuring that measuring the model time is in synchrony with
physical clocks at I/O ports.</p>
      <p>The test con guration used in the current work consists of test execution
environment dTron and one test adapter per processor-router link that
transforms abstract input/output symbols of the model to input/output data of the
IUT. The setup is outlined in Fig. 7. Uppaal Tron is used as a primary test
execution engine which simulates symbolic interactions between the IUT and its
environment. The interactions are monitored during model execution. When the
environment (one of the processors in the model) initiates an input action i Tron
triggers input data generation in the adapter and the actual test data is
written to the IUT (implemented routers) interface. In response to that, the receive
event at destination processor port produces output data that is transformed
back to symbolic output o. Thereafter, the equivalence between the real output
returned and the output o speci ed in the model is checked. The run continues
if there is no conformance violation, i.e. there exists an enabled transition in the
model with parameters equivalent to those passed by the IUT. In addition to
input/output conformance, the real-time input/output conformance is checked
by Uppaal Tron.
9</p>
    </sec>
    <sec id="sec-9">
      <title>Conclusions</title>
      <p>In this paper we have addressed the online monitoring and model-based
validation techniques for mission critical systems. We propose an integrated approach
where the MFMM are used for specifying the system reliability and security
related behavior on high-level of abstraction relevant for Markov analysis, and the
more concrete state and timing constraints related with MFMM are speci ed
explicitly using UPTA for stochastic modeling and model-based test generation.
To interrelate these two model classes we have shown the mapping from MFMM
to UPTA. The second contribution is the test case selection mechanism for online
testing where the test cases are prioritized by the probabilities of modes. The
hypotheses on which mode the system switches next are provided by MFMM
and the hypothesis are tested by conformance tests using UPTA models that
specify the mode behavior. The approach is illustrated with the Bon re MPSoC
where the probabilistic model checking of high-level mode switching scenarios is
applied on MFMM. A set of UPTA models that re nes the behavior of MFMM
modes is applied thereafter as a test suite for model-based conformance testing
to con rm the hypothesis of being in the given mode.</p>
      <p>As future work, more practical experiments are planned for quantitative
analysis to estimate how much the probability guided online testing shortens the time
of identifying system availability mode in time-critical applications.
Acknowledgements This research was supported by the Estonian Ministry
of Education and Research institutional research grant no. IUT33-13 and in
part by projects H2020 RIA IMMORTAL, H2020 TWINN TUTORIAL and by
European Union through the European Structural and Regional Development
Funds.
1. dTron, https://cs.ttu.ee/dtron/</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          2.
          <string-name>
            <surname>ECSS-E-</surname>
          </string-name>
          40-
          <fpage>05</fpage>
          . Software Veri cation,
          <source>Validation and Testing</source>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Uppaal</given-names>
            <surname>Tron</surname>
          </string-name>
          , http://people.cs.aau.dk/~marius/tron/
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          4. Bon re project wiki (
          <year>2017</year>
          ), https://github.com/Project-Bon re/Bon re/wiki
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          5.
          <string-name>
            <surname>Aupperle</surname>
          </string-name>
          , B., Meyer, J.:
          <article-title>State space generation for degradable multiprocessor systems</article-title>
          . In:
          <string-name>
            <surname>Fault-Tolerant Computing</surname>
          </string-name>
          ,
          <year>1991</year>
          . FTCS-
          <volume>21</volume>
          . Digest of Papers., TwentyFirst International Symposium. IEEE (
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          6.
          <string-name>
            <surname>Behrmann</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>David</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Larsen</surname>
            ,
            <given-names>K.G.</given-names>
          </string-name>
          :
          <article-title>A tutorial on uppaal</article-title>
          . In: Bernardo,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Corradini</surname>
          </string-name>
          ,
          <string-name>
            <surname>F</surname>
          </string-name>
          . (eds.) SFM-RT
          <year>2004</year>
          .
          <article-title>LNCS</article-title>
          , vol.
          <volume>3185</volume>
          , pp.
          <volume>200</volume>
          {
          <fpage>237</fpage>
          . Springer Verlag (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          7.
          <string-name>
            <surname>Brinksma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tretmans</surname>
          </string-name>
          , J.:
          <article-title>Testing transition systems: An annotated bibliography</article-title>
          . In: Cassez,
          <string-name>
            <given-names>F.</given-names>
            ,
            <surname>Jard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Rozoy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Ryan</surname>
          </string-name>
          , M.D. (eds.)
          <article-title>Modeling and Veri cation of Parallel Processes: 4th Summer School</article-title>
          , MOVEP 2000, France,
          <source>2000 Revised Tutorial Lectures</source>
          . pp.
          <volume>187</volume>
          {
          <fpage>195</fpage>
          . Springer Berlin Heidelberg, Berlin, Heidelberg (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          8.
          <string-name>
            <surname>Bulychev</surname>
            ,
            <given-names>P.E.</given-names>
          </string-name>
          , et al.:
          <article-title>UPPAAL-SMC: Statistical model checking for priced timed automata</article-title>
          . In: Wiklicky,
          <string-name>
            <given-names>H.</given-names>
            ,
            <surname>Massink</surname>
          </string-name>
          , M. (eds.)
          <source>Proceedings 10th Workshop on Quantitative Aspects of Programming Languages and Systems</source>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          9.
          <string-name>
            <surname>Guimaraes</surname>
            ,
            <given-names>A.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Oliveira</surname>
            ,
            <given-names>H.M.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barros</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maciel</surname>
            ,
            <given-names>P.R.</given-names>
          </string-name>
          :
          <article-title>Availability analysis of redundant computer networks: A strategy based on reliability importance</article-title>
          .
          <source>In: IEEE 3rd International Conference on Communication Software and Networks (ICCSN)</source>
          ,
          <year>2011</year>
          . IEEE (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          10.
          <string-name>
            <surname>Kashyap</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Holzer</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sarkani</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eveleigh</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Model based testing for software systems: An application of markov modulated markov process</article-title>
          .
          <source>International Journal of Computer Applications</source>
          <volume>46</volume>
          (
          <issue>14</issue>
          ),
          <volume>13</volume>
          {20 (May
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kemeny</surname>
            ,
            <given-names>J.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Snell</surname>
            ,
            <given-names>J.L.</given-names>
          </string-name>
          : Finite Markov Chains. Springer-Verlag New York (
          <year>1976</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          12.
          <string-name>
            <surname>Kharchenko</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Odarushchenko</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Odarushchenko</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Popov</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Selecting mathematical software for dependability assessment of computer systems described by sti markov chains</article-title>
          .
          <source>In: Proc. 9th International Conference on ICT in Education, Research and Industrial Applications: Integration, Harmonization and Knowledge Transfer (ICTERI</source>
          <year>2013</year>
          ). vol.
          <volume>1000</volume>
          , pp.
          <volume>146</volume>
          {
          <fpage>162</fpage>
          .
          <string-name>
            <surname>CEUR-WS</surname>
          </string-name>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          13.
          <string-name>
            <surname>Kharchenko</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ponochovnyi</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boyarchuk</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <source>Availability Assessment of Information and Control Systems with Online Software Update and Veri cation</source>
          . Springer International Publishing (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          14.
          <string-name>
            <surname>Siegl</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dulz</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>German</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Ki e, G.:
          <article-title>Model-driven testing based on markov chain usage models in the automotive domain</article-title>
          . In: Waeselynck, H. (ed.)
          <source>12th European Workshop on Dependable Computing, EWDC</source>
          <year>2009</year>
          , Toulouse, France (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          15.
          <string-name>
            <surname>Tretmans</surname>
          </string-name>
          , J.:
          <article-title>Testing concurrent systems: A formal approach</article-title>
          . In: Baeten,
          <string-name>
            <given-names>J.C.M.</given-names>
            ,
            <surname>Mauw</surname>
          </string-name>
          , S. (eds.)
          <source>CONCUR'99 Concurrency Theory: 10th International Conference Eindhoven, The Netherlands</source>
          ,
          <year>1999</year>
          Proceedings. pp.
          <volume>46</volume>
          {
          <fpage>65</fpage>
          . Springer Berlin Heidelberg, Berlin, Heidelberg (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          16.
          <string-name>
            <surname>Trivedi</surname>
            ,
            <given-names>K.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>D.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Roy</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Medhi</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Dependability and security models</article-title>
          .
          <source>In: Proceedings of 7th International Workshop on Design of Reliable Communication Networks</source>
          ,
          <year>2009</year>
          .
          <article-title>DRCN 2009</article-title>
          . IEEE (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          17.
          <string-name>
            <surname>Vain</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kaaramees</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Markvardt</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Online testing of nondeterministic systems with the reactive planning tester</article-title>
          . In: Petre,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Sere</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Troubitsyna</surname>
          </string-name>
          , E. (eds.) Dependability and Computer Engineering:
          <article-title>Concepts for Software-Intensive Systems</article-title>
          . pp.
          <volume>113</volume>
          {
          <fpage>150</fpage>
          .
          <string-name>
            <surname>Hershey</surname>
          </string-name>
          , PA: IGI Global (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          18.
          <string-name>
            <surname>Veanes</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , et al.:
          <article-title>Formal methods and testing</article-title>
          .
          <source>chap. Model-based Testing of Object-oriented Reactive Systems with Spec Explorer</source>
          , pp.
          <volume>39</volume>
          {
          <fpage>76</fpage>
          . Springer-Verlag, Berlin, Heidelberg (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          19.
          <string-name>
            <surname>Whittaker</surname>
            ,
            <given-names>J.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Thomason</surname>
            ,
            <given-names>M.G.</given-names>
          </string-name>
          :
          <article-title>A markov chain model for statistical software testing</article-title>
          .
          <source>IEEE Trans. Softw. Eng</source>
          .
          <volume>20</volume>
          (
          <issue>10</issue>
          ),
          <volume>812</volume>
          {824 (Oct
          <year>1994</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>