<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Workshop on Artificial Intelligence and Formal Verification, Logic, Automata,
and Synthesis, September</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Statistical Model Checking for the Analysis of Mission- and Safety-Critical Cyber-Physical Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Angela Pappagallo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Computer Science Dept., Sapienza University of Rome</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <volume>22</volume>
      <issue>2021</issue>
      <abstract>
        <p>Many autonomous Cyber-Physical Systems (CPSs) (e.g., autonomous vehicles, IoT or medical devices, etc.) are mission- or safety-critical (i.e., errors may result in, resp., loss of money or human deaths). This motivates research for their eficient formal verification. Unfortunately, verifying a CPS entails evaluating a prohibitively huge number of scenarios. In this short paper, we show the maturity, feasibility and flexibility of Statistical Model Checking by reviewing 3 recent case studies of its successful application to real-world mission- and safety-critical CPSs in areas as diverse as smart grids, in silico medicine, wireless sensor networks.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In a Cyber-Physical System (CPS), a (continuous) physical system (plant) is controlled
and/or monitored by a (discrete) software. The deployment of autonomous CPSs [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ],
such as, e.g., devices for Internet of Things (IoT) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], Unmanned Autonomous Vehicles [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]
and medical devices [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], has been speeding up for the last decades, with a projected $1.1
trillion global speding on IoT only [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. For many of such CPSs, it is important to rule
out errors [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], especially in the software part, since they may lead to a) loss of money in
mission-critical systems [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] (e.g., the 1996 Ariane 5 rocket incident, due to a software type
conversion error, resulted in a $500 million loss); b) death or serious injury for people in
safety-critical systems [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] (e.g., clinical treatments or medical devices).
      </p>
      <p>
        Unfortunately, standard testing could not provide the required degree of correctness
assurance, and this motivates research on eficient formal verification methods. There are
multiple challenges to overcome when formally verifying a CPS, e.g., the complexity of
the system dynamics, the huge number of scenarios to be evaluated (scenario explosion,
e.g., [
        <xref ref-type="bibr" rid="ref10 ref11 ref12 ref13 ref14 ref15 ref9">9, 10, 11, 12, 13, 14, 15</xref>
        ]) and the lack of a unified mathematical model for both the
discrete cyber and the continuous physical parts (e.g., [
        <xref ref-type="bibr" rid="ref16 ref17">16, 17</xref>
        ]). Such issues make it hard
to apply analytical approaches based on logics or automata, e.g., [
        <xref ref-type="bibr" rid="ref18 ref19 ref20 ref21 ref22">18, 19, 20, 21, 22</xref>
        ].
      </p>
      <p>
        Statistical Model Checking (SMC) [
        <xref ref-type="bibr" rid="ref23">23, 24</xref>
        ] aims at overcoming such obstructions by
using statistical methods to sample the set of scenarios up to desired accuracy and
precision, while possibly relying on black-box models of the System Under Verification
(i.e., the full system encompassing both the software and the plant), for example available
only via a simulator.
      </p>
      <p>
        In this short paper, we review 3 recent real-world case studies, from very diverse
