<!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>Toward the Formal Verification of HILECOP: Formalization and Implementation of Synchronously Executed Petri Nets?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Vincent Iampietro</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Andreu</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Delahaye</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>LIRMM, Univ Montpellier</institution>
          ,
          <addr-line>CNRS, Montpellier</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>NEURINNOV</institution>
          ,
          <addr-line>Montpellier</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>While designing critical digital systems, the use of formal models is necessary as they help us to assess the design soundness with the help of their mathematical foundations. However, the formal model is then frequently hand-coded by the engineer, sometimes with automatic generation of a code skeleton to be completed. While automatic generation facilitates the task and limits the risk of error, it remains to be proved that the properties highlighted in the design model are preserved in its implemented version, while considering the impact of its execution on the target as well.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>analysis</p>
      <p>PPTT1212 PPTT1212
Implementation
model
2
xt on
e i
el-too-trmat
modansf
r
t</p>
    </sec>
    <sec id="sec-2">
      <title>VHDL Source Code 3</title>
      <p>/
pilantitohnesis
comsy</p>
    </sec>
    <sec id="sec-3">
      <title>FPGA implementation 4</title>
      <p>Fig. 1: Workflow of the HILECOP Methodology</p>
      <p>
        We propose to address the problem within the framework of the HILECOP
(HIgh-LEvel hardware COmponent Programming) methodology. As shown in
Fig. 1, the HILECOP methodology describes a full fledged process to design,
analyze, and synthesize critical digital systems. In HILECOP, the models of digital
systems are built leveraging a modular, component-based graphical formalism
(see 1 in Fig. 1). The internal behavior of the model components are described
with a particular kind of Petri nets that we call SITPNs (Synchronously
executed Interpreted Time Petri Nets with priorities). The SITPN formalism allows
us to analyze the models (see 2 in Fig. 1). Up to that point, the HILECOP
? Copyright c 2020 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
methodology provides a way to design sound models that ensure properties such
as boundedness and liveliness. From Step 2 to Step 3 , the SITPN model is
then transformed into VHDL code. Currently, there is no proof that the
structure and behavior of the implementation model are preserved in the generated
VHDL code. Using theorem proving and the Coq proof assistant [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] in particular,
we propose to formally verify the above statement.
      </p>
      <p>
        This verification task is somewhat similar to the verification of compilers for
programming languages (see [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], for an example). In this kind of verification, the
steps to establish the proof of behavior preservation are well-known: first,
formalize and implement the semantics of the source and the target languages; second,
implement the transformation; finally, prove that for all source program, the
generated program has the same behavior. However, contrary to usual programming
languages, our source formalism is very abstract, and the target language is very
specific, as VHDL describes both the structure and the behavior of hardware
circuits. These particular aspects bring a certain originality to our work.
      </p>
      <p>
        To complete the verification of HILECOP, the first step consists in formalizing
the semantics of SITPNs, and implementing it in Coq. The SITPN semantics is a
state-transition system. It has been thoroughly formalized in [
        <xref ref-type="bibr" rid="ref1 ref3">1,3</xref>
        ]. We provided
only minor changes to this semantics, most of them to correct redundancies.
SITPNs combine multiple classes of PNs such as time and interpreted PNs.
However, the singularity of SITPNs resides in the synchronous execution of the
models. The evolution of the overall state of an SITPN depends on the two
events of a clock signal: the falling edge and the rising edge. These two events
label the transitions of the state-transition system. The election of the transitions
to be fired takes place on the falling edge and the update of the marking takes
place on the rising edge. The major impact of synchronous execution is that all
transitions are fired at the same time.
      </p>
      <p>Our first contribution to the verification of HILECOP has been to implement
the SITPN semantics in Coq. To increase our confidence in our implementation
of the SITPN semantics, we have also developed an SITPN token player in Coq
and proved that it is sound and complete with respect to the SITPN semantics.
The full formalization and proof are available to the reader3.
3 https://github.com/viampietro/sitpns</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>H.</given-names>
            <surname>Leroux</surname>
          </string-name>
          .
          <article-title>Handling Exceptions in Petri Net-Based Digital Architecture: From Formalism to Implementation on FPGAs</article-title>
          .
          <source>IEEE Transactions Industrial Informatics</source>
          ,
          <volume>11</volume>
          (
          <issue>4</issue>
          ):
          <fpage>897</fpage>
          -
          <lpage>906</lpage>
          , Aug.
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>X.</given-names>
            <surname>Leroy</surname>
          </string-name>
          .
          <article-title>Formal Verification of a Realistic Compiler</article-title>
          .
          <source>Communications of the ACM (CACM)</source>
          ,
          <volume>52</volume>
          (
          <issue>7</issue>
          ):
          <fpage>107</fpage>
          -
          <lpage>115</lpage>
          ,
          <year>July 2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>I. Merzoug.</surname>
          </string-name>
          <article-title>Validation formelle des systèmes numériques critiques : génération de l'espace d'états de réseaux de Petri exécutés en synchrone</article-title>
          .
          <source>PhD thesis</source>
          , Université Montpellier,
          <year>Jan 2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <source>The Coq Development Team. Coq, version 8.11.0</source>
          .
          <string-name>
            <surname>Inria</surname>
          </string-name>
          , Jan.
          <year>2020</year>
          . http://coq.inria.fr/.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>