<!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>Extending Taylor Approximation to Hybrid Automata with Integrals</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ruggero Lanotte</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Simone Tini</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>In [10, 11] we proposed a technique to approximate Hybrid Automata (HA) with Polynomial HA. The idea was to replace functions appearing in formulae with their Taylor Polynomials. Here we extend this technique to HA with formulae admitting integral functions. We prove that we get over-approximations of the original HA. We study the conditions ensuring that: 1. the “distance” between the formulae of the original HA and its approximation get close to 0 when increasing the degree of the Taylor polynomial (syntactical approximation), 2. the “distance” between the configurations reached in n steps by the two HA get close to 0 when increasing the degree of the Taylor polynomial (semantic approximation).</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        Hybrid automata [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ] (HA, for short) are a widely studied model for hybrid
systems [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ], i.e. systems with discrete and continuous state changes. HA
extend classic finite state machines with continuously evolving variables, and
exhibit two kinds of state changes: discrete jump transitions, occurring
instantaneously, and continuous flow transitions, occurring while time elapses. The two
kinds of transitions are guarded by jump conditions and activity functions, resp.,
which are formulae expressing constraints on the source and target value of the
variables. Extensions to HA are considered to deal with particular scopes. As an
example in [
        <xref ref-type="bibr" rid="ref12 ref8">12, 8</xref>
        ] HA are extended with data structures to face with safety and
security problems. But most of hybrid system applications is modelling and
verifying systems where digital computational processes interact with analog
physical ones. In this setting, integrals have several applications. In physics and
engineering, where hybrid systems are widely used, we mention: work and
impulse, electromagnetism, first moment and center of mass, application in fluid
mechanics.
      </p>
      <p>As an example, the HA in Fig. 1 models a controller of a tank. The
controller continuously senses the level of water and fills or empties it, aiming
to keep the level between m and M litres (M &gt; m). The water level,
represented by variable x, varies with time depending on input/output flows. When
the controller fills the tank (state in), the flow rate depends on time y, and is
1 cos(y2) litres/second. Thus, after a time t the water level is increased by
R t 1 cos(y2) dy, as modeled by activity function in. When the controller
emp0
ties the tank (state out), the flow rate at time y is y2. Thus, after a time t the
water level is decreased by R0y y2 dt = 31 t3, as modeled by activity function out.
x = M
'
out
out
x;x0 2 [m;M]
&amp;
%M^ x = x0 = x
x = m ^ x0 = x
$ -'in</p>
      <p>in
x;x0 2 [m;M]
&amp;
out x0 = x R0t y2 dy
%</p>
      <p>
        In this example it is relevant to solve integrals by finding their
antiderivatives. Unfortunately, it is well known that the integration problem is ”difficult”,
and in many cases impossible. For instance the antiderivative is non elementary
for the filling flow function 1 cos(y2) we consider. Indeed the antiderivatives
cannot be expressed by an algebraic expression of rationals, exponentials,
logarithms, absolute values and trigonometric functions. A classical practical
example of non elementary antiderivative function is given by the Gauss integral
error Rab ex2 dx. Therefore this problem cannot be considered a problem with
restricted impact. Moreover in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] it is showed that the integration problem is
undecidable for functions with a non elementary antiderivative.
      </p>
      <p>Our work is inspired by the necessity of using integrals in modeling real
problems with HA, meanwhile dealing with the problem of managing and
solving integrals, which is in general hard and even impossible for non elementary
antiderivatives.</p>
      <p>
        HA are usually used to prove safety properties (i.e. properties requiring that a
given set of bad configurations cannot be reached). The decidability of
reachability problem (i.e. whether or not a given configuration can be reached) becomes
determinant. Unfortunately, for most classes of HA, reachability is undecidable
[
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and the introduction of integrals complicates this analysis. However, for
some classes of HA, computing the successors (or predecessors) of
configurations sets is reasonably efficient, and, therefore, reachability in a limited number
of steps is decidable. For instance for Polynomial HA computing the successors
of configuration sets is decidable [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. A methodology proposed in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] fills this
gap: the idea is to over-approximate an HA H with another HA H0 s.t.
computing the successors of configuration sets for H0 is decidable and the
computations of H0 are a superset of the set of all the possible computations of H.
Hence, if we prove that a bad configuration cannot be reached by H0 then we
can infer that it cannot be reached by the original H. In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] it is required that
the approximation H0 is in the class of the Linear HA, for which the successors
of configuration sets are computable.
      </p>
      <p>
        The notion of approximation is then strengthened in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] by -approximation,
which is motivated by the need to limit the error introduced by the
approximation. In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] an asymptotically complete approximation operator, called
rationally rectangular phase-portrait approximation, is given which approximates any
jump condition or activity function by a predicate satisfied by all points lying
in a space consisting of a products of intervals with rational endpoints.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ] over-approximations are based on replacing functions over
variables with their Taylor polynomial. Since Taylor polynomials allow us to
approximate functions and integrals, in the present paper we extend our
technique in [
        <xref ref-type="bibr" rid="ref10 ref11">10, 11</xref>
        ] to over-approximate HA with integrals. In detail, given any