application areas (smart grids, in silico medicine, wireless sensor networks), which were
successfully addressed via SMC. This shows the feasibility and flexibility of SMC when
applied to real-world mission- and safety-critical systems. A complete survey of SMC
methodologies can be found in, e.g., [
        <xref ref-type="bibr" rid="ref23">23, 24</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Peak Shaving in Smart Grids</title>
      <p>An Electric Distribution Network (EDN) [25] is composed of several substations, each
serving a set of residential households. By using the measurements taken from the home
electricity mains, we know each house power demand, with periodicity at least one hour.
Our objective is to reduce costs for the Distribution System Operator (DSO), by limiting
the demand drawn at each substation at times of peak demand (peak shaving). This
reduces the amount of electricity purchased on the market at peak prices, and reduces
overloading of network components (hence, substation ageing).</p>
      <p>Many works address this problem. Here, we focus on the
methodology in [27, 28, 29, 26, 30], for which SMC-based Jan
verification is proposed. Namely, the problem of achieving MFeabr
peak shaving is solved by proposing two intelligent services. Apr
Whilist the EDN Virtual Tomography (EVT) service com- May
putes time-varying upper bounds for the Aggregated Power JJuunl
Demand (APD) of the households  connected to a sub- Aug
station  yielding low operational costs for the DSO, the SOecpt
Demand-Aware Price Policy (DAPP) service computes in- Nov
edaivcihduhaoluisseedhotlidmien- va.ryIifnag huopupseehrobldouknedepssfoitrstdheemdaenmdabnedloowf Dec0 100 200 300 400 500
such bounds, a low energy tarif is applied, otherwise an Figure 1: APD prob. [26]
high tarif is applied. If all households succeed in keeping
their demand below their bounds (by performing load shifting), the APD on  will be
below the bound computed by EVT. However, there is no guarantee that such an indirect
steering of the demand of each household will be successful. In [26], a domain-specific
highly parallel statistical model checker (Aggregated Power Demand Analyzer, APD-A)
is designed, which estimates the probability distribution of the APD given probabilistic
deviations from the expected demands of each household. Figure 1 shows the APD-A
results for a set of 186 houses in Denmark.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Virtual Patients for In Silico Clinical Trials</title>
      <p>A major problem in medicine is assessing safety and eficacy of pharmacological drugs,
medical devices and treatment strategies. In the last years, a research area called In
Silico Clinical Trials (ISCT) has emerged [31], with the aim of using Computer Science
techniques to decrease time and cost for the experimentations, reducing animal and
human testing, prioritising in vivo clinical trials, and enabling precision medicine. A
cornerstone of ISCT is the simulation of the therapy/device under assessment on a
population of Virtual Patients (VPs). VPs are typically computed by parameterising
quantitative mechanistic Virtual Physiological Human (VPH) models, in turn defined
by encoding qualitative knowledge of the human physiology of interest [32, 33]. For an
ISCT to provide compelling evidence of the safety/eficacy of a therapy, such populations
of VPs must be complete, i.e., representative of the entire spectrum of behaviours deemed
of interest (in order not to skip significant behaviors).</p>
      <p>In [35, 36, 34], SMC is used to drive intelligent global
search in the VPs parameter space to compute a complete
population of VPs starting from a (non-identifiable) VPH
model and suitable biological knowledge. The
efectiveness of the approach was proven on a (diferential equation–
based) model of the female hypothalamic-pituitary-gonadal
axis [37], for which a population of as many as 4,830,264
VPs stratified into layers at diferent level of granularity of
behaviours was generated (Figure 2 shows the possible time
courses of the Estradiol hormone in the diferent VP layers), Figure 2: Estradiol [34]
and whose completeness was evaluated against retrospective
health records. Such VPs were then used in [38, 39] to
compute, again in silico, optimal robust personalised treatments for assisted reproduction, an
area currently showing many factors that can be hardly kept under full control [40, 41, 42].
Namely, digital twins of human patients were computed by selecting those VPs best
matching clinical measurements on them, and a black-box simulator of the VPH model
in [37] was driven [43] via intelligent backtracking on such digital twins.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Wireless Sensors Network</title>
      <p>The last case study consists of a low-level engineering application, namely an audio
streaming application over a Wi-Fi network. Such an application is representative of
a wide area of applications on networked systems [44, 45]. In such a network, several
nodes are equipped with microphones which produce diferent audio streams and are
transmitted to a base station equipped with a speaker to play the received audio. The
goal is to ensure the synchronization between the diferent nodes of the network, in
order to guarantee a consistent audio output. To this extent, in [46, 47] a Phase Locked
Loop (PLL) synchronization protocol [48] is designed so that all nodes in the network
agree on a synchronized clock, within a 1 tolerance. In order to show that the PLL
synchronization protocol fulfills the main design requirement, the SBIP statistical model
checker [49], which is based on the Behaviour, Interaction, Priority (BIP) framework [50],
is used. Namely, the following property were verified: it must hold that the diference
between the Master clock   and the software clock, computed in every Slave   , must
be within a given bound Δ with high probability and accuracy. The obtained result was
that, for the considered setting, the smallest bound that ensures the synchronisation is
Δ = 76 .</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusions</title>
      <p>In this short paper, we showed the maturity, feasibility and flexibility of Statistical Model
Checking in the verification of real-world mission- and safety-critical CPSs, by reviewing
some of its recent applications to real-world case studies, in areas as diverse as smart
grids, in silico medicine, wireless sensor networks.
[24] A. Pappagallo, et al., Monte carlo based statistical model checking of cyber-physical systems:</p>
      <p>A review, Information 11 (2020).
[25] D. R. Patrick, et al., Electrical Distribution Systems, 2nd Ed., Pearson, 2009.
[26] T. Mancini, et al., Parallel statistical model checking for safety verification in smart grids,
in: SmartGridComm 2018, IEEE, 2018.
[27] T. Mancini, et al., Demand-aware price policy synthesis and verification services for smart
grids, in: SmartGridComm 2014, IEEE, 2014.
[28] T. Mancini, et al., User flexibility aware price policy synthesis for smart grids, in: DSD 2015.
[29] B. Hayes, et al., Residential demand management using individualised demand aware price
policies, IEEE Trans Smart Grid 8 (2017).
[30] I. Melatti, et al., A two-layer near-optimal strategy for substation constraint management
via home batteries, IEEE Trans Ind Elect (2021). To appear.
[31] F. Pappalardo, et al., In silico clinical trials: concepts and early adoptions, Brief Bioinf 20
(2019).
[32] M. Kanehisa, et al., Kegg: New perspectives on genomes, pathways, diseases and drugs,</p>
      <p>Nucl Ac Res 45 (2017).
[33] A. Fabregat, et al., The Reactome pathway knowledgebase, Nucl Ac Res 46 (2018).
[34] S. Sinisi, et al., Complete populations of virtual patients for in silico clinical trials, Bioinf 36
(2021).
[35] E. Tronci, et al., Patient-specific models from inter-patient biological models and clinical
records, in: FMCAD 2014, IEEE, 2014.
[36] T. Mancini, Computing biological model parameters by parallel statistical model checking,
in: IWBBIO 2015, LNCS 9044, Springer, 2015.
[37] S. Röblitz, et al., A mathematical model of the human menstrual cycle for the administration
of GnRH analogues, J Theor Biol 321 (2013).
[38] T. Mancini, et al., Computing personalised treatments through in silico clinical trials. A
case study on downregulation in assisted reproduction, in: RCRA 2018, CEUR 2271, 2018.
[39] S. Sinisi, et al., Optimal personalised treatment computation through in silico clinical trials
on patient digital twins, Fund Inf 174 (2020).
[40] B. Leeners, et al., Lack of associations between female hormone levels and visuospatial
working memory, divided attention and cognitive bias across two consecutive menstrual
cycles, Front Behav Neur 11 (2017).
[41] M. Hengartner, et al., Negative afect is unrelated to fluctuations in hormone levels across
the menstrual cycle: Evidence from a multisite observational study across two successive
cycles, J Psych Res 99 (2017).
[42] B. Leeners, et al., Associations between natural physiological and supraphysiological estradiol
levels and stress perception, Front Psycol 10 (2019).
[43] S. Sinisi, et al., Reconciling interoperability with eficient verification and validation within
open source simulation environments, Sim Mod Pract Theory 109 (2021).
[44] A. Lekidis, et al., A model-based design flow for can-based systems, in: iCC 2013.
[45] A. Lekidis, et al., Using BIP to reinforce correctness of resource-constrained iot applications,
in: SIES 2015, IEEE, 2015.
[46] A. Lekidis, et al., Building distributed sensor network applications using BIP, in: SAS 2015.
[47] A. Nouri, et al., Performance Evaluation of Stochastic Real-Time Systems with the SBIP</p>
      <p>Framework, Int J Critical Comp-Based Sys (2018).
[48] K. Choi, et al., Phase-Locked Loop and Synchronization, Wiley-IEEE, 2016.
[49] B. L. Mediouni, et al., SBIP 2.0: Statistical Model Checking Stochastic Real-time Systems,
in: ATVA 2018, Springer, 2018.
[50] A. Basu, et al., Modeling heterogeneous real-time components in BIP, in: SEFM 2006.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <article-title>Principles of Cyber-Physical Systems</article-title>
          , MIT,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M.</given-names>
            <surname>Zimmerling</surname>
          </string-name>
          , et al.,
          <article-title>Adaptive real-time communication for wireless cyber-physical systems</article-title>
          ,
          <source>ACM TCPS 1</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>W.</given-names>
            <surname>Koch</surname>
          </string-name>
          , et al.,
          <article-title>Reinforcement learning for UAV attitude control</article-title>
          ,
          <source>ACM TCPS 3</source>
          (
          <year>2019</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>N.</given-names>
            <surname>Dey</surname>
          </string-name>
          , et al.,
          <article-title>Medical cyber-physical systems: A survey</article-title>
          ,
          <source>J Med Sys</source>
          <volume>42</volume>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5] Statistics on IoT Spending, https://www.statista.com/topics/2637/internet-of-things,
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>B.</given-names>
            <surname>Dowdeswell</surname>
          </string-name>
          , et al.,
          <article-title>Finding faults: A scoping study of fault diagnostics for industrial cyber-physical systems</article-title>
          ,
          <source>J Sys Softw</source>
          <volume>168</volume>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Banerjee</surname>
          </string-name>
          , et al.,
          <article-title>Ensuring safety, security, and sustainability of mission-critical cyber-physical systems</article-title>
          ,
          <source>Proc IEEE 100</source>
          (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R.</given-names>
            <surname>Mitchell</surname>
          </string-name>
          , et al.,
          <article-title>Behavior rule specification-based intrusion detection for safety critical medical cyber physical systems</article-title>
          ,
          <source>IEEE Trans Dep Sec Comp</source>
          <volume>12</volume>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mancini</surname>
          </string-name>
          , et al.,
          <article-title>System level formal verification via distributed multi-core hardware in the loop simulation</article-title>
          ,
          <source>in: PDP</source>
          <year>2014</year>
          , IEEE,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mancini</surname>
          </string-name>
          , et al.,
          <article-title>SyLVaaS: System level formal verification as a service</article-title>
          ,
          <source>in: PDP</source>
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mancini</surname>
          </string-name>
          , et al.,
          <article-title>Anytime system level verification via random exhaustive hardware in the loop simulation</article-title>
          ,
          <source>in: DSD</source>
          <year>2014</year>
          , IEEE,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mancini</surname>
          </string-name>
          , et al.,
          <article-title>Anytime system level verification via parallel random exhaustive hardware in the loop simulation</article-title>
          ,
          <source>Micropr Microsys</source>
          <volume>41</volume>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mancini</surname>
          </string-name>
          , et al.,
          <article-title>SyLVaaS: System level formal verification as a service</article-title>
          ,
          <source>Fund Inf</source>
          <volume>149</volume>
          (
          <issue>1-2</issue>
          ) (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mancini</surname>
          </string-name>
          , et al.,
          <article-title>On minimising the maximum expected verification time</article-title>
          ,
          <source>IPL</source>
          <volume>122</volume>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mancini</surname>
          </string-name>
          , et al.,
          <article-title>Any-horizon uniform random sampling and enumeration of constrained scenarios for simulation-based formal verification</article-title>
          ,
          <source>IEEE TSE</source>
          (
          <year>2021</year>
          ). To appear.
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>E. A.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <article-title>Fundamental limits of cyber-physical systems modeling</article-title>
          ,
          <source>ACM TCPS 1</source>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>F.</given-names>
            <surname>Maggioli</surname>
          </string-name>
          , et al.,
          <article-title>SBML2Modelica: Integrating biochemical models within open-standard simulation ecosystems</article-title>
          ,
          <source>Bioinf</source>
          .
          <volume>36</volume>
          (
          <year>2020</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>G.</given-names>
            <surname>Della Penna</surname>
          </string-name>
          , et al.,
          <article-title>Bounded probabilistic model checking with the Mur verifier</article-title>
          ,
          <source>in: FMCAD</source>
          <year>2004</year>
          , IEEE,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>M.</given-names>
            <surname>Cadoli</surname>
          </string-name>
          , et al.,
          <article-title>SAT as an efective solving technology for constraint problems</article-title>
          ,
          <source>in: ISMIS</source>
          <year>2006</year>
          , LNCS 4203, Springer,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>M.</given-names>
            <surname>Cadoli</surname>
          </string-name>
          , et al.,
          <article-title>Combining relational algebra, SQL, constraint modelling, and local search</article-title>
          ,
          <source>Theor Pract Logic Programm</source>
          <volume>7</volume>
          (
          <year>2007</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>T.</given-names>
            <surname>Mancini</surname>
          </string-name>
          , et al.,
          <article-title>Combinatorial problem solving over relational databases: View synthesis through constraint-based local search</article-title>
          ,
          <source>in: SAC</source>
          <year>2012</year>
          , ACM,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>F.</given-names>
            <surname>Mari</surname>
          </string-name>
          , et al.,
          <article-title>Model based synthesis of control software from system level formal specifications</article-title>
          ,
          <source>ACM TOSEM 23</source>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>G.</given-names>
            <surname>Agha</surname>
          </string-name>
          , et al.,
          <article-title>A survey of statistical model checking</article-title>
          ,
          <source>ACM Tran Mod Com Sim</source>
          <volume>28</volume>
          (
          <year>2018</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>