<!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>Constrained Training of Neural Networks via Theorem Proving</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mark Chevallier</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Matthew Whyte</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jacques D. Fleuriot</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Artificial Intelligence and its Applications Institute, School of Informatics, University of Edinburgh</institution>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We introduce a theorem proving approach to the specification and generation of temporal logical constraints for training neural networks. The distinctive benefit of our approach is the fully rigorous implementation of generalised constrained training, that guarantees correctness of implementation at every step. OVERLAY 2022: 4th Workshop on Artificial Intelligence and Formal Verification, Logic, Automata, and Synthesis, November 28, 2022, Udine, Italy $ m.chevallier@sms.ed.ac.uk (M. Chevallier); m.j.whyte@sms.ed.ac.uk (M. Whyte); jdf@ed.ac.uk (J. D. Fleuriot) 0000-0001-5307-7018 (M. Chevallier); 0000-0002-6867-9836 (J. D. Fleuriot) © 2022 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CPWrEooUrckResehdoinpgs IhStpN:/c1e6u1r3-w-0s.o7r3g CEUR Workshop Proceedings (CEUR-WS.org)</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Neural networks are powerful tools that can be used for low-level action and perception in
complicated environments, e.g. autonomous driving, but whether they subsequently implement
intended behaviour is dificult to assert, let alone guarantee [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. We want a neural network that
can be taught constraints such as “never go past this threshold” or “always avoid this region”
and actually obey them as intended when deployed. Learning that incorporates such constraints
has been the subject of recent eforts, where many approaches have been used to express and
inject knowledge into model training. The latter encompass logical encoding directly in PyTorch
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and TensorFlow [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and a range of other bespoke encoding and integration [
        <xref ref-type="bibr" rid="ref4 ref5 ref6 ref7 ref8 ref9">4, 5, 6, 7, 8, 9</xref>
        ].
Given the ad-hoc nature of these implementation mechanisms, it is dificult to provide strong
guarantees about the correctness of logical constraints and hence about the actual training.
      </p>
      <p>
        Our work introduces a neurosymbolic pipeline that injects a loss function, which measures
the breach of a constraint expressed in linear temporal logic over finite traces [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] (LTL ), into
the training of any neural network, with formal guarantees of correctness.
      </p>
      <p>
        To achieve this, we use the proof-assistant Isabelle/HOL [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] to formally verify our model
of the logical system, the soundness of the loss function ℒ and the loss function derivative
ℒ, which is used for backpropagation in training neural networks. The formal proof that ℒ
is sound with respect to the semantics of LTL guarantees that it will enforce the intended
behaviour during training. We then automatically generate OCaml code from our provably
correct formal specifications [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], and integrate it into a PyTorch neural network via a library
that provides OCaml bindings for Python [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. The use of code generation here, rather than an
ad-hoc, manually written implementation, guarantees that the implementation will match the
specification.
      </p>
      <p>Lastly, to demonstrate the approach’s guarantees, we build an example implementation, and
perform some experiments confirming that it behaves as expected. The results show that the
method yields a practical implementation with formal guarantees.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Formalising linear temporal logic</title>
      <p>We define a state as a function from the integers to the reals that tracks several values in
a learning problem that might be compared: a constant, or some measurement that a neural
network uses in its training e.g. how far a robotic hand is from a barrier at a given moment in
time. The integers passed to a state function are simply the indices to those values of interest. As
we are working with LTL (see below) we allow the state functions to vary over time. With each
state function encoding information about a system at a specific time-step, we define a path of
length  as a set of state functions encoding the evolution of a system over  time-steps.</p>
      <p>
        Our formalisation uses a variant of linear temporal logic [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] known as LTL [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], which is
interpreted over finite paths and is often viewed as a more natural choice for applications in AI,
e.g. planning [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], where processes are usually of finite duration.
      </p>
      <p>
        Following Fischer et al. we take comparisons of a state function’s values as our atomic
propositions  , namely  &lt; ′,  ≤ ′,  = ′,  ̸= ′ [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Thus we build constraints in LTL from
these comparisons (comp) and the constraints (constraint) arising from LTL ’s operators.
      </p>
      <p>
        The LTL formulae are thus:  ,  1 ∧  2,  1 ∨  2,   (Next), □  (Always), ♢  (Eventually),
 1  2 (Weak Until),  1ℛ 2 (Strong Release). In LTL , these have the usual semantics of LTL
[
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], except at the end of a path. In particular, ¬(  ) holds for all  at the final time-step  [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>
        We define Isabelle datatypes comp and constraint for the real-valued comparisons and
LTL constraints respectively. This approach to specifying the language in higher-order logic
is known as a deep embedding [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. Doing so will enable us to prove that the loss function is
sound and, importantly, generate fully self-contained code for defining LTL  constraints that
will be used as part of the training of a neural network.
      </p>
      <p>Next, we formalise the eval function, which characterises the semantics of LTL by
recursively evaluating the truth-value of a constraint over a path. Given the complexity of LTL , we
also prove a number of LTL equivalences, which confirms that our eval behaves as expected
and matches LTL semantics.</p>
    </sec>
    <sec id="sec-3">
      <title>3. A LTL-based loss function and its derivative</title>
      <p>The loss function ℒ takes an LTL constraint  , a path  and a relaxation factor  , and returns
a real value. Its purpose is to return a proportional positive value if  is breached under path  ,
and 0 otherwise. It needs to satisfy several important properties:
1. ℒ(, ,  ) ≥ 0;
2. ℒ is diferentiable w.r.t. any of the terms that the constraint compares, for  &gt; 0;
3. (Soundness) lim →0 ℒ(, ,  ) = 0 ⇐⇒  ( ), where  ( ) is the truth value of  on  .</p>
      <p>
        When formalising ℒ, it must be diferentiable for the neural network to be able to learn from
it via backpropagation (see Section 4). We therefore use soft, diferentiable versions of various
functions to quantify the satisfaction of constraints. Based on the work by Cuturi and Blondel
[
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], we define a binary softmax (and softmin analogously) function, max , as:

max(1, 2) =
{︃max(1, 2)
      </p>
      <p>≤ 0
 log(1/ + 2/ ) otherwise</p>
      <p>Every soft function takes an additional parameter  , the relaxation factor used for ℒ. The
intention behind this parameter is that as 
→ 0, max
→ max, and that it is diferentiable
when  &gt;</p>
      <p>0. We formalise this in Isabelle, and prove it has the desired properties, going on to
formalise its derivative and proving that it is correct. Diferent soft functions capture losses
from the  ̸= ′ comparison, again using  as a parameter in the same way.</p>
      <p>We proceed to define</p>
      <p>ℒ recursively, over the constraint and path, with  as a parameter. For
all the LTL operators, the ℒ function, in common with our eval function, recurses over the
constraint from the outside in, and recurses down the path as required for temporal operators.
Once we have formulated ℒ, we show via a series of lemmas and an inductive proof on the
constraint datatype that it has the expected soundness property with respect to the eval
function.</p>
      <p>We next construct a derivative ℒ for the ℒ function, to be used for gradient-based methods
in PyTorch (see Section 4). The derivative must be defined with respect to each time-step  and
state-value index  at that time-step along the finite trace.</p>
      <p>The ℒ function formalisation is structured similarly to our formalisation of the ℒ function,
defined recursively over the components of the LTL  constraint passed to it and essentially
follows from repeated applications of the chain rule. In defining it, we make extensive use of
the derivatives of the soft-functions we defined earlier. We formally prove that ℒ is the correct
derivative for our loss function and thus guarantee that when used for backpropagation it will
achieve the desired results.</p>
    </sec>
    <sec id="sec-4">
      <title>4. A PyTorch-compatible LTL loss function</title>
      <p>
        With our formalisation and proofs complete, what remains is to integrate them into the PyTorch
environment. Unfortunately, there does not exist a mechanism for generating Isabelle functions
as Python code. Instead, we choose to generate intermediate representations of ℒ and ℒ in
OCaml since our recursive Isabelle functions can be straightforwardly translated to type-safe
OCaml ones using the code generation machinery of Isabelle. Moreover, there exists a Python
library that can be used to call OCaml functions from within Python code [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>
        In order to produce computable code, we need to map the real numbers of Isabelle to floating
points [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. As this is an approximation, it naturally has some scope for machine arithmetic
errors, although the code generated for the various functions is fully faithful to their definitions
in Isabelle. We generate an OCaml module LTL_Loss.
      </p>
      <p>
        Python bindings for the OCaml definitions of ℒ and ℒ are incorporated into a PyTorch
autograd.Function object through the forward and backward methods, respectively [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
These methods are required for the loss function to form part of a computational graph in
PyTorch and enable training based on gradient descent. Consequently, our LTL_Loss module,
implemented as a subclass of autograd.Function, is functionally identical to a diferentiable
      </p>
      <p>PyTorch operation on tensors. Significantly, we know exactly how LTL_Loss should behave
when computing gradients with autograd, as it is solely characterised by its formalisation in
Isabelle.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Experiments and Discussion</title>
      <p>
        We base our experiments on those of Innes and Ramamoorthy [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] where they assess LTL
constraint training in a spatial environment. Each of the tests takes place in a 2-dimensional
planar environment with Cartesian co-ordinates. The training data follow a spline-shaped curve
consisting of  =100 sequenced points in the plane following the curve with small random
perturbations, simulating a demonstrator moving to some destination. We train a feed-forward
neural network to learn a Dynamic Movement Primitive (DMP) [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] to follow this trajectory.
      </p>
      <p>We lay out 4 diferent constraints to test. Avoid: The trajectory (always) avoids an open ball
of radius 0.1 around the point (0.4, 0.4). Patrol: The trajectory eventually reaches (0.2, 0.4)
and (0.85, 0.6) in the plane. Until: The  co-ordinate of the trajectory cannot exceed 0.4
until its  co-ordinate is at least 0.6. Compound: A more complicated test combining several
conditions. The trajectory should avoid an open ball of radius 0.1 around the point (0.5, 0.5),
while eventually touching the point (0.7, 0.5). Further, the  co-ordinate of the trajectory should
not exceed 0.8.</p>
      <p>When we run our tests, we first train the neural network ignoring the logical constraint,
then we use the latter as part of its loss calculations. The diferences between the two sets of
results demonstrates the efectiveness of the logical constraint as used in the loss function for
the training. Visual depictions of the results are given in Fig. 1.</p>
      <p>This demonstrates that our approach has the desired intent: a theorem-proving based
approach (with associated code-generation) can be used to rigorously inject constraints into neural
network training to guarantee the expected behaviour. Our approach is generic, so in principle
a diferent formalism, e.g. a continuous-time logic, could be used instead of LTL  , and applied to
any applicable neural network. Moreover, by formalising the derivative of the loss function, we
unlock the potential to reason formally about the traversal of the loss surface during gradient
descent. Given our results, we believe this work opens the way to a tighter integration between
fully-formal symbolic reasoning in a theorem prover and machine learning.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>N.</given-names>
            <surname>Kalra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. M.</given-names>
            <surname>Paddock</surname>
          </string-name>
          ,
          <article-title>Driving to safety: How many miles of driving would it take to demonstrate autonomous vehicle reliability?</article-title>
          ,
          <source>Transportation Research Part A: Policy and Practice</source>
          <volume>94</volume>
          (
          <year>2016</year>
          )
          <fpage>182</fpage>
          -
          <lpage>193</lpage>
          . URL: https://www.sciencedirect.com/science/article/pii/ S0965856416302129. doi:https://doi.org/10.1016/j.tra.
          <year>2016</year>
          .
          <volume>09</volume>
          .010.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>C.</given-names>
            <surname>Innes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Ramamoorthy</surname>
          </string-name>
          ,
          <article-title>Elaborating on Learned Demonstrations with Temporal Logic Specifications</article-title>
          , in: M.
          <string-name>
            <surname>Toussaint</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Bicchi</surname>
          </string-name>
          , T. Hermans (Eds.),
          <source>Proceedings of Robotics: Science and System XVI</source>
          ,
          <year>2020</year>
          . doi:
          <volume>10</volume>
          .15607/RSS.
          <year>2020</year>
          .XVI.
          <volume>004</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Marra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Giannini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Diligenti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Gori</surname>
          </string-name>
          ,
          <article-title>Lyrics: A general interface layer to integrate logic inference and deep learning</article-title>
          , in: U. Brefeld,
          <string-name>
            <given-names>E.</given-names>
            <surname>Fromont</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Hotho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Knobbe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Maathuis</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          Robardet (Eds.),
          <source>Machine Learning and Knowledge Discovery in Databases</source>
          , Springer International Publishing, Cham,
          <year>2020</year>
          , pp.
          <fpage>283</fpage>
          -
          <lpage>298</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>Badreddine</surname>
          </string-name>
          , A.
          <string-name>
            <surname>d'Avila Garcez</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Serafini</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Spranger</surname>
          </string-name>
          ,
          <article-title>Logic tensor networks</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>303</volume>
          (
          <year>2022</year>
          )
          <article-title>103649</article-title>
          . URL: https://www.sciencedirect.com/science/article/pii/ S0004370221002009. doi:https://doi.org/10.1016/j.artint.
          <year>2021</year>
          .
          <volume>103649</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Fischer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Balunovic</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
            Drachsler-Cohen,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Gehr</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Zhang</surname>
          </string-name>
          , M. Vechev,
          <article-title>DL2: Training and querying neural networks with logic</article-title>
          ,
          <source>in: International Conference on Machine Learning</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>1931</fpage>
          -
          <lpage>1941</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Hu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Ma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Hovy</surname>
          </string-name>
          , E. Xing,
          <article-title>Harnessing deep neural networks with logic rules</article-title>
          ,
          <source>in: Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume</source>
          <volume>1</volume>
          :
          <string-name>
            <surname>Long</surname>
            <given-names>Papers)</given-names>
          </string-name>
          ,
          <source>Association for Computational Linguistics</source>
          , Berlin, Germany,
          <year>2016</year>
          , pp.
          <fpage>2410</fpage>
          -
          <lpage>2420</lpage>
          . URL: https://aclanthology.org/P16-1228. doi:
          <volume>10</volume>
          .18653/v1/
          <fpage>P16</fpage>
          -1228.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>T.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Srikumar</surname>
          </string-name>
          ,
          <article-title>Augmenting neural networks with first-order logic</article-title>
          , in: A.
          <string-name>
            <surname>Korhonen</surname>
            ,
            <given-names>D. R.</given-names>
          </string-name>
          <string-name>
            <surname>Traum</surname>
          </string-name>
          , L. Màrquez (Eds.),
          <source>Proceedings of the 57th Conference of the Association for Computational Linguistics</source>
          ,
          <string-name>
            <surname>ACL</surname>
          </string-name>
          <year>2019</year>
          , Florence, Italy,
          <source>July 28- August 2</source>
          ,
          <year>2019</year>
          , Volume
          <volume>1</volume>
          :
          <string-name>
            <given-names>Long</given-names>
            <surname>Papers</surname>
          </string-name>
          ,
          <source>Association for Computational Linguistics</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>292</fpage>
          -
          <lpage>302</lpage>
          . URL: https: //doi.org/10.18653/v1/p19-
          <fpage>1028</fpage>
          . doi:
          <volume>10</volume>
          .18653/v1/p19-
          <fpage>1028</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R.</given-names>
            <surname>Stewart</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ermon</surname>
          </string-name>
          ,
          <article-title>Label-free supervision of neural networks with physics and domain knowledge</article-title>
          ,
          <source>in: Thirty-First AAAI Conference on Artificial Intelligence</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , T. Friedman,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Broeck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A Semantic</given-names>
            <surname>Loss</surname>
          </string-name>
          <article-title>Function for Deep Learning with Symbolic Knowledge</article-title>
          , in: J.
          <string-name>
            <surname>Dy</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . Krause (Eds.),
          <source>Proceedings of the 35th International Conference on Machine Learning</source>
          , volume
          <volume>80</volume>
          <source>of Proceedings of Machine Learning Research</source>
          , PMLR, Stockholmsmässan, Stockholm Sweden,
          <year>2018</year>
          , pp.
          <fpage>5502</fpage>
          -
          <lpage>5511</lpage>
          . URL: http://proceedings.mlr.press/v80/xu18h.html.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>G. De Giacomo</surname>
            ,
            <given-names>M. Y.</given-names>
          </string-name>
          <string-name>
            <surname>Vardi</surname>
          </string-name>
          ,
          <article-title>Linear temporal logic and linear dynamic logic on finite traces</article-title>
          ,
          <source>in: IJCAI'13 Proceedings of the Twenty-Third international joint conference on Artificial Intelligence, Association for Computing Machinery</source>
          ,
          <year>2013</year>
          , pp.
          <fpage>854</fpage>
          -
          <lpage>860</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>T.</given-names>
            <surname>Nipkow</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. C.</given-names>
            <surname>Paulson</surname>
          </string-name>
          , M. Wenzel, Isabelle/HOL:
          <article-title>a proof assistant for higher-order logic</article-title>
          , volume
          <volume>2283</volume>
          ,
          <string-name>
            <surname>Springer</surname>
            <given-names>Science</given-names>
          </string-name>
          &amp; Business
          <string-name>
            <surname>Media</surname>
          </string-name>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>F.</given-names>
            <surname>Haftmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bulwahn</surname>
          </string-name>
          ,
          <article-title>Code generation from Isabelle/HOL theories, Isabelle documentation (</article-title>
          <year>2021</year>
          ). URL: https://isabelle.in.tum.de/doc/codegen.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>L.</given-names>
            <surname>Mazare</surname>
          </string-name>
          ,
          <article-title>Using Python and OCaml in the same Jupyter notebook (</article-title>
          <year>2019</year>
          ). URL: https: //blog.janestreet.
          <article-title>com/using-python-and-ocaml-in-the-same-jupyter-notebook.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>A.</given-names>
            <surname>Pnueli</surname>
          </string-name>
          ,
          <article-title>The temporal logic of programs</article-title>
          ,
          <source>in: 18th Annual Symposium on Foundations of Computer Science</source>
          (sfcs
          <year>1977</year>
          ),
          <year>1977</year>
          , pp.
          <fpage>46</fpage>
          -
          <lpage>57</lpage>
          . doi:
          <volume>10</volume>
          .1109/SFCS.
          <year>1977</year>
          .
          <volume>32</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>J.</given-names>
            <surname>Baier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Mcilraith</surname>
          </string-name>
          ,
          <article-title>Planning with First-Order Temporally Extended Goals using Heuristic Search</article-title>
          ,
          <source>in: Proceedings of the National Conference on Artificial Intelligence</source>
          , volume
          <volume>1</volume>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Boulton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Gordon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. J.</given-names>
            <surname>Gordon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Harrison</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Herbert</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. Van Tassel</surname>
          </string-name>
          ,
          <article-title>Experience with embedding hardware description languages in hol</article-title>
          .,
          <source>in: TPCD</source>
          , volume
          <volume>10</volume>
          ,
          <string-name>
            <surname>Citeseer</surname>
          </string-name>
          ,
          <year>1992</year>
          , pp.
          <fpage>129</fpage>
          -
          <lpage>156</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>M.</given-names>
            <surname>Cuturi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Blondel</surname>
          </string-name>
          ,
          <article-title>Soft-DTW: a diferentiable loss function for time-series</article-title>
          ,
          <source>arXiv preprint arXiv:1703.01541</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>F.</given-names>
            <surname>Haftmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Hölzl</surname>
          </string-name>
          , T. Nipkow, Code_Real_Approx_By_Float,
          <string-name>
            <surname>HOL</surname>
          </string-name>
          _Library (
          <year>2021</year>
          ). URL: https://isabelle.in.tum.de/library/HOL/HOL-Library/Code_Real_Approx_By_Float.html.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>A.</given-names>
            <surname>Paszke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Gross</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Massa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lerer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Bradbury</surname>
          </string-name>
          , G. Chanan,
          <string-name>
            <given-names>T.</given-names>
            <surname>Killeen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Gimelshein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Antiga</surname>
          </string-name>
          , et al.,
          <article-title>Pytorch: An imperative style, high-performance deep learning library</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>32</volume>
          (
          <year>2019</year>
          )
          <fpage>8026</fpage>
          -
          <lpage>8037</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>S.</given-names>
            <surname>Schaal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Peters</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Nakanishi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ijspeert</surname>
          </string-name>
          ,
          <article-title>Learning movement primitives</article-title>
          ,
          <source>in: Robotics research. the eleventh international symposium</source>
          , Springer,
          <year>2005</year>
          , pp.
          <fpage>561</fpage>
          -
          <lpage>572</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>