HA H and k 2 IN, A(H ; k) is the set of the Polynomial HA (for which
successors of configuration sets is decidable) that are obtained by replacing in jump
conditions and activity functions of H each integral Rlu f (~x)dx with a
polynomial based on Taylor polynomial theory. The resulting polynomial HA
overapproximates the original one according to [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. We study the conditions
ensuring that our approximation is asymptotically complete, in the sense that,
for each &gt; 0 there exists some k0 s.t., for all k &gt; k0, A(H ; k) contains only
approximations for H . This analysis of the error is syntactic, meaning that it
does not consider the behaviour of H and its approximation. We consider also
semantic analysis of the error and study conditions ensuring that, when k tends
to the infinity, the behaviour of any Hk 2 A(H ; k) gets close to the behaviour of
H .
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Hybrid Automata</title>
      <p>
        In this section we recall the formalism of Hybrid Automata (see, e.g., [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]).
      </p>
      <p>A vector of dimension n over a set U is a tuple ~u = (u1; : : : ; un) in U n. By ~ui we
denote the ith element ui . We denote by ~u (u) the vector (u1; : : : ; un; u) 2 U n+1.
Then, for ~u = (u1; : : : ; un) and ~v = (v1; : : : ; vm), we denote by ~u ~v the vector
(u1 : : : ; un; v1; : : : ; vm) in U n+m. A space over U n is a set of vectors in U n.</p>
      <p>We assume a finite set of real variables X ranged over by x; y; z; w; : : :. Each
x 2 X can assume values in Dom(x) IR. An evaluation over X is a mapping
v : X ! IR s.t. v(x) 2 Dom(x) for x 2 X. For an evaluation v, a variable y and a real
c 2 Dom(x), the evaluation v[y := c] is defined by v[y := c](x) = v(x), for x , y,
and v[y := c](y) = c. For vectors ~x = (x1; : : : ; xn) over Xn and ~u = (u1; : : : ; un) with
ui 2 Dom(xi ), we write v[~x := ~u] for v[x1 := u1] : : : [xn := un]. Then, v(x1; : : : ; xm)
denotes the vector (v(x1); : : : ; v(xm)) 2 IRm. We denote by ~X the vector (x1; : : : ; xjXj)
over XjXj. Finally, we write [~X := ~u] to denote the evaluation v s.t. v(~X) = ~u.</p>
      <p>We assume a set of function symbols F, together with an arity mapping r : F !
IN that assigns to each f 2 F its rank r(f ). If r(f ) = 0 then f is called a constant.
We assume a unique interpretation I associating to each function symbol f 2 F
a continuous function I (f ) : Dom(f ) ! IR s.t. Dom(f ) IRr(f ). Being I unique,
sometimes with abuse of notation we use f for I (f ). In order to build
polynomials with rational coefficients, we require that F contains the constant symbol
q with I (q) = q for all q 2 Q, and symbols +, , denoting, resp., binary
summation, binary multiplication and unary negation over reals.</p>
      <sec id="sec-2-1">
        <title>Definition 1. The set (F; X) of the formulae over F and X is the least set s.t.:</title>
        <p>–
(F; X) contains all basic formulae of the form</p>
        <p>Z u1
ln</p>
        <p>! !
f g1(w1); : : : ; gr(f )(wr(f )) dwin : : : dwi1
ax, where:
n 0 and, whenever n &gt; 0, then l1; u1; : : : ; ln; un 2 X [ Q;
w1; : : : ; wr(f ) 2 X n fl1; u1; : : : ; ln; ung and fi1; : : : ; ing f1; : : : ; r(f )g;
g1; : : : ; gr(f ) 2 F are polynomial functions s.t. Dom(wi ) Dom(gi );
f 2 F with Dom(f ) g1(Dom(w1)) : : : gr(f )(Dom(wr(f )));</p>
        <p>is a comparison operator in f&lt;; ; =; ; &gt;g;
x 2 X and a 2 f0; 1g;
[min(l; r); max(l; r)] Dom(wij ) for l 2 Dom(lj ); r 2 Dom(uj ); j = 1; : : : ; n.
– : is in (X; F) whenever is in (X; F);
– 1 _ 2 and 1 ^ 2 are in (X; F) whenever both 1 and 2 are in (X; F);
– 8y: and 9y: are in (X; F) whenever y 2 X and is in (X; F).</p>
        <sec id="sec-2-1-1">
          <title>The subset of polynomial formuale is obtained by restricting to (i) those f 2 F that are polynomial functions s.t. Dom(f ) is a product of intervals with bounds in Q [ f 1g, (ii) those variables x 2 X s.t. Dom(x) is an interval with bounds in Q [ f 1g.</title>
          <p>
            In [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ] we restricted to basic formulae of Def. 1 with n = 0, i.e. general
continuous function without integrals. The definition of basic formulae could
appear restrictive at first glance. We argue that Def. 1 gives us expressiveness
and flexibility by some examples:
1. By existential quantification, arbitrary expressions be compared. For
instance, ex+siny x=(y2 + 1) is expressed by 9z: (ex+siny z ^ x=(y2 + 1) = z).
2. By existential quantification, we give to the user as much freedom as
possible in choosing the functions to be approximated. For instance, for f ; g 2 F,
we can rewrite a formula h(~x) ax with h = f g by 9y: g(~x) = y ^ f (y) ax.
In the first case the function f g is approximated, in the second case f and
g are approximated separately, e.g. in order to approximate the exponential
and the sin separately, the formula 9z: (ex+siny z ^ x=(y2 + 1) = z) in item 1
can be rewritten as 9z1:9z2: (ez1 z2 ^ x + sin y = z1 ^ x=(y2 + 1) = z2).
3. Also arbitrary expressions dealing with integrals can be compared. For
instance, the expression h(x) + Rxy f (z)dz = Rxy g(z)dz can be expressed by
9w19w2: Rxy f (z)dz = w1 ^ Rxy g(z)dz = w2 ^ h(x) + w1 = w2.
4. Expressions with integrals can be arguments of functions. For instance,
cos Rxy f (z)dz &gt; 0 can be expressed by 9w: cos(w) &gt; 0 ^ Rxy f (z)dz = w,
and R05 f x; R03 g(y)dy dx 7 by 9z: R03 g(y)dy = z ^ R05 f (x; z)dx 7.
5. We can deal also with general bounds for integrals. For instance the formula
R4ex f (y)dy x can be expressed by 9z: R4z f (y)dy x ^ ex = z.
          </p>
          <p>We write v j= to denote that the evaluation v satisfies the formula . Relation
j= is defined inductively as follows:
– v j= Rlu1 : : : Rlun f g1(w1); : : : ; gr(f )(wr(f )) dwin : : : dwi1
1 n
ax iff
Z v(u1) 0 0Z v(un)</p>
          <p>BBB: : : BB</p>
          <p>B
v(l1) @B @B v(ln)
1 1
I (f ) I (g1)(e1); : : : ; I (gr(f ))(er(f )) dwin CCCC : : :CCC dwi1</p>
          <p>A AC</p>
          <p>I (a)v(x)
where either ej = wj , if j 2 fi1; : : : ; ing, or ej = v(wj ), otherwise.
– v j= : iff v 6j= (namely v j= does not hold).
– v j= 1 ^ 2 (resp. v j= 1 _ 2) iff v j= 1 and v j= 2 (resp. v j= 1 or v j= 2).
– v j= 8y: (resp. v j= 9y: ) iff v[y := c] j= for all (resp. for some) c 2 Dom(y).</p>
          <p>For a formula 2 (F; X), let ~  denote the set fv : X ! IR j v j= g of the
evaluations satisfying . Two formulae 1; 2 are equivalent iff ~ 1 = ~ 2.</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>Definition 2. The subset of the normal forms in (F; X) contains the formulae of</title>
        <p>the form Q1y1: : : : Qmym: , where: (i) Qi 2 f8; 9g for i = 1; : : : ; m; (ii) contains
neither quantifiers nor negations; (iii) contains only relations in f&lt;; g; (iv) all
basic formulae in are of the following form, for n r(f ) and z1; : : : ; zn 2 X:
Z z1
0
: : :</p>
        <p>Z zn
0</p>
        <p>! !
f g1(w1); : : : ; gr(f )(wr(f )) dwn : : : dw1
ax.</p>
      </sec>
      <sec id="sec-2-3">
        <title>Proposition 1. Given any formula</title>
        <p>lent to that can be constructed from
.</p>
        <sec id="sec-2-3-1">
          <title>2 (X; F), there exists a normal form equiva</title>
          <p>E.g. R4z ey dy
w is equivalent to the normal form 9x: R0x ey+4dy
w^z 4 = x.</p>
          <p>Definition 3. An Hybrid Automaton (HA for short) H over X and F is a tuple of
the form H = h init; Q; q0; T ; Acti, where:
– init 2 (F; X) is the initial condition.
– Q is a finite set of states, and q0 2 Q is the initial state.
– T Q (F; fx1; : : : ; xjXj; x10; : : : ; xj0Xjg) Q is a finite set of transitions. Variables
x10; : : : ; x0X represent the values taken by x1; : : : ; xjXj after the firing of a transition.</p>
          <p>j j
– Act : Q ! (F; fx1; : : : ; xjXj; t; x10; : : : ; xj0Xjg) is the activity function assigning to
each state q a formula Act(q). Variable t represents time elapsing. 1
Then, H is a Polynomial Hybrid Automaton (PHA for short) iff init, Act(q) for
all states q and for each transition (q; ; q0) are all polynomial formulae.
Example 1. The tank controller represented in Fig. 1 has two states: in state in
the controller fills the tank, in state out the controller empties the tank. The
jump condition x = m ^ x0 = x (resp. x = M ^ x0 = x) ensures that the jump from
out to in (resp. from in to out) happens when the level of the water is m (resp.
M), and the firing of the transition does not cause any change in the water level.</p>
          <p>
            In state in, the water flow rate at time y is 1 cos(y2). Hence, staying in in for
t units of time causes a water level growing of R0t 1 cos(y2) dy. This is modelled
by the activity function in, which can be written in normal form in several
ways. Let 0 be the formula x M ^ x m ^ x0 M ^ x0 m, or x; x0 2 [m; M] for
short. Given the functions f ; g s.t. f (y) = 1 cos(y2) and g(y) = cos(y2), we can
write in in the two following ways, which are semantically equivalent:
1
in
0 ^ x0 x = z ^
f (y) dy = z
2
in
1 Note that invariants can be expressed by means of universal quantifiers (see [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ]).
However, when non-polynomial functions are approximated by their Taylor
polynomials, in the former case we approximate f and in the latter g.
          </p>
          <p>In state out, the water flow rate at time y is y2. Hence, staying in state out for
t units of time causes a water level decrement of R0t y2 dy. This is modelled by
the activity function out 0 ^ x x0 = z ^ R0t y2 dy = z. Obviously R0t y2 dy = t33 .
Therefore in this case no approximation is necessary.</p>
          <p>A configuration of an HA H is a pair (q;~u), with q 2 Q and ~u = (u1; : : : ; ujXj) a
vector in IRjXj representing that each variable xi has value ui . H can evolve from
(q;~u) to (q0;~u0), written (q;~u) ! (q0;~u0), by an activity or transition step. An
activity step describes the evolution from (q;~u) due to remaining in q and passing
of time. In time units, Act(q) takes H to a new evaluation of the variables:
if</p>
          <p>0 and [~X := ~u; t := ;~X0 := ~u0] j= Act(q), then (q;~u) ! (q;~u0).</p>
          <p>A transition step describes the evolution from (q;~u) due to a transition from q:
if (q; ; q0) 2 T and [~X := ~u;~X0 := ~u0] j= , then (q;~u) ! (q0;~u0):
A run is a sequence of (activity and transition) steps (q0; u~0) ! : : : ! (qi ; u~i ) : : :
with q0 the initial state and [~X := u~0] 2 ~ init. A configuration (q;~u) is reachable
in n steps iff there is a run (q0; u~0) ! : : : ! (qn; u~n) : : : s.t. qn = q and u~n = ~u. A
configuration is reachable iff it is reachable in n steps for some n 0.</p>
          <p>A region R of a HA H is a set of configurations. The region reachable by H
from a region R is denoted Post(R; H). Formally: Post(R; H) = f(q0;~u0) j 9(q;~u) 2
R such that (q;~u) ! (q0;~u0)g. Let Postn(H) denote either the region f(q0; u~0) j
[~X := u~0] 2 ~ initg, if n = 0, or the region Post(Postn 1(H); H), if n &gt; 0. Moreover,
let Post(H) denote the region Sn2IN Postn(H). The following result is folklore.
Theorem 1. For each n 2 IN, a configuration (q;~u) is reachable in n steps iff (q;~u) 2
Postn(H). Hence (q;~u) is reachable iff (q;~u) 2 Post(H).</p>
          <p>
            The following result follows from Tarski’s results [
            <xref ref-type="bibr" rid="ref15">15</xref>
            ] and from the fact that
the antiderivative of a polynomial is a polynomial.
          </p>
          <p>Theorem 2. If H is polynomial and n 2 IN then (q;~u) 2 Postn(H) is decidable.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3 Taylor Approximation</title>
      <p>The ith derivative of f 2 F wrt. coordinate jth is denoted Dij f . Let Ck denote the
set of the functions that are derivable k times, namely f 2 Ck iff Dj11 : : : Djrr((ff)) f
exists whenever j1 + : : : + jr(f ) = k.</p>
      <p>Definition 4. Assume a function f 2 Ck and a vector ~v 2 Dom(f ). The polynomial
of Taylor of degree k for f wrt. ~v is defined by</p>
      <p>Pk(f ; w~;~v) =</p>
      <p>X
j1+:::+jr(f ) k</p>
      <p>jr(f ) f )(~v) (w1 v1)j1 : : : (wr(f ) vr(f ))jr(f )
(Dj11 : : : Dr(f )
j1! : : : jr(f )!
where w~ is the vector of variables (w1; : : : ; wr(f )). For ~u 2 Dom(f ), the value rk(f ;~u;~v)
defined by rk(f ;~u;~v) = f (~u) Pk(f ;~u;~v) is called the remainder.</p>
      <p>The intuition is that Pk(f ; w~;~v) is a polynomial that approximates f (w~), and
the error of the approximation in ~u 2 Dom(f ) is given by rk(f ;~u;~v). This error
is quantified by the following result, known as Lagrange Remainder Theorem.
Theorem 3 (Lagrange). For a function f 2 Ck+1, a convex set S Dom(f ) and
two vectors ~u;~v in S, there exists a vector~z on the segment linking ~u and ~v s.t.:
rk(f ;~u;~v) =</p>
      <p>X
j1+:::+jr(f )=k+1</p>
      <p>jr(f ) f )(~z) (u1 v1)j1 : : : (ur(f ) vr(f ))jr(f )
(Dj11 : : : Dr(f )
.</p>
      <p>Our aim is to give an upper bound to jrk(f ;~u;~v)j, under suitable hypothesis.
Definition 5. A function f 2 Ck+1 is analytic in S Dom(f ) if there are two
constants C, L s.t., for all j1; : : : ; jr(f ) with j1 + + jr(f ) k + 1 and~z 2 S, we have
jr(f ) f )(~z)j L Cj1+:::+jr(f ) :
j(Dj11 : : : Dn</p>
      <sec id="sec-3-1">
        <title>Then, f is analytic if f is analytic in Dom(f ) and Dom(f ) is convex.</title>
        <p>Example 2. Trigonometric functions are analytic. For instance, for the function
sin(x) it is sufficient to take the constants L = C = 1. Exponential and
logarithmic functions are analytic in finite intervals. For instance, for function e2x and
interval [0; 10], it is sufficient to take the constants C = 2 and L = e20.</p>
        <p>Let us assume an analytic function f 2 Ck+1. Then, for Cˆ and Lˆ the minimal
values satisfying the condition of Def. 5, for any k we denote with C(f ; k) the
value Lˆ Cˆ k+1. Moreover, let Rk(f ; w~;~v) denote the polynomial over w~ defined by
Rk(f ; w~;~v) =</p>
        <p>C(f ; k) (r(f ))k+1 Qjr(=f1)((wj vj )2 l k+21 m + 1)</p>
        <p>j kr(+f1) k!</p>
        <p>
          By definition, Rk(f ;~u;~v) is an upper bound to jrk(f ;~u;~v)j for all ~u 2 Dom(f ).
Moreover, Rk(f ;~u;~v) gets close to 0 when k tends to the infinity. Formally:
Proposition 2 ([
          <xref ref-type="bibr" rid="ref11">11</xref>
          ]). Let f 2 F be analytic. Then, for all ~u;~v 2 Dom(f ) we have:
(1) jrk(f ;~u;~v)j Rk(f ;~u;~v), and (2) limk!1 Rk(f ;~u;~v) = 0:
        </p>
        <p>From jrk(f ;~u;~v)j Rk(f ;~u;~v), f (~u) = rk(f ;~u;~v) + Pk(f ;~u;~v) and monotonicity
of the integral we get the following result.</p>
        <p>Proposition 3. Let f 2 F be analytic and ~v 2 Dom(f ). Then for all vectors ~e =
(g1(w1); : : : ; gn(wn)) (gn+1(cn+1); : : : ; gr(f )(cr(f ))) with cn+1; : : : ; cr(f ) 2 IR, and r1; : : : ; rn 2
IR s.t. g([0; r1]) g([0; rn]) fgn+1(cn+1)g fgr(f )(cr(f ))g Dom(f ), we have
Z r1
0</p>
        <p>! !
f (~e) dwn : : : dw1</p>
        <p>Z r1
: : :</p>
        <p>Z rn</p>
        <p>! !
Pk(f ;~e;~v) Rk(f ;~e;~v) dwn : : : dw1.</p>
        <p>If we replace f (g1(w1); : : : ; gr(f )(wr(f ))) with Pk(f ; (g1(w1); : : : ; gr(f )(wr(f ));~v)
Rk(f ; (g1(w1); : : : ; gr(f )(wr(f ));~v) in a basic formula, by Prop. 3 we get a less
demanding formula, provided the operator is in f&lt;; g, like in normal forms.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Approximation of Hybrid Automata</title>
      <p>
        Approximations of HA are obtained by weakening formulae [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <sec id="sec-4-1">
        <title>Definition 6 ([6]). An HA H 0 is an approximation of an HA H if H 0 is obtained</title>
        <p>from H by replacing each formula in H with a formula 0 s.t. ~  ~ 0.</p>
        <p>We aim to give a notion of approximation for HA respecting Def. 6. We start
with a notion of approximation for normal forms inspired by Prop. 3.</p>
        <sec id="sec-4-1-1">
          <title>Definition 7. For a normal form 2 (X; F) and k 2 IN, if each f 2 F n f+; ; g that</title>
          <p>appears in is derivable k +1 times and is analytic, then the approximation of of
degree k is the set of formulae denoted A( ; k) defined inductively wrt. as follows:
1. If R0z1 : : : R0zn f (g1(w1); : : : ; gr(f )(wr(f ))) dwn : : : dw1 ax, then either A( ; k)
is the singleton f g, if f is a polynomial, or A( ; k) contains all the formulae
k;~v</p>
          <p>Z z1
0
: : :</p>
          <p>Z zn
0</p>
          <p>! !
Pk(f ; g(w~);~v) Rk(f ; g(w~);~v) dwn : : : dw1
ax
with g(w~) = (g1(w1); : : : ; gr(f )(wr(f ))) and ~v 2 Dom(f );
2. If 1 ^ 2 then A( ; k) = f k1 ^ k2 j k1 2 A( 1; k) and
3. If 1 _ 2 then A( ; k) = f k1 _ k2 j k1 2 A( 1; k) and
4. If 9y: 0 then A( ; k) = f9y: k0 j k0 2 A( 0; k)g;
5. If 8y: 0 then A( ; k) = f8y: k0 j k0 2 A( 0; k)g.
2
k 2 A( 2; k)g;
2
k 2 A( 2; k)g;</p>
          <p>Let us prove that all formulae in A( ; k) are less demanding than .</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>Theorem 4. For a normal form</title>
        <p>for all 0 2 A( ; k).</p>
        <p>and k 2 IN s.t. A( ; k) is defined, then ~ 
~ 0
Proof (sketch). By structural induction over . The proof of the base case
follows from Prop. 3, the inductive steps are standard.</p>
        <p>From the approximation of normal forms we get an approximation of HA.</p>
      </sec>
      <sec id="sec-4-3">
        <title>Definition 8. Assume an HA H s.t. A( ; k) is defined for each formula in H . The approximation of degree k for H is the set of the PHA denoted A(H ; k) that are obtained from H by replacing each formula in H with some formula in A( ; k).</title>
        <p>An immediate corollary of Thm. 4 states that Def. 8 respects Def. 6.</p>
        <sec id="sec-4-3-1">
          <title>Corollary 1. Given any HA H and k 2 IN, all PHA in A(H ; k) are approximations</title>
          <p>of H according to Def. 6.</p>
          <p>Example 3. Let us consider the tank controller H of Ex. 1 where in i2n. The
set A(H; 4) contains the automaton obtained from H by approximating
function g in in by choosing the real 0 as vector ~v. ( out does not change since all
functions are polynomial). Since Dwk( cos(w)) = Dwk cos(w) = cos(w + k 2 ), it
h(yo32!l)d3s tchoast(4P 42(c)os(;y4y2!)24; 0=) 1 +cyo24s(0)2y48 .cMoso(r2e)ov(eyr2,)R14(ccooss;(y22; 02))= (Cy22(!c)2os; 4co)s((3y12)2602+1) .
Now, C(cos; 4) = maxfj cos(w + 4 2 )j : w 2 Dom(g)g = 1, therefore we have that
2
in 4;0</p>
        </sec>
        <sec id="sec-4-3-2">
          <title>Theorem 5. Given any HA H and k; n 2 IN, if A(H; k) is defined, then, for all PHA</title>
          <p>Hk 2 A(H; k) it holds that Postn(H) Postn(Hk).</p>
          <p>Proof (sketch). By Thm. 4 and the monotonicity of Post.</p>
          <p>Thm. 5 gives us a sound method for showing that H cannot reach some bad
configuration (q;~u) in n steps. In fact, by Thm. 2 it is computable if (q;~u) can be
reached in n steps by a PHA Hk in A(H; k). By Thm. 5 if (q;~u) cannot be reached
in n steps by Hk then it cannot be reached in n steps by H as well.
5</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Analysis of the Error</title>
      <p>
        In order to limit the error introduced by the approximation, Def. 6 is
strengthened in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] by the notion of -approximation, which requires that any vector
satisfying a formula 0 of the approximation H0 must be “close” to at least one
vector satisfying the corresponding formula in the original HA H. We
reformulate this notion in terms of a notion of neighborhood of a space in IRn.
      </p>
      <p>Given two vectors ~u = (u1; : : : ; un) and ~v = (v1; : : : ; vn) in IRn, let d(~u;~v) denote
their distance d(~u;~v) = p(u1 v1)2 + : : : + (un vn)2.</p>
      <p>Given a vector ~v and a real &gt; 0, let N(~v; ) denote the space of vectors
f~u j d(~v;~u) g. Then, for a space S IRn and a real 0, the neighborhood of ray
of space S is the set of spaces N(S; ) = fS0 S j 8~v0 2 S0 9~v 2 S s.t. d(~v;~v0) g.</p>
      <sec id="sec-5-1">
        <title>Definition 9. A formula 0 2 (F; X) is an -approximation of a formula</title>
        <p>(F; X) iff fv(~X) j v 2 ~ 0g 2 N(fv(~X) j v 2 ~ g; ).
2</p>
        <sec id="sec-5-1-1">
          <title>Definition 10 ([6]). An HA H0 is an -approximation of an HA H if H0 is ob</title>
          <p>tained from H by replacing each formula in H with a formula 0 s.t. 0 is an
-approximation of .</p>
          <p>
            Our aim is to study the conditions over formulae in H ensuring that, for
any &gt; 0, there exists some k0 2 IN s.t. for all k &gt; k0 we have that the set A(H ; k)
contains only -approximations for H . In [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ] we argued that formulae of the
form f (~x) c with 2 f&lt;; &gt;g should be avoided, since they describe open sets. In
[
            <xref ref-type="bibr" rid="ref11">11</xref>
            ] we argued also that we can manage only formulae constraining variables
within bounded intervals, thus avoiding variables that can tend to the infinity.
          </p>
        </sec>
      </sec>
      <sec id="sec-5-2">
        <title>Definition 11. A normal form 2 (F; X) is bounded iff for any variable x in</title>
        <p>we have that Dom(x) = [lx; rx], for suitable rationals lx; rx 2 Q, and for each
function f in we have that Dom(f ) = [l1; r1] : : : [lr(f ); rr(f )], for suitable rationals
l1; r1; : : : ; lr(f ); rr(f ) 2 Q.
5.1</p>
        <p>Syntactical Analysis of the Error
First of all let we give the intuition why for bounded normal formulae with
comparison operator we have that and for all &gt; 0 there exists some k0 s.t.
for all k &gt; k0, A( ; k) contains only -approximations of .</p>
        <p>Consider a normal form R0d f (x; y)dx 0. All formulae in A( ; k) are of
the form R0d P(f ; (x; y); (cx; cy )) Rk(f ; (x; y); (cx; cy )) dx 0 for a vector (cx; cy ) 2
Dom(f ). Since is bounded, we can split Dom(R0d f (x; y)dx) (which is a function
over variable y) in m closed intervals S1; : : : ; Sm of size strictly &lt; . Let i1; : : : ; il 2
f1; : : : ; mg be the indexes s.t. no evaluation in ~  maps y to Si1 [ : : : [ Sil , namely
there is no u 2 Si1 [ : : : [ Sil satisfying R0d f (x; u)dx 0. It is enough to show that
no evaluation vk in any ~ k with k 2 A( ; k) maps y to Si1 [ : : : [ Sil . In fact, if
vk(y) 2 Sj with j &lt; fi1; : : : ; ing, by the definition of j1; : : : ; jl there is some v 2 ~ 
with v(y) 2 Sj and, since the size of Sj is bounded by , we infer vk(y) v(y) &lt; .</p>
        <p>Hence the target is to show that there exists some k0 s.t. for all k &gt; k0 we
have that for all u 2 Si1 [ : : : [ Sil the following inequality holds:</p>
        <p>P(f ; (x; u); (cx; cy )) Rk(f ; (x; u); (cx; cy )) dx &gt; 0.
(1)
Since Si1 [ : : : [ Sil is a closed set, R0d f (x; u)dx is a continuous function (which
follows by the continuity of f ), and the comparison symbol guarantees that
R0d f (x; u)dx is strictly positive in Si1 [: : :[Sil , we can define # = minfR0d f (x; u)dx j
u 2 Si1 [ : : : [ Sil g. Since [0; d] Si1 [ : : : [ Sil is a closed set, we can define
ek = maxfRk(f ; (u0; u); (cx; cy ))) j u0 2 [0; d] ^ u 2 Si1 [ : : : [ Sil g. By Prop. 2.2 we
can find a k0 s.t. for all k &gt; k0, ek &lt; #=(2 d). Assume k &gt; k0. We show Eq. 1 by
=
=
&gt;</p>
        <p>0
Z d</p>
        <p>0
Z d</p>
        <p>0
Z d</p>
        <p>0
Z d
0
(P(f ; (x; u); (cx; cy )) Rk(f ; (x; u); (cx; cy )))dx
(P(f ; (x; u); (cx; cy )) ekdx
(P(f ; (x; u); (cx; cy )) + rk(f ; (x; u); (cx; cy )) rk(f ; (x; u); (cx; cy )) ekdx
f (x; u) rk(f ; (x; u); (cx; cy )) ekdx</p>
        <p>f (x; u) ek ekdx
f (x; u)
f (x; u)dx #
f (x; u)dx</p>
        <p>f (x; u)dx = 0
with the first inequality by the definition of ek and the monotonicy of the
integral, the second by jrk(f ; (x; u); (cx; cy ))j Rk(f ; (x; u); (cx; cy )) and the definition
of ek, the third by ek &lt; 2#d , and the last inequality by the definition of #.</p>
        <sec id="sec-5-2-1">
          <title>Theorem 6. Given any bounded normal form</title>
        </sec>
      </sec>
      <sec id="sec-5-3">
        <title>2 (F; X) s.t. each subformula</title>
        <p>Z z1
0
: : :</p>
        <p>Z zn
0</p>
        <p>! !
f (g1(w1); : : : ; gr(f )(wr(f ))) dwn : : : dw1
ax
in is such that is , then, for each &gt; 0, there exists some k0 s.t. for each k &gt; k0,
the set A( ; k) contains only -approximations for .</p>
        <p>The result above can be immediately extended to automata.</p>
        <sec id="sec-5-3-1">
          <title>Corollary 2. Given any HA H s.t. each formula in H satisfies the hypothesis of</title>
        </sec>
        <sec id="sec-5-3-2">
          <title>Thm. 6, then, for each &gt; 0, there exists some k0 s.t. for each k &gt; k0 the set A(H; k)</title>
          <p>contains only -approximations for H.
5.2 Semantical Analysis of the Error
Our aim is to measure how close the behaviors of the PHA in A(H; k) and the
behavior of H are.</p>
          <p>Definition 12. Let 0. The neighborhood of ray of a region R is the set of
regions N(R; ) = fR0 R j 8(q0;~u0) 2 R0: 9 (q;~u) 2 R: q = q0 and d(~u;~u0) g.</p>
          <p>Under the hypothesis of Thm. 6, for all n 2 IN, if k tends to the infinity, then
the behavior of length at most n of each PHA Hk 2 A(H; k) gets close to the
behavior of H, in the sense that Postn(Hk) is in a neighborhood of Postn(H) of
ray arbitrarily small. This comes from the fact that Postn(Hk) can be expressed
by means of a formula by using existential quantifications.</p>
        </sec>
        <sec id="sec-5-3-3">
          <title>Theorem 7. Consider an HA H s.t. each formula in H satisfies the hypothesis of</title>
        </sec>
      </sec>
      <sec id="sec-5-4">
        <title>Thm. 6. For each &gt; 0 and n 2 IN, there exists some k0 s.t., for all k &gt; k0, we have</title>
        <p>Postn(Hk) 2 N(Postn(H); ) for all Hk 2 A(H; k).
In this paper we have defined syntactical over–approximations for Hybrid
Automata enriched with integrals. The approximation is based on Taylor
polynomials. We have also studied their syntactical and semantical convergence w.r.t.
the original specifications.</p>
        <p>
          As future work we will also study under–approximations based on the same
technique. The idea is to define the under–approximation of degree k of a
formula by using the polynomial which approximates the reminder to
increasing the Taylor polynomial. Moreover we can extend our work with function
variables by following the theory developed in [
          <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
          ]. Finally, our results can be
used to study cyber physical attacks ([
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]) by using tools like as Ariadne ([
          <xref ref-type="bibr" rid="ref3">3</xref>
          ])
based on Taylor theory.
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Courcoubetis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Halbwachs</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. A.</given-names>
            <surname>Henzinger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. H.</given-names>
            <surname>Ho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Nicollin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Olivero</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sifakis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Yovine</surname>
          </string-name>
          .
          <source>The Algorithmic Analysis of Hybrid Systems. Theor. Comput. Sci</source>
          .
          <volume>138</volume>
          (
          <issue>1</issue>
          ) (
          <year>1995</year>
          )
          <fpage>3</fpage>
          -
          <lpage>34</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. A.</given-names>
            <surname>Henzinger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. H.</given-names>
            <surname>Ho</surname>
          </string-name>
          .
          <source>Automatic Symbolic Verification of Embedded Systems. IEEE Trans. Software Eng</source>
          .
          <volume>22</volume>
          (
          <issue>6</issue>
          ) (
          <year>1996</year>
          )
          <fpage>181</fpage>
          -
          <lpage>201</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>A.</given-names>
            <surname>Balluchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Casagrande</surname>
          </string-name>
          , P. Collins,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ferrari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Villa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. L.</given-names>
            <surname>SangiovanniVincentelli</surname>
          </string-name>
          .
          <article-title>Ariadne, a Framework for Reachability Analysis of Hybrid Automata</article-title>
          .
          <source>Proc. Int. Symp. on Mathematical Theory of Networks and Systems</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>V.</given-names>
            <surname>Castiglioni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Lanotte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Tini</surname>
          </string-name>
          .
          <article-title>A Function Elimination Method for Checking Satisfiability of Arithmetical Logics</article-title>
          .
          <source>Proc. of the 23th International Workshop CS&amp;P</source>
          <year>2014</year>
          , CEUR Workshop Proceedings 1269, pp.
          <fpage>46</fpage>
          -
          <lpage>57</lpage>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>V.</given-names>
            <surname>Castiglioni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Lanotte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Tini</surname>
          </string-name>
          .
          <article-title>A Function Elimination Method for Checking Satisfiability of Arithmetical Logics</article-title>
          .
          <source>Fundamenta Informaticae</source>
          <volume>143</volume>
          :
          <fpage>51</fpage>
          -
          <lpage>71</lpage>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>T. A.</given-names>
            <surname>Henzinger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. H.</given-names>
            <surname>Ho</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wong-Toi</surname>
          </string-name>
          .
          <article-title>Algorithmic Analysis of Nonlinear Hybrid Systems</article-title>
          .
          <source>IEEE Trans. Automat. Contr</source>
          .
          <volume>43</volume>
          (
          <issue>4</issue>
          ) (
          <year>1998</year>
          )
          <fpage>540</fpage>
          -
          <lpage>554</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>T. A.</given-names>
            <surname>Henzinger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. W.</given-names>
            <surname>Kopke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Puri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Varaiya</surname>
          </string-name>
          .
          <source>What's Decidable About Hybrid Automata? J. Comput. Syst. Sci</source>
          .
          <volume>57</volume>
          (
          <issue>1</issue>
          ) (
          <year>1998</year>
          )
          <fpage>94</fpage>
          -
          <lpage>124</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>R.</given-names>
            <surname>Lanotte</surname>
          </string-name>
          .
          <article-title>Expressive Power of Hybrid Systems with Real Variables, Integer Variables and Arrays</article-title>
          .
          <source>J. Autom. Lang. Comb</source>
          .
          <volume>12</volume>
          (
          <issue>3</issue>
          ):
          <fpage>373</fpage>
          -
          <lpage>405</lpage>
          (
          <year>2007</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>R.</given-names>
            <surname>Lanotte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Merro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Muradore</surname>
          </string-name>
          ,
          <string-name>
            <surname>L.</surname>
          </string-name>
          <article-title>Vigan o´. A Formal Approach to CyberPhysical Attacks. Submitted for publication</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>R.</given-names>
            <surname>Lanotte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Tini</surname>
          </string-name>
          .
          <article-title>Taylor Approximation for Hybrid Systems</article-title>
          .
          <source>Proc. Hybrid Systems: Computation and Control, LNCS 3114</source>
          , Springer, Berlin,
          <year>1999</year>
          , pp.
          <fpage>402</fpage>
          -
          <lpage>416</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>R.</given-names>
            <surname>Lanotte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Tini</surname>
          </string-name>
          .
          <source>Taylor Approximation for Hybrid Systems. Information and Computation</source>
          <volume>205</volume>
          (
          <issue>11</issue>
          ):
          <fpage>1575</fpage>
          -
          <lpage>1607</lpage>
          (
          <year>2007</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>R.</given-names>
            <surname>Lanotte</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Maggiolo-Schettini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Tini</surname>
          </string-name>
          .
          <article-title>Information flow in hybrid systems</article-title>
          .
          <source>ACM Trans. Embedded Comput. Syst</source>
          .
          <volume>3</volume>
          (
          <issue>4</issue>
          ):
          <fpage>760</fpage>
          -
          <lpage>799</lpage>
          (
          <year>2004</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>A.</given-names>
            <surname>Pnueli</surname>
          </string-name>
          and J.
          <string-name>
            <surname>Sifakis</surname>
          </string-name>
          (Eds.),
          <source>Special Issue on Hybrid Systems, Theor. Comput. Sci</source>
          .
          <volume>138</volume>
          (
          <issue>1</issue>
          ) (
          <year>1995</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>D.</given-names>
            <surname>Richardson</surname>
          </string-name>
          .
          <article-title>Some Undecidable Problems Involving Elementary Functions of a Real Variable</article-title>
          .
          <source>J. Symbolic Logic</source>
          <volume>33</volume>
          (
          <year>1968</year>
          ), no.
          <issue>4</issue>
          ,
          <fpage>514</fpage>
          -
          <lpage>520</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>A.</given-names>
            <surname>Tarski</surname>
          </string-name>
          .
          <article-title>A Decision Method for Elementary Algebra and Geometry</article-title>
          . University of California Press, Berkeley, California,
          <year>1951</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>