Next Article in Journal
TwiFly: A Data Analysis Framework for Twitter
Previous Article in Journal
Information Dynamics in Complex Systems Negates a Dichotomy between Chance and Necessity
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A New Approach to Nonlinear Invariants for Hybrid Systems Based on the Citing Instances Method

1
Chengdu Institute of Computer Application, Chinese Academy of Sciences, Chengdu 610041, China
2
University of Chinese Academy of Sciences, Beijing 100049, China
3
Guangxi Key Laboratory of Hybrid Computation and IC Design Analysis, Guangxi University for Nationalities, Nanning 53006, China
4
School of Computer Software, Henan University, Kaifeng 475001, China
*
Author to whom correspondence should be addressed.
Information 2020, 11(5), 246; https://doi.org/10.3390/info11050246
Submission received: 20 March 2020 / Revised: 3 April 2020 / Accepted: 9 April 2020 / Published: 2 May 2020
(This article belongs to the Section Information Theory and Methodology)

Abstract

:
In generating invariants for hybrid systems, a main source of intractability is that transition relations are first-order assertions over current-state variables and next-state variables, which doubles the number of system variables and introduces many more free variables. The more variables, the less tractability and, hence, solving the algebraic constraints on complete inductive conditions by a comprehensive Gröbner basis is very expensive. To address this issue, this paper presents a new, complete method, called the Citing Instances Method (CIM), which can eliminate the free variables and directly solve for the complete inductive conditions. An instance means the verification of a proposition after instantiating free variables to numbers. A lattice array is a key notion in this paper, which is essentially a finite set of instances. Verifying that a proposition holds over a Lattice Array suffices to prove that the proposition holds in general; this interesting feature inspires us to present CIM. On one hand, instead of computing a comprehensive Gröbner basis, CIM uses a Lattice Array to generate the constraints in parallel. On the other hand, we can make a clever use of the parallelism of CIM to start with some constraint equations which can be solved easily, in order to determine some parameters in an early state. These solved parameters benefit the solution of the rest of the constraint equations; this process is similar to the domino effect. Therefore, the constraint-solving tractability of the proposed method is strong. We show that some existing approaches are only special cases of our method. Moreover, it turns out CIM is more efficient than existing approaches under parallel circumstances. Some examples are presented to illustrate the practicality of our method.

1. Introduction

In the real world, there exist many systems exhibiting mixed discrete–continuous behavior, which cannot be described in a proper way by using either a discrete or continuous model. The notion of a hybrid automaton has been introduced for modeling such systems [1]. For example, embedded systems are often modeled as hybrid systems due to their involvement in both digital control software and analog plants, the physical process of which is often specified in the form of differential equations.
Safety verification is among the most challenging problems in verifying hybrid systems, which consists of asking whether a set of bad (unsafe) states can be reached from a set of initial states. The safety verification problem for systems described by non-linear differential equations is particularly complicated, as computing the exact reachable set is usually intractable [2,3,4], with the exception of some severely restricted sub-classes, such as timed automata [5] and initialized rectangular automata [6].
However, for purposes of verification of safety properties, it often suffices to compute an over-approximation of the reachable set of states—if the over-approximation does not intersect the set of bad states, then the original system will never reach a bad state. So far, the existing approaches are mainly based on approximate reachable set computations [7,8,9] and abstraction [10,11,12,13,14].
An over-approximation of the reachable states is also called an invariant of the system. The most precise invariant of a system is its exact reach set. The standard technique for proving a safety property φ is to generate an inductive invariant ψ that implies φ . Moreover, invariants have the benefit of avoiding computing the exact reachable set of hybrid systems and are very useful for hybrid systems which are described by non-linear differential equations which cannot be solved analytically.
Some typical techniques for invariants are based on templates, which are used to search for inductive invariant assertions with standard computational techniques in algebraic geometry involving Gröbner basis [3,15]. The intuitive idea behind these techniques is that of first fixing a template assertion (i.e., a parametric polynomial with unknown coefficients and of bounded degree in the system variables) and encoding inductive conditions into constraints on unknown coefficients, such that any solution to these constraints is an inductive assertion. This technique guarantees that the invariant must be found if the system has it in that form. However, the key challenges for these techniques is how to define an inductive condition with completeness and how to efficiently compute an inductive invariant that satisfies the inductive condition. Usually, these two aspects contradict each other; that is, an inductive condition with completeness often encounters the computability or complexity problem. Sankaranarayanan et al.’s approach [3], for example, makes significant strides in generating non-linear polynomial equations as invariants of a hybrid system. Their approach consists of the following four main steps:
  • Guessing a template polynomial of fixed degree as a candidate inductive invariant.
  • Defining complete inductive conditions.
  • Utilizing a comprehensive Gröbner basis to encode complete inductive conditions into constraints on parameters and, therefore, reducing the invariant generation problem to a non-linear constraint solving problem.
  • Solving constraints on parameters. Any solution with respect to the constraints is an inductive invariant.
In order to encode the complete inductive conditions, a comprehensive Gröbner basis is involved, which is an exact but impractical encoding as the construction of the comprehensive Gröbner basis is very expensive. Hence, Sankaranarayanan et al. resorted to more tractable (but incomplete) inductive conditions (as shown in Tables 7 and 8) to avoid the explicit construction of a comprehensive Gröbner basis. However, in doing so, their approach sacrifices completeness [3]. The exact steps of [3] go as follows.
  • Guessing a template polynomial of fixed degree as candidate inductive invariant.
  • Defining alternative inductive conditions—which are incomplete but more tractable—to take the place of complete inductive conditions.
  • Utilizing a Gröbner basis to encode the alternative inductive conditions into constraints on parameters.
  • Solving the constraints. Any solution with respect to the constraints is an inductive invariant.
To address this issue, instead of computing a comprehensive Gröbner basis, this paper presents a new technique, called Citing Instances Method (CIM). By substituting real numbers for the variables in the complete inductive conditions, CIM can easily derive a set of constraints on the parameters, which can be solved more efficiently by the elimination of free variables. This idea is inspired by the Parallel Numerical Method, which was first presented in [16,17]. The paper showed that a theorem can be proved by carrying out a series of numerical verifications of one certain instance. Their method was firstly used to prove geometric theorems; furthermore, many classic theorems, such as Simson’s Theorem and Ptolemy’s Theorem, were proved using this technique. Differing from the parallel numerical method, CIM is used to generate constraints on parameters. For example, it is well-known that there are many methods to generate a constraint on { a , b } which guarantees that the identity below holds,
x 3 4 x 2 + 2 x + 1 ( x 1 ) ( x 2 + a x + b ) 0 .
  • Zero Polynomial Theorem [3]: x 3 4 x 2 + 2 x + 1 ( x 1 ) ( x 2 + a x + b ) x 3 4 x 2 + 2 x + 1 ( x 3 + ( a 1 ) x 2 + ( b a ) x b ) ( a + 3 ) x 2 + ( 2 b + a ) x + 1 + b . By the Zero Polynomial Theorem, three constraint equations are obtained synchronously, { a + 3 = 0 , 2 b + a = 0 , 1 + b = 0 } , solving { b = 1 , a = 3 } .
  • CIM (this paper): Take four arbitrary distinct values { 1 , 0 , 1 , 2 } of x and substitute them for x in the left side of (1), respectively. Then, equate the left side of (1) to zero (e.g., when x = 0 , then 1 + b = 0 is obtained). Hence, four constraint equations can be derived independently: { 4 2 a + 2 b = 0 , 1 + b = 0 , 0 = 0 , 7 2 a b = 0 } . Solving, we get { b = 1 , a = 3 } . Here is an intuitive explanation of CIM: when { b = 1 , a = 3 } and the degree of the polynomial in the left side of (1) is 3, the equation must have at most three roots. However, the left side of (1) vanishes over { 1 , 0 , 1 , 2 } , which means that the equation (1) has at least four roots. Therefore, the equation (1) must be identically equal to zero.
In this paper, by an instance, we mean a verification of the proposition by substituting numbers for the variables in the proposition. CIM exhibits two interesting features: (1) the constraint equations can be obtained in parallel. As a result, we can make hla clever use of this feature to speed up our computation. In fact, some special assignments to variables tend to generate constraints easily and some parameters may be determined in the early stage. For example, x = 0 b = 1 in (1): this solution can be used to simplify the rest of the constraint equations on the parameters. Thus, solving constraint equations becomes easier. (2) By substituting real values for the variables, all or some of the variables are, in fact, eliminated by an instance. The main source of the intractability of hybrid systems is that transition relations are first-order assertions on current-state variables and next-state variables, which doubles the number of system variables and may introduce many more free variables and encoding inductive conditions by a comprehensive Gröbner basis will be very expensive. In contrast, CIM can be used to eliminate these free variables. Generally, to automatically discover invariants, the more variables, the less tractability.
Inspired by [16,17], this paper presents a new and complete algorithm for invariant generation in hybrid systems. A lattice array, which is a key notion introduced in this paper and essentially a finite set of instances, will be directly applied to the complete inductive conditions to generate the constraint on parameters, and any solution to the constraint produces an inductive assertion. The main idea of our approach is sketched as follows:
  • Guessing a template of a fixed degree as an invariant template.
  • Defining the complete inductive conditions.
  • Applying a lattice array to the complete inductive conditions to generate the constraint on the parameters.
  • Solving the constraint. Any solution to the constraint guarantees the template an inductive invariant.
The main contributions of this paper are as follows: Firstly, we propose a complete method for constructing invariants of hybrid systems which can solve the complete inductive conditions rather than alternative incomplete inductive conditions. Secondly, CIM takes the place of a comprehensive Gröbner basis in the invariant generation process, and the tractability of constraint-solving is stronger. On one hand, CIM utilizes instances to eliminate the free variables (fewer variables leads to higher tractability). On the other hand, the generation of constraint equations by CIM is parallelized by their independence from each other. Therefore, we can make a clever use of the parallelizability of CIM to start with constraint equations generated by special instances and spread the solutions to some parameters determined in the early stage to other constraint equations, which hence simplifies the constraint equations obtained; this whole process works a bit like the Domino Effect. Therefore, the tractability of the constraint-solving is stronger than comprehensive Gröbner basis computation. Thirdly, CIM involves less symbolic computation and that is why it requires fewer computational resources.

Related Work

Recently, many researchers have devoted effort towards finding the non-linear invariants of hybrid systems. Based on the theory of ideals and Gröbner bases, Sankaranarayanan et al. [3] presented an approach for generating polynomial equation invariants for hybrid systems with more general (non-linear) polynomial dynamics. To control the complexity of the constraint solving, however, this method has to make a trade-off between the complexity of the invariant generation process and the strength of the resulting invariants and several stronger conditions replace the complete conditions. Differing from Sankaranarayanan et al.’s approach, the paper [18] presented a complete method that was not based on guessing a template. However, it is only complete for linear systems. Without resorting to Gröbner bases, the paper [19] implemented the promising algorithm Fastind. Although its use is limited to a discrete system, Fastind executes significantly faster than implementations using Gröbner bases. Fastind is based on remainder computations over parameterized polynomials, and is still an incomplete method. Not coming singly but in pairs, Kong et al. [15] proposed an approach to automatically generate invariant clusters for semi-algebraic hybrid systems by computing the remainder of the Lie derivative of a template polynomial with respect to its Gröbner basis. The benefit of invariant clusters is that they can precisely overapproximate trajectories of the system. Another approach considered barrier certificates based on different inductive conditions [4,20,21,22] which can be solved efficiently by sum-of-squares (SOS) programming. The zero level set of barrier certificates forms the boundary of the reach set of a hybrid system and, hence, is an invariant. However, this approach is limited by the conservative inductive condition. On the whole, the verification problem of hybrid systems is undecidable: it is doomed to be impossible to find a universal approach for all hybrid systems. This implies that various inductive invariants and computational methods can be proposed for different classes of hybrid systems with some simplification or restriction. Some other approaches, which focus on different features of systems, have also been proposed for the construction of inductive invariants [23,24,25,26,27].
The paper is organized as follows. Section 2 is devoted to details about the modeling framework and some elementary lemmas on which CIM is based. We introduce the theory of the proposed CIM and describe the algorithms in Section 3. Constraint generation by CIM and techniques for solving these constraint equations are discussed in Section 4. In Section 5, we show that the approach of [3] is a special case of CIM. In Section 6, the technique is illustrated with a few examples. Finally, Section 8 concludes our work and discusses the future work in this direction.

2. Preliminaries

In this section, we introduce the lemmas on which CIM is based, as well as presenting our computational model of algebraic hybrid systems. First, we clarify some notation used throughout the paper.
We denote by K [ x 1 , , x n ] the polynomial ring in n indeterminates { x 1 , , x n } over the field K . For conciseness, we also use boldface lowercase letters to denote vectors throughout the paper (e.g., x = x = ( x 1 , , x n ) ). If n = 1 , K [ x ] is called a univariate polynomial ring; it is called a multivariate polynomial ring when n > 1 . Let the variables be ordered as x 1 x 2 x n . Moreover, we assume K = R throughout the paper unless otherwise specified.
For a multivariate polynomial ring, K [ x ] = K [ x 1 , , x k 1 , x k , x k + 1 , , x n ] = K [ x 1 , , x k 1 , x k + 1 , , x n ] [ x k ] . This means that a multivariate polynomial p K [ x ] can be written as a univariate polynomial; that is, p = a i 1 i 2 i n x 1 i 1 x n i n = c m x k m + c m 1 x k m 1 + + c 0 = i = 0 m c i x k i , where c i K [ x 1 , , x k 1 , x k + 1 , , x n ] , m = deg ( p , x k ) . For example, p ( x 1 , x 2 , x 3 , x 4 ) = x 2 5 + x 3 4 x 4 2 + ( 2 x 2 + x 1 ) x 4 3 can be considered as a univariate polynomial in x 2 , namely p ( x 1 , x 2 , x 3 , x 4 ) = x 2 5 + 2 x 4 3 x 2 + x 1 x 4 3 + x 3 4 x 4 2 .
An atomic algebraic assertion ϕ over K [ x ] has the form of p ( x 1 , x 2 , , x n ) = 0 . An algebraic assertion is a conjunction of atomic algebraic assertions (i.e., i p i ( x 1 , x 2 , , x n ) = 0 , where p i K [ x ] ). We denote by x ^ an assignment of x .

2.1. Basic Lemmas

Lemma 1
([16]). Let f ( x ) and g ( x ) be univariate polynomials of degree less than n. If there are n + 1 distinct numbers b 0 , b 1 , , b n K such that for every b k one has f ( b k ) = g ( b k ) with k = 0 , 1 , , n . Then,
f ( x ) g ( x ) .
It is very easy to understand Lemma 1. If h ( x ) = f ( x ) g ( x ) = 0 , then h ( x ) has n + 1 roots at least. Meanwhile, h ( x ) is a univariate equation, the degree of which is less than n and which has n roots at most. As h ( x ) is not identical to zero, it contradicts the fact that h ( x ) has at least n + 1 roots. In this paper, we call the n + 1 distinct numbers { b 0 , b 1 , , b n } n + 1 instances. Lemma 1 shows that, in order to prove that two univariate polynomials are identical, it suffices to test n + 1 instances. Moreover, the n + 1 instances can be chosen arbitrarily. Lemma 1 can be extended to multivariate polynomials. For this purpose, we need the following definition.
Definition 1
(Lattice Array [16]). Suppose S 1 , S 2 , , S m K such that | S j | = t j with j { 1 , , m } , where | S j | denotes the size of S j . We call the Cartesian product of the above m subsets,
S = S 1 × S 2 × × S m ,
the m-dimensional lattice array on K . Clearly, S has t 1 t 2 t m elements.
For the convenience of discussion in what follows, we denote | S | by ( t 1 , t 2 , , t m ) .
Lemma 2
(Multi-Instances Numerical Verification [16]). Let f x 1 , , x m K x 1 , , x m , deg ( f , x k ) = n k , n k Z + , k = 1 , 2 , , m . If there exists an m-dimensional lattice array S of size ( n 1 + 1 , n 2 + 1 , , n m + 1 ) such that f x 1 , , x m vanishes along S, i.e., for every x ^ 1 , x ^ 2 , , x ^ m S , f ( x ^ 1 , x ^ 2 , , x ^ m ) = 0 , then f is identically equal to zero.
In order to safely conclude whether a proposition is true or false, Multi-Instances Numerical Verification needs a finite set of instances to test it, which has requirements for both the numbers of instances and the relations between instances. The lattice array is defined for this purpose. We first assign variables freely; once variables are assigned, the instances are determined by Definition 1.
Example 1.
Prove (3) by Lemma 2:
( x + y ) x y x 2 y 2 .
1. 
Determining the size of the lattice array. By observation, the degrees of (3) in x and y are both less than or equal to 2, such that the lattice array size is 2 + 1 , 2 + 1 .
2. 
Determining the members of the lattice array. Essentially, the variables x , y can be assigned freely, so we can assign variables which are easy to test. For our convenience, let x = 0 , 1 , 2 and y = 0 , 1 , 2 . Then, the nine instances in the lattice array are ( 0 , 0 ) , ( 0 , 1 ) , ( 0 , 2 ) , ( 1 , 0 ) , ( 1 , 1 ) , ( 1 , 2 ) , ( 2 , 0 ) , ( 2 , 1 ) , and ( 2 , 2 ) .
3. 
Substituting instances for x and y one by one, test whether the left side of (3) is equal to the right side of (3). If one of them leads to the left side of (3) differing from the right side of (3), it is a counterexample for (3) not being an identity. Otherwise, we can conclude that (3) is an identity.
Note: Arbitrarily taking nine points, such as (0,0), (1,1), (3,2), (4,0), (7,1), (2,2), (9,10), (2,7), and (8,9), can these nine points be used to safely prove (3)? Of course, the answer is no. The reason is that these nine points do not conform to the definition of a lattice array. It is easy to find a counterexample (see Figure 1): x + 2 y + 3 z 7 = 14 x + 9 y z 15 is an equation, rather than an equality; however, it is easy to find (1+1,1+1,1+1) points (lying on the intersection) which satisfy x + 2 y + 3 z 7 (the left side) = 14 x + 9 y z 15 (the right side).
Lemma 3
(Pseudo-Remainder Formula for Multivariate Polynomials [28]). Let F , G K x 1 , , x n , and x k be a fixed variable, such that
F = a m x k m + a m 1 x k m 1 + + a 0 , G = b x k + b 1 x k 1 + + b 0 ,
where = deg ( G , x k ) , m = deg ( F , x k ) , and a i , b i K x 1 , , x k 1 , x k + 1 , x n . Let G 0 and m . To pseudo-divide F by G, there exists an algorithm to obtain two polynomials, Q and R, such that l c ( G , x k ) s F = Q G + R , where l c ( G , x k ) is the leading coefficient of G with respect to x k , 0 s m + 1 , deg ( R , x k ) < . Q and R are called the pseudo-quotient and the pseudo-remainder, respectively.
In our algorithm, the size of the lattice array depends on the degree of the pseudo-remainder. The following lemma is given for the purpose of determining an upper bound on the degree.
Lemma 4
([16]). Let f and g be the polynomials in the variables ( u 1 , u 2 , , u n , x ) over a field K :
f = a m x m + a m 1 x m 1 + + a 0 , g = b x + b 1 x 1 + + b 0 ,
where m 1 , 1 , a k , b k are polynomials in the variables ( u 1 , u 2 , , u n ) over K , and a m , b are not zero polynomials. Then there exists a mechanical method to determine the polynomials P , Q , and R in the variables ( u 1 , u 2 u n ) over K such that
P f + Q g = R
and deg ( P , x ) 1 , deg ( Q , x ) m 1 , deg ( R , x ) = 0 . The bound on deg ( R , u j ) is estimated as follows:
Suppose m , and
A 0 = deg f , u j A 1 = deg g , u j + m + 1 A 0 A k + 1 = 2 A k + A k 1 .
Then deg R , u j A m
In particular, if 1 m 2 , deg ( R , u j ) A m can be simply expressed as follows:
deg ( R , u j ) m deg ( g , u j ) + ( m m + 1 ) deg ( f , u j ) .

2.2. Characteristic Set

The mathematical concept of a characteristic set was discovered in the late forties by J.F. Ritt [29]. In the late seventies, the Chinese mathematician Wen-Tsün Wu specialized it with modifications to commutative algebra and demonstrated its power for mechanical theorem proving [30,31].
Let f K [ x 1 , , x n ] , the class of f, denoted by c l a s s ( f ) , is the largest i such that x i occurs in f. If f K , then c l a s s ( f ) = 0 . Let c = c l a s s ( f ) > 0 . We call x c , denoted by l v ( f ) , the l e a d i n g v a r i a b l e of f. Considering f as a polynomial in x c , we can write f as
a n x c n + a n 1 x c n 1 + + a 0
where a n , , a 0 are in K [ x 1 , , x c 1 ] , and a n 0 . We call a n the i n i t i a l or l e a d i n g c o e f f i c i e n t of f and n the l e a d i n g d e g r e e of f, denoting them as l c ( f ) and l d ( f ) , respectively.
Definition 2
(Ascending Set [32]). A sequence of polynomials F = [ F 1 , , F r ] K [ x 1 , , x n ] is said to be an ascending set (or chain), if one of the following two conditions holds:
1. 
r = 1 and F 1 s not identically zero;
2. 
r > 1 and 0 < c l a s s ( F 1 ) < c l a s s ( F 2 ) , , < c l a s s ( F r ) n , and each F i is reduced with respect to the preceding polynomials, F j s ( 1 j < i ) .
Definition 3
(Characteristic Set [32]). Let P K [ x ] is nonempty set of polynomials, and I = P be the ideal generated by P, ascending set F = [ F 1 , , F r ] is the Characteristic Set of P, if F P , and  p r e m ( P , F ) = { 0 } .
The Wu–Ritt Process [32] described how to obtain such the ascending set. Besides Gröbner basis method, characteristic set provides an alternative algorithmic way for solving multivariate polynomial equations or differential equations.

2.3. Hybrid System

In this paper, we adopt the hybrid automata proposed in [1] as our modeling framework. Many other models for hybrid systems can be found in [33,34,35,36].
A hybrid system can be defined as follows:
Definition 4
(Hybrid System ). A hybrid system is a tuple H : V , L , T , 0 , Θ , where
  • L is a finite set of locations (or modes);
  • V is a set of real-valued system variables. The hybrid system state space is denoted by = L × R | V | , a state is denoted by , s , and s R | V | is a continuous state of the variables over the real numbers;
  • T L × L × 2 R | V | × ( R | V | R | V | ) is a set of discrete transitions. A discrete transition τ = 1 , 2 , ρ τ , α τ consists of the pre- and post-locations 1 , 2 , a guard ρ τ (which is a boolean function of the variables V), and an action α τ , which is a first-order assertion over V V , where V denotes the current-state variables and V denotes the next-state variables;
  • F : L ( R | V | R | V | ) is a map that maps each location L to a differential rule f ; that is, F ( ) = f , of the form v ˙ i = f i ( x ) . The differential rule F ( ) specifies how the system variables evolve at the location ℓ, which is also known as a vector field or a flow field;
  • F : L ( R | V | R | V | ) is a map that maps each location L to a differential rule f ; that is, F ( ) = f , of the form v ˙ i = f i ( x ) . The differential rule F ( ) specifies how the system variables evolve at the location ℓ, which is also known as a vector field or a flow field;
  • I : L 2 R | V | is a map that maps each location L to a location condition (location invariant), which is an assertion over V and defines all possible continuous states that the system is allowed to move to while at location ℓ;
  • Θ is an assertion specifying the initial condition; and
  • 0 L is the initial location. We assume that the initial condition satisfies location invariance at the initial location; that is, Θ I ( 0 ) .
The transition and dynamic structures of the hybrid system define a set of trajectories. A trajectory is a sequence of states starting from a state 0 , x ^ 0 Θ , where Θ is an initial state set, consisting of a series of interleaved continuous flows and discrete transitions. During the continuous flows, the system evolves following the vector fields at some location until the invariant condition I ( ) is violated. At some state , x ^ , if there is a discrete transition τ from location to such that ρ τ ( x ^ ) = t r u e , then the discrete transition can be taken.
Definition 5
(Trajectory). A trajectory of a hybrid system H is an infinite sequence of states , x ^ L × R | V | of the form
0 , x ^ 0 , 1 , x ^ 1 , 2 , x ^ 2 , ,
such that
Initiation: x ^ 0 Θ specifies an initial state.
Furthermore, for each consecutive state pair i , x ^ i , i + 1 , x ^ i + 1 , one of the two consecution conditions below is satisfied.
Discrete Consecution: there exists a transition τ : 1 , 2 , ρ τ , α τ T such that τ is enabled; that is, ρ τ ( x ^ i ) = true and x ^ i + 1 = α τ ( x ^ i ) . Or,
Continuous Consecution: i = i + 1 = ; in other words, the location does not change and there exists a time interval, δ > 0 , along which a smooth (continuous and differentiable to all orders) function Ψ : [ 0 , δ ] R | V | exists, such that Ψ evolves from x ^ i to x ^ i + 1 according to the differential rule at location ℓ while satisfying the location condition I ( ) . Formally,
1. 
Ψ ( 0 ) = x ^ 1 , Ψ ( δ ) = x ^ 2 and t [ 0 , δ ] , Ψ ( t ) I ( ) ,
2. 
t [ 0 , δ ] , Ψ ( t ) , Ψ ˙ ( t ) F ( ) .
A hybrid state , x ^ is called a reachable state if it appears in some trajectory of H .
A linear constraint over V is an inequality of the form a 1 x 1 + + a n x n + b 0 , and a linear assertion over a set of variables V is a conjunction of linear constraints over V. The set of points satisfying a linear assertion forms a polyhedron.
A non-linear constraint is an inequality of the form P 0 , where P is a polynomial in { x 1 , , x n } . The constraint is said to be algebraic if P = 0 . A non-linear assertion is a conjunction of non-linear constraints. The set of points satisfying a non-linear assertion is called a semi-algebraic set.
Throughout the paper, given an assertion ψ over the variables V, ψ denotes the assertion obtained by replacing each variable v V by v V .
General hybrid systems can be specialized into algebraic hybrid systems such that, for each transition τ , the transition relation ρ τ is an algebraic assertion over V V and the initial condition Θ is an algebraic assertion over V.
Definition 6
(Algebraic Hybrid Systems ). An algebraic hybrid system is a hybrid system V , L , T , 0 , Θ , where:
1. 
For each transition τ : 1 , 2 , ρ τ , α τ , α τ is an algebraic assertion.
2. 
The initial condition Θ and the location conditions I ( ) are also algebraic assertions.
3. 
Each rule F ( ) is of the form v i ˙ = f i ( v 1 , , v n ) , where f i R [ v 1 , , v n ] .
This paper focuses on algebraic hybrid systems.
Definition 7
(Invariant). An invariant of a hybrid system H at a location ℓ is an assertion ψ such that, for any reachable state , x ^ at ℓ, x ^ ψ .
Template polynomials play an important role in Sankaranarayanan et al.’s approach. Given a degree d, a template polynomial is essentially a generic degree d polynomial; that is, p = i 1 + + i n d L a 1 , , a x 1 i 1 x n i n , where { a 1 , , a } are coefficients to be decided. Sankaranarayanan et al. treat these coefficients { a 1 , , a } as unknowns and encode inductive conditions by a Gröbner basis to generate constraints on the coefficients such that any solution corresponds to an inductive assertion. Formally,
Definition 8
(Template ). Let a = ( a 1 , , a l ) be template variables and L ( a ) be the polynomial of the form β c β a β , where each c β is a real-valued coefficient β = ( β 1 , , β n ) , β n 0 . A d-degree template over { a , x } is a polynomial in the variables x with coefficients L a (i.e., p = i 1 + + i n d L a 1 , , a x 1 i 1 x n i n ).
Hybrid systems generally consist of many locations and, hence, an invariant can be seen as a mapping to map each location to an assertion which is true under any system state reaching the location. Thus, the following two definitions come very naturally.
Definition 9
(Algebraic Assertion Map ). Given a domain of algebraic assertions D , an algebraic assertion map for an algebraic hybrid system is a map η : L D that associates each location of the system with an algebraic assertion, where each algebraic assertion η ( ) is of the form p = 0 .
For simplicity, we shall use η ( ) to denote both the algebraic assertion p = 0 and the polynomial p, as long as it will not cause any ambiguity.
Definition 10
(Template Map). Let H V , L , T , 0 , Θ be an algebraic hybrid system. Assuming a set of template variables a = ( a 1 , , a l ) , a template map over H is a map η : L L ( a ) [ V ] that maps each location in L to a template over { a , V } .
It is a well-known fact, from the pioneering work of Floyd and Hoare [37,38], that if η is an inductive assertion map, then η ( ) is invariant at . In fact, all known invariant generation methods are inductive assertion generation methods.
Definition 11
(Inductive Algebraic Assertion Map ). An inductive algebraic assertion map η ( ) is a map that associates with each location L an assertion η ( ) that holds initially and is preserved by all discrete transitions and continuous flows. More formally, an inductive assertion map satisfies the following requirements:
Initiation: The algebraic assertion at 0 subsumes the initial condition; that is, Θ η 0 .
Discrete Consecution: For each transition τ : i , j , ρ τ , α τ starting from a state satisfying η ( i ) , taking τ leads to a state satisfying η ( j ) . Formally, η i ρ τ α τ η j .
Continuous Consecution: For every location L and states , x ^ 1 , , x ^ 2 such that x ^ 1 evolves from x ^ 2 according to the differential rule F ( ) at ℓ, if x ^ 1 η ( ) , then x ^ 2 η ( ) . If η ( ) is an assertion of the form f ( x ) = 0 and f R [ v 1 , , v | V | ] is a real-valued smooth function, we can express continuous consecution by the following condition:
I ( ) ( x ) ( f ( x ) = 0 ) f ˙ ( x ) = 0 .
Note that f ˙ denotes the Lie derivative of f ( ) along the vector field F ( ) .
An important concept used in this paper is the Lie derivative. In our context, the Lie derivative evaluates the change of a scalar function φ ( x ) along the flow of a vector field of the form x ˙ = f ( x ) , where f ( x ) = ( f 1 ( x ) , , f n ( x ) ) . Formally,
Definition 12
(Lie Derivative).
L f φ ( x ) φ x f ( x ) = i = 1 n φ x i x i ˙ = i = 1 n φ x i f i ( x ) .

3. Theory of CIM

Assuming { a 1 , , a l } are the parameters to be decided, there exists a system of k polynomial equations that involve { l + d + k } indeterminates in formula (4); that is, { a 1 , , a l , u 1 , , u n , x 1 , , x k } . Let the { l + d + k } indeterminates be ordered as x 1 x 2 x k u 1 , , u n a 1 , , a l . By Wu–Ritt’s Algorithm [39], the indeterminates are divided into two categories: dependent variables ( x 1 , , x k ) and independent variables ( u 1 , , u n , a 1 , , a l ).
m = 1 k f m ( a 1 , , a l , u 1 , , u n , x 1 , , x k ) = 0 .
However, for the convenience of discussion, this paper divides the { l + d + k } indeterminates into three categories: x = ( x 1 , , x k ) , u = ( u 1 , , u n ) , and a = ( a 1 , , a l ) , which are called dependent variables, independent variables, and template variables (parameters), respectively. The ring of polynomials with coefficients in K can also be written as K [ a , u , x ] .
In Sankaranarayanan et al.’s approach, encoding complete inductive conditions into the constraint by a comprehensive Gröbner basis will lead to computability problems. In our approach, CIM is used to take the place of a comprehensive Gröbner basis in encoding the complete inductive conditions. Concretely, given an algebraic hybrid system H , we first define a d-degree polynomial as template (i.e., i 1 + + i n d L ( a ) x 1 i 1 x n i n , where a = ( a 1 , , a l ) are the template variables to be decided). CIM is an algorithm for finding all the assignments a ^ = ( a ^ 1 , , a ^ ) to the template variables a that guarantee the truth of a formula of the form:
( u , x ) : m = 1 k f m ( a ^ , u , x ) = 0 G ( a ^ , u , x ) = 0 ,
where a = ( a 1 , , a l ) , u = ( u 1 , , u n ) , and x = ( x 1 , , x k ) , f m , G L ( a ) [ u , x ] are all algebraic assertions. The indeterminates in formula (5) are divided into three groups: a denotes the template variables (parameters), u denotes independent variables, and x denotes dependent variables, as they are constrained by k polynomial equations in the hypothesis of formula (5).
Note: For an invariant generation, the implication (5) will contain more system variables, as transition relations are algebraic constraints on both current-state and next-state variables, which doubles the number of system variables and introduces many more free variables.

3.1. Basic Lemma and Theorem

We first prove a lemma.
Lemma 5.
Let R L ( a ) [ u ] with u = ( u 1 , , u n ) , such that d e g ( R , u i ) = d i ; S R = S 1 × S 2 × × S n be an n-dimensional lattice array of size ( d 1 + 1 , , d n + 1 ) ; and Ω be the following system of equations over a :
Ω : R ( a , u ^ i ) = 0 , i = 1 , , | S R | ,
where u ^ i S R . Then, for any vector a ^ , a ^ is a solution to Ω iff a ^ satisfies the following identity:
R ( a ^ , u ) 0 .
Proof. 
⟹. Suppose that a ^ is a solution to the system of equations (6); that is,
R ( a ^ , u ^ 1 ) = 0 R ( a ^ , u ^ 2 ) = 0 R ( a ^ , u ^ | S R | ) = 0 .
In other words, R ( a ^ , u ) vanishes over S R . By Lemma 2, R ( a ^ , u ) 0 .
⟸. Suppose that there exists a ^ which satisfies R ( a ^ , u ) 0 , then R ( a ^ , u ) must vanish over S R ; that is, for every u ^ i S R ,
R ( a ^ , u ^ i ) = 0 .
In other words, (8) holds; that is, a ^ is a solution to (6). □
Example 2.
(from [3]) Compute the constraint on { a 1 , a 2 , a 3 } such that p = ( 2 a 2 + 3 ) x 1 x 2 2 + 3 a 3 x 2 + 4 ( a 3 + a 1 + 10 ) 0 .
1. 
By observation, the lattice array size of p is (1+1,2+1). Let x 1 = 0 , 1 and x 2 = 1 , 0 , 1 . Then, six instances in the lattice array are 0 , 1 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 1 , 1 .
2. 
For each instance, the constraint is obtained by substituting, which consists of the six equations shown in Table 1.
3. 
Solving the above six equations: a 1 = 10 , a 2 = 3 2 , a 3 = 0 , as in [3].
Problem: Given a formula in the form of (5), how do we compute all the possible values a ^ for a for which (5) holds?
The traditional method is to construct a Gröbner basis [3] of { f 1 , , f k } . Let I = I d e a l ( { f 1 , , f k } ) be the ideal generated by { f 1 , , f k } and G be a polynomial. By Hilbert’s Nullstellensatz [40], the formula (5) holds is equivalent to that there exists an integer m 1 such that G m belongs to I. Therefore, according to Hilbert’s Nullstellensatz, to compute all the possible a ^ that make the formula (5) hold, one has to enumerate all the m 1 to find all the a ^ that make G m I based on Gröbner basis, which is apparently not possible because there is an infinite number of m.
For the above reason, Sankaranarayanan et al. chose to set m = 1 to find all the a ^ that make G I in [3]. There are two drawbacks to this approach. Firstly, since G I is just a sufficient condition for the formula (5) to hold, the approach can only find part of the solutions to (5) which is not complete. Secondly, computing a ^ in this way involves constructing a comprehensive Gröbner basis [41], a variant of the Gröbner basis, which is very expensive (double exponential in the dimension of the variables). To avoid this issue, the basic idea of CIM is “turning the difficulty of quality into the complexity of quantity”. We now introduce our Theorem 1:
Theorem 1.
Given x 1 x 2 x k u 1 , , u n a 1 , , a l , let F = { f i , i = 1 , , k } be defined as in formula (5) and F i ( a , u , x 1 , , x i ) , i = 1 , , k be the ascending set of F obtained by Wu–Ritt’s Algorithm [39]. Then, there must exist a sequence of polynomials P i ( a , u , x ) , i = 1 , , k , Q ( a , u , x ) , and R ( a , u ) , such that the following equation holds:
i = 1 k P i F i + Q G = R .
Moreover, for any assignment a ^ to a , the formula (5) holds if R ( a ^ , u ) 0 and the following system of equations has no solution
F i ( a ^ , u , x 1 , , x i ) = 0 , i = 1 , , k , Q ( a ^ , u , x ) = 0 .
Proof. 
For the convenience of proof, let formula (11) denote the hypothesis of (5) and formula (12) denote the conclusion of the formula (5):
m = 1 k f m ( a , u , x ) = 0 ,
G ( a , u , x ) = 0 .
Now, we show how to construct such a series of polynomials P i , Q , and R L ( a ) [ u ] satisfying Equation (9).
By applying Lemma 4 to F k and G, we can obtain P ˜ k F k + Q k G = R k ( a , u , x 1 , , x k 1 ) . Similarly, by applying Lemma 4 to F k i and R k i repeatedly, we get the following sequence of equations,
P ˜ k F k + Q k G = R k , P ˜ k 1 F k 1 + Q k 1 R k = R k 1 , P ˜ k 2 F k 2 + Q k 2 R k 1 = R k 2 , . P ˜ 2 F 2 + Q 2 R 3 = R 2 , P ˜ 1 F 1 + Q 1 R 2 = R 1 ,
where R 1 L ( a ) [ u ] , R i L ( a ) [ u , x 1 , , x i 1 ] ,   i = 2 , , k and P ˜ i and Q i L ( a ) [ u , x 1 , , x i ]   , i = 1 , , k . Note that R 1 does not contain the variable x i any more.
Next, by a sequence of substitutions of R k i in (13), in a top-down order, we can easily derive the following equation:
P ˜ 1 F 1 + j = 2 k i = 1 j 1 Q i P ˜ j F j + j = 1 k Q j G = R 1 .
Now, let R = R 1 , P 1 = P ˜ 1 , P j = i = 1 j 1 Q i P ˜ j , j = 2 , , k , and Q = j = 1 k Q j . Then, we can obtain the following equation:
i = 1 k P i F i + Q G = R .
Suppose that there exists an assignment a ^ to a that satisfies R ( a ^ , u ) 0 and the system of Equations (10) has no solution; we prove the formula (5) holds. As R 0 , we get
i = 1 k P i F i = Q G .
In addition, as the system of equations (10) has no solution, for any ( u ^ , x ^ ) , F i ( a ^ , u ^ , x ^ ) = 0 we can deduce that Q ( a ^ , u ^ , x ^ ) 0 . Then, by the Equation (15), we deduce that G ( a ^ , u ^ , x ^ ) = 0 as well. Therefore, formula (5) holds. Note that, in Wu–Ritt’s algorithm, Q = j = 1 k Q j 0 is called the non-degenerate condition [39]. □
Remark 1.
According to Theorem 1, we know that the solutions a ^ to a that satisfy R ( a ^ , u ) 0 and the system of Equations (10) have no solution satisyfing formula (5) as well. Therefore, the idea for finding a ^ to make formula (5) hold is that we must first solve the constraint on a derived from R ( a , u ) 0 to find all the solutions a ^ and decide whether the system of Equations (10) has a solution, given a = a ^ . For the first step, we use Lemma 5. Regarding whether the non-degenerate condition is true or not, we can make use of the criterion presented in [39] (i.e., I 1 I 2 I k 0 , I i is the initial of F i ). From the above analysis, we can see that the solution to R ( a , u ) 0 cannot ensure that formula (5) holds. If the non-degenerate condition is false, formula (5) may or may not hold, which is crucial to the theorem’s proof by CIM or by Wu–Ritt’s Algorithm [39]. Fortunately, for invariant generation, it only means we need another step to verify the obtained invariant. Generally, verifying invariants is less expensive than generating invariants, which also means that our invariant generation algorithm is a two-phase algorithm.

3.2. Generate the Constraint for Implication by CIM

By Lemma 5, in order to generate a constraint over the template variables a that guarantees R ( a , u ) to be identical to zero, we only need test whether R ( a , u ) vanishes over a lattice array S R of size ( deg ( R , u 1 ) + 1 , deg ( R , u 2 ) + 1 , , d e g ( R , u n ) + 1 ) , where the upper bound of deg ( R , u i ) can be estimated by Lemma 4.
More specifically, take u ^ S R , substitute for u in (11) and (12), compute R ( a ) by the division algorithm (Lemma 4), and then equate R ( a ) = 0 to obtain the constraint equations. This process is similar to Wu’s division method, but is simpler as the u = ( u 1 , , u n ) have been replaced by the numbers (instances). However, the aforementioned benefits come at a cost. The benefits are that the free variables are eliminated, the cost is that the implication (5) turns into | S R | simpler implications without free variables. This is the main idea of CIM: “turning the difficulty of quality into the complexity of quantity”. If (5) is too difficult to deal with, CIM is meaningful. We outline our algorithm for generating constraints by computing R in Algorithm 1.
Algorithm 1: Generating constraint for implication by R.
  • input: The hypothesis of implication f m ( a 1 , , a , u 1 , , u n , x 1 , x k ) , the conclusion of implication
         G ( a 1 , , a , u 1 , , u n , x 1 , , x k ) = 0 , and A i the upper bound of deg ( R , u i ) , U is the set of independent variables, M a x A
        is the maximum of A i , i n s t is a an n-dimension vector of the form u ^ 1 , , u ^ n , L A is the set of n-dimension vector.
  • output: C, the set of constraints on template variables { a 1 , , a } , a log file to record the process details.
1 /*by default C and L A are */;
2 C = ;
3 L A = ;
4 /*The nested loop structure aims to generate a lattice array for independent variables of { u 1 , , u n } of size ( M a x A n ); for simplicity, u i = 0 , , M a x A */
5for i = 0 to M a x A do
Information 11 00246 i001
13 end
14 foreachinst in LAdo
Information 11 00246 i002
33 end
34 returnC;
  • u = { u 1 , , u n } and x = { x 1 , , x k } are independent variables and dependent variables, respectively.
  • Lines 5–13 aim to generate Lattice Array.
  • Lines 16–22 aim to substitute real values for { u 1 , , u n } in f i and G and, hence, eliminate the independent variables. It is obvious that instances will simplify the computation of proposition (5).
  • Lines 14–33 are a ForEach loop, hence, the algorithm is easy to parallelize.
  • To make Algorithm 1 simpler, we can use M a x ( deg ( f m , u i ) , deg ( G , u i ) ) to take the place of A i , the upper bound of deg ( R , u i ) , which is not allowed for theorem proving, as | S R | is crucial to theorem proving by CIM. However, for invariant generation, it only means we need to verify the obtained constraint in the second phase (Section 4).

Complexity Analysis

Assuming that the degree of each variable in f i is no more than d (i.e., d e g ( f i ) d , 1 i k ), and no more than δ in g (i.e., d e g ( g ) δ ), our method consists of three main steps. In the first step, we transform the equations (11) into triangular sets (i.e., equations in triangular form) by Wu–Ritt’s method. By [32], the complexity of computing the characteristic set of (11) is O ( k O ( + n + k ) ( d + 1 ) O ( + n + k ) 3 ) ; however, CIM eliminates the independent variables ( u 1 , , u n ) , such that the complexity of computing the characteristic set for every instance is O ( k O ( + k ) ( d + 1 ) O ( ( + k ) 3 ) ) . As the size of the lattice array is n ( d + 1 ) at most, the total complexity is O ( n ( d + 1 ) k O ( + k ) ( d + 1 ) O ( + k ) 3 ) . The second step is the process of constructing R by applying the pseudo-division algorithm to f and g, which can be decomposed into a series of steps to eliminate the highest power in x i . Assuming d e g ( F i ) λ , by [32], the complexity of computing R is O ( δ O ( + n + k ) ( λ + 1 ) O ( ( + n + k ) k ) ) at most, and CIM eliminates the independent variables ( u 1 , , u n ) and, so, the complexity of computing R is O ( n ( d + 1 ) δ O ( + k ) ( λ + 1 ) O ( ( + k ) k ) ) . Thus, complexities of Wu–Ritt’s method and CIM in steps 1 and 2 are O ( k O ( + n + k ) 2 ( d + 1 ) O ( + n + k ) 4 ) and O ( n ( d + 1 ) k O ( + k ) 2 ( d + 1 ) O ( + k ) 4 ) , respectively. Therefore, according to the above analysis, we can see that our approach is exponential in the degree of the involved polynomials, the number of variables as well as the number of the involved polynomials. However, according to [42], the complexity of computing Gröbner basis is d 2 ( + n + k + O ( 1 ) ) , which is double exponential. Therefore, the approach in [3] is obviously more expensive than CIM approach.

4. Illustration of CIM

In this section, we illustrate CIM by an example taken from [3], and discuss some skills in computing R by different kinds of implications generated in every step. Note that the main idea of CIM is “turning the difficulty of quality into the complexity of quantity” and, hence, can solve the complete inductive conditions, under which the approach by a comprehensive Gröbner basis in [3] is intractable.
V = { y , v y , δ } , L = { l } , T = { τ } , w h e r e τ : l , l , δ > 0 y = 0 y = y v y = v y 2 δ = 0 , Θ = ( y = 0 v y = 16 δ = 0 ) , F ( l ) = ( y ˙ = v y δ ˙ = 1 v y ˙ = 10 ) , I ( l ) = y 0 , 0 = l .
Example 3
(Bouncing Ball, from [3]). Figure 2 shows a graphical representation of a ball bouncing on a soft floor, which can be modeled as a hybrid system. The variable y represents the position of the ball (obviously, y = 0 represents the ball being at floor level), v y represents its velocity, and δ denotes the time elapsed since its last bounce. A bounce is modeled by the transition τ, in which the velocity v y of the ball is halved and the ball reverses direction.
Our approach consists of the following steps:
  • Guessing a template of fixed degree as an invariant template.
  • Defining the complete inductive conditions.
  • Applying a lattice array to the complete inductive conditions to generate the constraint on the parameters
  • Solving the constraint. Any solution to the constraint guarantees the template an inductive invariant
Different from the existing approaches, we use CIM to encode the complete inductive conditions.
Step 1. Predefine the template map
Just as in [3], we set the degree of the invariant at 2, as there is only one location l. We set η ( l ) to be a generic quadratic form on y , v y , δ , as follows:
η l : a 1 y 2 + a 2 v y 2 + a 3 δ 2 + a 4 y v y + a 5 v y δ + a 6 y δ + a 7 y + a 8 v y + a 9 δ + a 10 .
Step 2. Generate constraint for the initial condition
( y = 0 v y = 16 δ = 0 ) η ( l )
In (16), there are three variables, which are constrained by three equations in Θ . Thus, there are no independent variables. By Algorithm 1, R = a 10 + 256 a 2 + 16 a 8 and, then, we obtain the constraint a 10 + 256 a 2 + 16 a 8 = 0 ; the same result as in [3].
Step 3. Encode the discrete consecution
By Definition 11, the discrete consecution can be expressed by the following implication:
η ( l ) = 0 ρ τ α τ η ( l ) = 0 , ρ τ : y = 0 , α τ : y = y δ = 0 v y = v y 2 .
  • In (17), there are six variables that are constrained by five equations. We might as well assume that { y , y , v y , δ , δ } are dependent variables, and { v y } is the independent variable. The degree of { v y } is 2 and the size of the lattice array is (2+1). and, so, three implications are obtained (Table 2).
  • Applying Algorithm 1. We get three simpler implications and three corresponding R by Lemma 3 (Table 2).
At last, we get three constraint equations { a 10 = 0 , a 10 + 1 4 a 2 1 2 a 8 = 0 , a 10 + a 2 a 8 = 0 } . Solving, we obtain { a 10 = 0 , a 2 = 0 , a 8 = 0 } .
Step 4. Encode the Continuous Consecution
By Definition 11, the continuous consecution can be expressed by the implication
I ( l ) ( η ( l ) = 0 ) ( η ( l ) ˙ = 0 ) ,
where η ( l ) ˙ is the Lie Derivative of η ( l ) with respect to F ( l ) ,
η ( l ) ˙ = η ( l ) y y ˙ + η ( l ) δ δ ˙ + η ( l ) v y v y ˙ ;
that is,
η ( ) ˙ = a 4 v y 2 + 2 a 1 y v y + a 6 δ v y + ( 20 a 2 + a 5 + a 7 ) v y + ( 2 a 3 10 a 5 ) δ + ( 10 a 4 + a 6 ) y + ( a 9 10 a 8 ) .
In (18), there are three variables which are constrained by one equations (we ignore I ( l ) = y 0 ). We might as well assume that { v y } is the dependent variable and that { y , δ } are independent variables. The degree of y and δ is 2 and the size of the lattice array is (2+1,2+1). Applying Algorithm 1 to (18). Thus, nine implications are obtained (Table 3 ). We analyze some implications to illustrate the domino effect:
  • 0 = 0 a 4 v y 2 + ( a 5 + a 7 ) v y + a 9 = 0
    By Algorithm 1, F i is a constant, the consequent of implication is R, i.e., R = a 4 v y 2 + ( a 5 + a 7 ) v y + a 9 , and the constraint equations are { a 5 = a 7 , a 4 = 0 , a 9 = 0 } . We will use this solution to simplify the remaining eight implications and the same below. Thus, the resulting implications become more and more simple (Table 4), we call it the domino effect, which is the benefit of parallelism in CIM.
  • a 7 v y + 2 a 3 = 0 a 6 v y + 2 a 3 + 10 a 7 = 0
    By Algorithm 1, R = 2 a 3 a 7 + 10 a 7 2 + 2 a 3 a 6 and 2 a 3 a 7 + 10 a 7 2 + 2 a 3 a 6 = 0 is the constraint equation. However, by comprehensive Gröbner basis, we need to compute the remainder under two situations: a 7 = 0 and a 7 0 . If a 7 is polynomial, situation becomes very complicated. This is why Sankaranarayanan et al. defined Alternative Consecution Relations to eliminate template variables in the antecedent of implication to avoid construction of comprehensive Gröbner basis. However, every coin has two sides. In Wu–Ritt’s Algorithm, a 7 = 0 means non-degenerate condition is false, the solution to 2 a 3 a 7 + 10 a 7 2 + 2 a 3 a 6 = 0 may or may not satisfy the formula (5), which is crucial to the theorem’s proof by CIM. Fortunately, for invariant generation, it only means we need another step to verify the obtained invariant. Generally, verifying invariants is less expensive than generating invariants.
  • a 1 + a 7 = 0 2 a 1 v y + a 6 = 0
    By Algorithm 1, a 1 + a 7 is a constant, so R = 2 a 1 v y + a 6 and a 1 = 0 , a 6 = 0 . We continue to simplify the implications(Table 5).
  • a 7 v y + a 3 = 0 2 a 3 + 10 a 7 = 0
    By Algorithm 1, R = 2 a 3 + 10 a 7 and the constraint is a 3 = 5 a 7 , continue to simplify the implications(Table 6).
At last, the final constraint equations in the template variables are
a { 1 , 2 , 4 , 6 , 8 , 9 , 10 } = 0 ,
a 5 + a 7 = 0 ,
5 a 7 + a 3 = 0 ,
and the corresponding invariant is y = v y δ + 5 δ 2 [3].

5. A Special Case

In this section, we show that Sankaranarayanan et al.’s approach is a special case of our method.
In Sankaranarayanan et al.’s approach, the antecedent of the discrete consecution implication { η i = 0 ρ τ α τ η j = 0 } and continuous consecution implication { I ( ) η ( ) = 0 η ( ) ˙ = 0 } contain template variables, which requires the construction of a comprehensive Gröbner basis, a variant of the Gröbner basis [41]. Unfortunately, encoding inductive conditions by comprehensive Gröbner bases is an exact but impractical approach, as the non-linear constraints produced make the constraint-solving problem intractable, even for a simple hybrid system. Sankaranarayanan et al. defined as Alternative Consecution Relations (as shown in Table 7 and Table 8) to eliminate template variables in the antecedent of implication. In doing this, (17), (18), and (5) are transformed into (20), (21), and (22), respectively. Obviously, (22) is a special case of (5), the antecedent of which does not contain any more parameters. In particular, if the transition relations are separable [3]—that is, each variable in V is expressed as a polynomial expression over the variables in V—we can generate constraints more easily by CIM, as the antecedent of implication has been the ascending set.
ρ τ α τ η ( l ) λ η ( l ) = 0 ,
I ( l ) η ( l ) ˙ λ η ( l ) = 0 ,
m = 1 k f m ( u 1 , , u n , x 1 , , x k ) = 0 G ( a 1 , , a , u 1 , , u n , x 1 , , x k ) = 0 .
We apply Algorithm 1 to (20) and (21).
  • For the initial condition case, it is same as Step 1.
  • For the discrete consecution case (with λ d ), assume that { y , y , v y , δ } are dependent variables, { v y , δ } are independent variables, and the size of lattice array is (2+1, 2+1).
  • For the continuous consecution case (with λ c ), there are no dependent variables as I ( l ) 0 is ignored, { v y , δ , y } are independent variables, and the size of lattice array is (2+1, 2+1,2+1).
  • Solving these 37 implications, the following two groups of constraints are obtained:
a 1 = 0 , a 2 = 0 , a 3 = 0 , a 4 = 0 , a 5 = 0 , a 6 = 0 , a 7 = 0 , a 8 = 0 , a 9 = 0 , a 10 = 0 , λ d = λ d , λ c = λ c ;
a 1 = 0 , a 2 = 0 , a 3 = 5 a 7 , a 4 = 0 , a 5 = a 7 , a 6 = 0 , a 7 = a 7 , a 8 = 0 , a 9 = 0 , a 10 = 0 , λ d = 0 , λ c = 0 .
Obviously, (23) is a trivial solution, (24) is the same as in [3], and the corresponding invariant is y = v y δ + 5 δ 2 .
Remark 2.
The main shortcoming of our approach lies in that CIM tends to produce many redundant instances, which results in more time consumption than Sankaranarayanan et al.’s approach (4.9 s vs. 3.7 s in Maple, respectively). However, CIM is intrinsic to be parallelized; under parallel circumstances, our method is less time-consuming (0.9 s vs. 3.7 s in Maple). In addition, the generation procedure for constraint equations in our approach is simpler (which can even be done by hand), as numerical computation takes the place of symbolic computation.

6. Experiments

To show the practicality of CIM, we present another two application examples. One is a train system, the other is a charged particle in a magnetic field.

6.1. Experiment 1

Consider a train system (from [3]). Figure 3 shows a hybrid automaton modeling a train accelerating (location l 0 ), traversing at constant speed ( l 1 ), and decelerating ( l 2 ). There exist three continuous variables in the train system: x, the position of the train; v, the train’s velocity; and t, a master clock. The system has one discrete variable s, representing the number of stops made so far. The initial condition is given by { x = s = v = t = 0 } . There are three discrete transitions τ 1 , τ 2 , and τ 3 ; the transition relations are as follows:
ρ τ 1 α τ 1 : v = 5 i d ( s , x , v , t ) , ρ τ 2 α τ 2 : i d ( s , x , v , t ) , ρ τ 3 α τ 3 : v = 0 s = s + 1 t = t + 2 i d ( x , v ) ,
where i d ( x ) denotes x = x .
η l i , i = 0 , 1 , 2 is the template map,
η l 0 : a 1 x 2 + a 2 x s + a 3 x t + a 4 x v + a 5 s 2 + a 6 s t + a 7 s v + a 8 t 2 + a 10 v 2 + a 11 x + a 12 s + a 13 t + a 14 v + a 15 ,
η l 1 : b 1 x 2 + b 2 x s + b 3 x t + b 4 x v + b 5 s 2 + b 6 s t + b 7 s v + b 8 t 2 + b 10 v 2 + b 11 x + b 12 s + b 13 t + b 14 v + b 15 ,
η l 2 : c 1 x 2 + c 2 x s + c 3 x t + c 4 x v + c 5 s 2 + c 6 s t + c 7 s v + c 8 t 2 + c 10 v 2 + c 11 x + c 12 s + c 13 t + c 14 v + c 15 ,
Applying Algorithm 1, 2250 instances in total and the following constraints are obtained:
a { 1 , , 9 , 15 } = 0 , a 10 = 1 4 b 11 λ d 12 λ d 20 a 11 = b 11 λ d 12 λ d 20 a 12 = 115 4 b 11 λ d 12 λ d 20 b { 1 , , 9 } = 0 b 10 = 1 2 b 11 , b 11 = b 11 b 12 = 115 4 b 11 , b 13 = 5 b 11 b 14 = 5 b 11 , b 15 = 75 4 b 11 , c { 1 , , 9 } = 0 c 10 = 1 2 b 11 λ d 12 c 11 = b 11 λ d 12 c 12 = 115 4 b 11 λ d 12 , c 13 = 5 b 11 λ d 12 , c 14 = 5 b 11 λ d 12 , c 15 = 75 4 b 11 λ d 12 , λ c 0 = 0 , λ c 1 = 0 , λ c 2 = 0 , λ d 01 = 1 λ d 12 λ d 20 , λ d 12 = λ d 12 , λ d 20 = λ d 20 ,
where λ c i denotes continuous consecution λ at location l i , and λ d i j denotes discrete consecution λ for translation from l i to l j .
When b 11 = 1 , λ d 12 = λ d 20 = 1 , the invariant is obtained as follows:
η ( l 0 ) : v 2 4 x 10 v + 115 s + 20 t = 0 , η ( l 1 ) : 5 v 2 + 4 x v + 115 v s 20 v t = 0 , η ( l 2 ) : 2 v 2 + 4 x 20 v + 115 s 20 t + 75 = 0 ,
which the same as that derived in [3].

6.2. Experiment 2

In this experiment, we consider a charged particle in a magnetic field (from [3]).
Figure 4 shows a charged particle in a 2D-plane with a reflecting barrier at x = 0 and a magnetic field at x d 0 . There are eight system variables in total: the particle’s position x , y ; its velocity v x , v y ; a bounce counter b, which is incremented every time the particle collides against the barrier at x = 0 ; along with the parameters a , d , and time t. There also exist three locations: magnetic, right, and left. 729 instances are generated by Algorithm 1 and the following invariants were obtained at last:
l e f t : v y + 2 = 0 v x 2 = 0 a ( x + y ) = 4 b 4 a b m a g n e t i c : v y + 2 = a ( x 2 ) v x 2 + v y 2 = 8 v x 2 = a ( y + 2 ) + 4 b ( 1 a ) r i g h t : v y + 2 = 0 v x + 2 = 0 a ( x y ) = 4 ( b + 1 ) ( 1 a )
which are the same as those obtained in [3].

7. A Clever Use of CIM

The other method is that, in order to generate constraints without computing R, we can make a clever use of the left side of (9); that is, we only need to make G vanish over a lattice array S R . Once G vanishes over S R , R naturally vanishes over S R , which means that R 0 , according to Lemma 2. More specifically, for each u ^ S R , first substitute it for u in (11) (this also means that free variables are eliminated). Then, compute the roots r ( a 1 , , a n ) of x in a and, finally, substitute r ( a 1 , , a n ) for x in (12). Now, we have a polynomial constraint G ( a 1 , , a n ) = 0 in a . Solving G ( a 1 , , a n ) = 0 generates a set of solutions to a which satisfy formula (5). However, there is an issue with this approach: r i is not always easy to compute even though the free variables are replaced by numbers. In that case, we can experimentally obtain the roots of dependent variables. Here is an example.
We illustrate, in this example, how to experimentally obtain the roots of dependent variables. Figure 5 shows a graphical representation of an accumulator with varying accumulation every second, which can be modeled as a hybrid system where t is a continuous-time variable, s is the accumulator, and i is the varying accumulation; the system will terminate when i increases to 100. Obviously, Figure 5 has an invariant s = i ( i + 1 ) 2 .
The target template invariant is a generic degree-two template polynomial: η = a 0 s 2 + a 1 s i + a 2 s t + a 3 s + a 4 i 2 + a 5 i t + a 6 i + a 7 t 2 + a 8 t + a 9 . For the discrete consecution condition, we have
η = 0 i i 1 = 0 s s i = 0 t = 1 t = 0 η = 0 ,
assuming { s , i , s , t , t } are the dependent variables and { i } is the independent variable. By CIM, we need compute the roots of { s , i , s , t , t } under the lattice array { i = 0 , 1 , 2 , 3 } .
Generally speaking, it is difficult to collect accurate continuous states during the dynamics of a system. When discrete translations are taken, however, we can easily collect continuous states and discrete states (as discrete translations are often controlled by computer software), such that we can collect the roots of { s , s , i , t , t } in the log file by adding two statements to the discrete translation (Figure 6).
The starting point is to run the system with i = 0 , s = 0 , t = 0 and collect the roots of { s , i , s , t , t } in the log file (Table 9) during every discrete transition.
Finally, we obtain the invariant s = i ( i + 1 ) 2 . Without directly computing the roots, CIM can dramatically reduce the complexity. Similar ideas appeared in [43,44].

8. Conclusions

In this paper, we presented a new approach (called CIM) for invariant generation in hybrid systems. Some examples are given to illustrate how CIM works. The cornerstones of our technique are theories based on the solution number of polynomial equations and Wu–Ritt’s Well-Ordering Theorem.
CIM can take the place of a comprehensive Gröbner basis for invariant generation. Furthermore, the authors are confident that most of the symbolic algebra used in existing methods can be replaced using this technique. Comparing to the well-established approaches in this field, CIM exhibits the following features which make it interesting:
  • Applying instances by essentially instantiating the free variables to real numbers. Hence, the free variables are removed.
  • Comparing to the existing approaches, CIM can solve the complete inductive conditions directly and is a complete approach.
  • According to our analysis, Wu–Ritt’s method has exponential complexity while Gröbner basis method has double exponential complexity. Therefore, our approach is more efficient.
  • The main idea of CIM is “turning the difficulty of quality into the complexity of quantity”. If Formula (5) is too difficult to deal with, CIM turns (5) into | S R | simpler implications without free variables, then CIM is meaningful.
  • Parallelization is another advantage of CIM. CIM was created to be a parallel method. To raise the computer’s calculation capacity, one important method is to develop both parallel machines and parallel algorithms.
We also wish to extend CIM to the inequality field. In fact, the famous algorithm of cylindrical algebraic decomposition (CAD) [45] is a typical algorithm of proving by instances.
Many algorithms rely on the computation of (comprehensive) Gröbner basis [19]. If the whole task is too difficult to be accomplished using a Gröbner basis in one stroke, CIM can solve it by using many instances. From another perspective, CIM can be regarded as a Divide and Conquer (DAC)-type method. In Example 3, as it is too difficult to encode continuous consecution using a comprehensive Gröbner basis, we can first use CIM to obtain nine simpler implications and then apply (comprehensive) Gröbner basis, one-by-one. The combination of the CIM and (comprehensive) Gröbner basis is another interesting research goal.

Author Contributions

Conceptualization and Formal analysis, H.H. and J.W.; Investigation, H.H. All authors have read and agreed to the published version of the manuscript.

Funding

This work was partly supported by the National Natural Science Foundation of China under Grant No. 61772006, the Science and Technology Program of Guangxi under Grant No. AB17129012, the Science and Technology Major Project of Guangxi under Grant No. AA17204096,the Special Fund for Scientific and Technological Bases and Talents of Guangxi under Grant No. AD16380076, and the Special Fund for Bagui Scholars of Guangxi.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Henzinger, T.A. The theory of hybrid automata. Available online: https://pub.ist.ac.at/~tah/Publications/the_theory_of_hybrid_automata.pdf (accessed on 10 April 2020).
  2. Alur, R. Formal verification of hybrid systems. In Proceedings of the 2011 Ninth ACM International Conference on Embedded Software (EMSOFT), Taipei, Taiwan, 9–14 October 2011; pp. 273–278. [Google Scholar]
  3. Sankaranarayanan, S.; Sipma, H.B.; Manna, Z. Constructing invariants for hybrid systems. Form. Methods Syst. Des. 2008, 32, 25–55. [Google Scholar] [CrossRef] [Green Version]
  4. Kong, H.; He, F.; Song, X.; Hung, W.N.; Gu, M. Exponential-condition-based barrier certificate generation for safety verification of hybrid systems. In Proceedings of the 25th International Conference on Computer Aided Verification (CAV2013), Saint Petersburg, Russia, 13–19 July 2013; pp. 242–257. [Google Scholar]
  5. Alur, R.; Dill, D.L. A theory of timed automata. Theor. Comput. Sci. 1994, 125, 183–235. [Google Scholar] [CrossRef] [Green Version]
  6. Henzinger, T.A.; Kopke, P.W.; Puri, A.; Varaiya, P. What’s decidable about hybrid automata? J. Comput. Syst. Sci. 1998, 57, 94–124. [Google Scholar] [CrossRef] [Green Version]
  7. Bogomolov, S.; Donzé, A.; Frehse, G. Guided search for hybrid systems based on coarse-grained space abstractions. Int. J. Softw. Tools Technol. Transf. 2015, 18, 1–19. [Google Scholar]
  8. Bogomolov, S.; Frehse, G.; Grosu, R. A box-based distance between regions for guiding the reachability analysis of SpaceEx. In Proceedings of the 24th International Conference on Computer Aided Verification (CAV 2012), Berkeley, CA, USA, 7–13 July 2012; pp. 479–494. [Google Scholar]
  9. Kong, H.; Bartocci, E.; Henzinge, T.A. Reachable Set Over-Approximation for Nonlinear Systems Using Piecewise Barrier Tubes. In Proceedings of the 30th International Conference on Computer Aided Verification (CAV2018), Oxford, UK, 14–17 July 2018; pp. 449–467. [Google Scholar]
  10. Tiwari, A. Abstractions for hybrid systems. Form. Methods Syst. Des. 2008, 32, 57–83. [Google Scholar] [CrossRef] [Green Version]
  11. Bogomolov, S.; Herrera, C.; Muniz, M. Quasi-dependent variables in hybrid automata. In Proceedings of the 17th Int. Workshop on Hybrid Systems: Computation and Control, Berlin, Germany, 15–17 April 2014; pp. 93–102. [Google Scholar]
  12. Bogomolov, S.; Schilling, C.; Bartocci, E. Abstraction-based parameter synthesis for multiaffine systems. In Proceedings of the 11th Haifa Verification Conference (HVC 2015), Haifa, Israel, 17–19 November 2015; pp. 19–35. [Google Scholar]
  13. Bogomolov, S.; Frehse, G.; Greitschus, M. Assume-guarantee abstraction refinement meets hybrid systems. In Proceedings of the 10th Haifa Verification Conference (HVC 2014), Haifa, Israel, 18–20 November 2014; pp. 116–131. [Google Scholar]
  14. Boreale, M. Algorithms for exact and approximate linear abstractions of polynomial continuous systems. In Proceedings of the 21st ACM International Conference on Hybrid Systems: Computation and Control, Porto, Portugal, 11–13 April 2018; pp. 207–216. [Google Scholar]
  15. Kong, H.; Bogomolov, S. Safety Verification of Nonlinear Hybrid Systems Based on Invariant Clusters. In Proceedings of the 20th ACM International Conference on Hybrid Systems: Computation and Control, Pittsburgh, PA, USA, 18–20 April 2017; pp. 163–172. [Google Scholar]
  16. Zhang, J.; Yang, L.; Deng, M. The parallel numerical method of mechanical theorem proving. Theor. Comput. Sci. 1990, 74, 253–271. [Google Scholar] [CrossRef] [Green Version]
  17. Zhang, J.; Lu, Y. Principles of parallel numerical method and single-instance method of mechanical theorem proving (in Chinese). J. Math. Pract. Theory 1989, 1, 36–45. [Google Scholar]
  18. Rodríguez-Carbonell, E.; Tiwari, A. Generating Polynomial Invariants for Hybrid Systems. In Proceedings of the 8th International Workshop on Hybrid Systems: Computation and Control, Zurich, Switzerland, 9–11 March 2005; pp. 590–605. [Google Scholar]
  19. Cachera, D.; Jensen, T.; Jobin, A.; Kirchner, F. Inference of polynomial invariants for imperative programs: A farewell to gröbner bases. Sci. Comput. Program. 2014, 93, 89–109. [Google Scholar] [CrossRef]
  20. Roux, P.; Voronin, Y.L.; Sankaranarayanan, S. Validating numerical semidefinite programming solvers for polynomial invariants. Form. Methods Syst. Des. 2018, 53, 286–312. [Google Scholar] [CrossRef] [Green Version]
  21. Tiwari, A.; Khanna, G. Nonlinear systems: Approximating reach sets. In Proceedings of the 7th International Workshop on Hybrid Systems: Computation and Control, Philadelphia, PA, USA, 25–27 March 2004; pp. 171–174. [Google Scholar]
  22. Prajna, S.; Jadbabaie, A. Safety verification of hybrid systems using barrier certificates. In Proceedings of the International Workshop on Hybrid Systems: Computation and Control, Philadelphia, PA, USA, 25–27 March 2004; pp. 271–274. [Google Scholar]
  23. Johnson, T.T.; Mitra, S. Invariant synthesis for verification of parameterized cyber-physical systems with applications to aerospace systems. In Proceedings of the AIAA Infotech at Aerospace Conference, Boston, MA, USA, 19–22 August 2013; p. 4811. [Google Scholar]
  24. Gulwani, S.; Tiwari, A. Constraint-based approach for analysis of hybrid systems. In Proceedings of the 20th International Conference on Computer Aided Verification, Princeton, NJ, USA, 7–14 July 2008; pp. 190–203. [Google Scholar]
  25. Sassi, B.; Amin, M.; Girard, A.; Sankaranarayanan, S. Iterative computation of polyhedral invariants sets for polynomial dynamical systems. In Proceedings of the 53rd IEEE Conference on Decision and Control (IEEE CDC2014), Los Angeles, CA, USA, 15–17 December 2014; pp. 6348–6353. [Google Scholar]
  26. Liu, J.; Zhan, N.; Zhao, H. Computing semi-algebraic invariants for polynomial dynamical systems. In Proceedings of the 11th International Conference on Embedded Software (EMSOFT 2011), Taipei, Taiwan, 9–14 October 2011; pp. 97–106. [Google Scholar]
  27. Boreale, M. Complete Algorithms for Algebraic Strongest Postconditions and Weakest Preconditions in Polynomial ODE’S. In Proceedings of the 44th International Conference on Current Trends in Theory and Practice of Informatics, Krems, Austria, 29 January–2 February 2018; pp. 442–455. [Google Scholar]
  28. Gallo, G.; Mishra, B. Wu-Ritt Characteristic Sets and Their Complexity. Discret. Comput. Geom. 1991, 6, 111–136. [Google Scholar]
  29. Ritt, J.F. Differential Algebra; American Mathematical Society: Providence, RI, USA, 1950. [Google Scholar]
  30. Wu, W. On the decision problem and the mechanization of theorem-proving in elementary geometry. Sci. China 1978, 29, 117–138. [Google Scholar]
  31. Wu, W. Basic principles of mechanical theorem proving in elementary geometries. J. Autom. Reason. 1986, 2, 221–252. [Google Scholar]
  32. Gallo, G. and Mishra, B. Efficient algorithms and bounds for Wu-Ritt characteristic sets. Eff. Methods Algebr. Geom. 1991, 94, 119–142. [Google Scholar]
  33. Alur, R.; Courcoubetis, C.; Halbwachs, N.; Henzinger, T.A. The algorithmic analysis of hybrid systems. Theor. Comput. Sci. 1995, 138, 3–34. [Google Scholar] [CrossRef] [Green Version]
  34. Maler, O.; Manna, Z.; Pnueli, A. From timed to hybrid systems. In Proceedings of the REX workshop 1991, Mook, The Netherlands, 3–7 June 1991; pp. 447–484. [Google Scholar]
  35. Alur, R.; Henzinger, T.A. Modularity for timed and hybrid systems. In Proceedings of the 8th InInternational Conference on Concurrency Theory (CONCUR 1997), Warsaw, Poland, 1–4 July 1997; pp. 74–88. [Google Scholar]
  36. Lygeros, J.; Tomlin, C.; Sastry, S. Controllers for reachability specifications for hybrid systems. Automatica 1999, 35, 349–370. [Google Scholar] [CrossRef]
  37. Floyd, R.W. Assigning meanings to programs. In Proceedings of the Amer. Math. Soc. Symp. in Applied Mathematics, Providence, RI, USA, 5–7 April 1967; pp. 19–32. [Google Scholar]
  38. Hoare, C.A.R. An axiomatic basis for computer programming. Commun. ACM 1983, 12, 53–56. [Google Scholar] [CrossRef]
  39. Wu, W.T. Mathematics Mechanization: Mechanical Geometry Theorem-Proving, Mechanical Geometry Problem-Solving, and Polynomial Equations-Solving; Kluwer Academic Publishers: Norwell, MA, USA, 2001. [Google Scholar]
  40. Cox, D.; Little, J.; O’Shea, D. Ideals, varieties, and algorithms. Am. Math. Mon. 1994, 101, 582–586. [Google Scholar]
  41. Weispfenning, V. Comprehensive gröbner bases. J. Symb. Comput. 1992, 14, 669–683. [Google Scholar] [CrossRef] [Green Version]
  42. Dubé, T.W. The structure of polynomial ideals and gröbner bases. Siam J. Comput. 1990, 19, 750–773. [Google Scholar] [CrossRef] [Green Version]
  43. Sharma, R.; Gupta, S.; Hariharan, B.; Aiken, A.; Liang, P.; Nori, A.V. A data driven approach for algebraic loop invariants. In Proceedings of the 22nd European Conference on Programming Languages and Systems, Rome, Italy, 16–24 March 2013; pp. 574–592. [Google Scholar]
  44. Padhi, S.; Sharma, R.; Millstein, T. Data-driven precondition inference with learned features. ACM Sigplan Not. 2016, 51, 42–56. [Google Scholar] [CrossRef]
  45. Collins, G. Quantifier elimination for real closed fields by cylindrical algebraic decomposition. In Proceedings of the 2nd GI Conference on Automata Theory and Formal Languages, Kaiserslautern, Germany, 20–23 May 1975; pp. 134–183. [Google Scholar]
Figure 1. Points lying on the intersection of two planes cannot consist of a lattice array.
Figure 1. Points lying on the intersection of two planes cannot consist of a lattice array.
Information 11 00246 g001
Figure 2. The hybrid automaton for a bouncing ball.
Figure 2. The hybrid automaton for a bouncing ball.
Information 11 00246 g002
Figure 3. Hybrid automaton for the train system.
Figure 3. Hybrid automaton for the train system.
Information 11 00246 g003
Figure 4. A charged particle in a magnetic field and its non-linear hybrid model.
Figure 4. A charged particle in a magnetic field and its non-linear hybrid model.
Information 11 00246 g004
Figure 5. The hybrid automaton for accumulator with varying accumulation every second.
Figure 5. The hybrid automaton for accumulator with varying accumulation every second.
Information 11 00246 g005
Figure 6. The hybrid automaton for accumulator.
Figure 6. The hybrid automaton for accumulator.
Information 11 00246 g006
Table 1. The six constraint equations generated in parallel.
Table 1. The six constraint equations generated in parallel.
x 1 x 2 a 1 , a 2 , a 3
00 4 a 3 + a 1 + 10 = 0
01 7 a 3 + a 1 + 10 = 0
0 1 a 3 + a 1 + 10 = 0
10 4 a 3 + a 1 + 10 = 0
11 7 a 3 + 2 a 2 + a 1 + 13 = 0
1 1 a 3 + 2 a 2 + a 1 + 13 = 0
Table 2. Implications and R generated by Citing Instances Method (CIM) on the encoding initial condition.
Table 2. Implications and R generated by Citing Instances Method (CIM) on the encoding initial condition.
v y Implication R
0 a 3 δ 2 + a 9 δ + a 10 = 0 a 10 = 0 a 10
1 a 3 δ 2 + a 5 δ + a 9 δ + a 10 + a 2 + a 8 = 0 a 10 + 1 4 a 2 1 2 a 8 = 0 a 10 + 1 4 a 2 1 2 a 8
2 a 3 δ 2 + 2 a 5 δ + a 9 δ + a 10 + 4 a 2 + 2 a 8 = 0 a 10 + a 2 a 8 = 0 a 10 + a 2 a 8
Table 3. Implications generated by CIM on the encoding continuous consecution.
Table 3. Implications generated by CIM on the encoding continuous consecution.
δ yImplication
00 0 = 0 a 4 v y 2 + ( a 5 + a 7 ) v y + a 9 = 0
01 a 4 v y + a 1 + a 7 = 0 a 4 v y 2 + 2 a 1 v y + ( a 5 + a 7 ) v y 10 a 4 + a 6 + a 9 = 0
02 2 a 4 v y + 4 a 1 + 2 a 7 = 0 a 4 v y 2 + 4 a 1 v y + ( a 5 + a 7 ) v y 20 a 4 + 2 a 6 + a 9 = 0
10 a 5 v y + a 3 + a 9 = 0 a 4 v y 2 + a 6 v y + ( a 5 + a 7 ) v y + 2 a 3 10 a 5 + a 9 = 0
11 a 4 v y + a 5 v y + a 1 + a 3 + a 6 + a 7 + a 9 = 0 a 4 v y 2 + 2 a 1 v y + a 6 v y + ( a 5 + a 7 ) v y + 2 a 3 10 a 5 10 a 4 + a 6 + a 9 = 0
12 2 a 4 v y + a 5 v y + 4 a 1 + a 3 + 2 a 6 + 2 a 7 + a 9 = 0 a 4 v y 2 + 4 a 1 v y + a 6 v y + ( a 5 + a 7 ) v y + 2 a 3 10 a 5 20 a 4 + 2 a 6 + a 9 = 0
20 2 a 5 v y + 4 a 3 + 2 a 9 = 0 a 4 v y 2 + 2 a 6 v y + ( a 5 + a 7 ) v y + 4 a 3 20 a 5 + a 9 = 0
21 a 4 v y + 2 a 5 v y + a 1 + 4 a 3 + 2 a 6 + a 7 + 2 a 9 = 0 a 4 v y 2 + 2 a 1 v y + 2 a 6 v y + ( a 5 + a 7 ) v y + 4 a 3 20 a 5 10 a 4 + a 6 + a 9 = 0
22 2 a 4 v y + 2 a 5 v y + 4 a 1 + 4 a 3 + 4 a 6 + 2 a 7 + 2 a 9 = 0 a 4 v y 2 + 4 a 1 v y + 2 a 6 v y + ( a 5 + a 7 ) v y + 4 a 3 20 a 5 20 a 4 + 2 a 6 + a 9 = 0
Table 4. Domino effect (1).
Table 4. Domino effect (1).
δ y Implication
00 0 = 0 0 = 0
01 a 1 + a 7 = 0 2 a 1 v y + a 6 = 0
02 4 a 1 + 2 a 7 = 0 4 a 1 v y + 2 a 6 = 0
10 a 7 v y + a 3 = 0 a 6 v y + 2 a 3 + 10 a 7 = 0
11 a 7 v y + a 1 + a 3 + a 6 + a 7 = 0 2 a 1 v y + a 6 v y + 2 a 3 + 10 a 7 + a 6 = 0
12 a 7 v y + 4 a 1 + a 3 + 2 a 6 + 2 a 7 = 0 4 a 1 v y + a 6 v y + 2 a 3 + 10 a 7 + 2 a 6 = 0
20 2 a 7 v y + 4 a 3 = 0 2 a 6 v y + 4 a 3 + 20 a 7 = 0
21 2 a 7 v y + a 1 + 4 a 3 + 2 a 6 + a 7 = 0 2 a 1 v y + 2 a 6 v y + 4 a 3 + 20 a 7 + a 6 = 0
22 2 a 7 v y + 4 a 1 + 4 a 3 + 4 a 6 + 2 a 7 = 0 4 a 1 v y + 2 a 6 v y + 4 a 3 + 20 a 7 + 2 a 6 = 0
Table 5. Domino effect (2).
Table 5. Domino effect (2).
δ y Implication
00 0 = 0 0 = 0
01 a 7 = 0 0 = 0
02 2 a 7 = 0 0 = 0
10 a 7 v y + a 3 = 0 2 a 3 + 10 a 7 = 0
11 a 7 v y + a 3 + a 7 = 0 2 a 3 + 10 a 7 = 0
12 a 7 v y + a 3 + 2 a 7 = 0 2 a 3 + 10 a 7 = 0
20 2 a 7 v y + 4 a 3 = 0 4 a 3 + 20 a 7 = 0
21 2 a 7 v y + 4 a 3 + a 7 = 0 4 a 3 + 20 a 7 = 0
22 2 a 7 v y + 4 a 3 + 2 a 7 = 0 4 a 3 + 20 a 7 = 0
Table 6. Domino effect (3).
Table 6. Domino effect (3).
δ y Implication
00 0 = 0 0 = 0
01 a 7 = 0 0 = 0
02 2 a 7 = 0 0 = 0
10 a 7 v y 5 a 7 = 0 0 = 0
11 2 a 7 v y 4 a 7 = 0 0 = 0
12 a 7 v y 3 a 7 = 0 0 = 0
20 2 a 7 v y 20 a 7 = 0 0 = 0
21 2 a 7 v y 19 a 7 = 0 0 = 0
22 2 a 7 v y 18 a 7 = 0 0 = 0
Table 7. Alternative discrete consecution conditions. LC: local consecution; CV: constant-value consecution; CS: constant-scale consecution; PS: polynomial-scale consecution.
Table 7. Alternative discrete consecution conditions. LC: local consecution; CV: constant-value consecution; CS: constant-scale consecution; PS: polynomial-scale consecution.
NameAlternative Discrete Consecution Condition
LC α τ ρ τ η ( l j ) = 0
CV α τ ρ τ ( η ( l j ) η ( l i ) ) = 0
CS α τ ρ τ ( η ( l j ) λ η ( l i ) ) = 0
PS α τ ρ τ ( η ( l j ) p η ( l i ) ) = 0
Table 8. Alternative Continuous Consecution Conditions. LC: local consecution; CV: constant-value consecution; CS: constant-scale consecution; PS: polynomial-scale consecution.
Table 8. Alternative Continuous Consecution Conditions. LC: local consecution; CV: constant-value consecution; CS: constant-scale consecution; PS: polynomial-scale consecution.
NameAlternative Continue Consecution Condition
LC I ( l ) η ( l ) ˙ = 0
CV I ( l ) ( η ( l ) ˙ η ( l ) ) = 0
CS I ( l ) ( η ( l ) ˙ λ η ( l ) ) = 0
PS I ( l ) ( η ( l ) ˙ p η ( l ) ) = 0
Table 9. The experimentally collected hybrid states of { i , s , i , s , t , t } .
Table 9. The experimentally collected hybrid states of { i , s , i , s , t , t } .
is i s t t
001110
112310
233610
3641010

Share and Cite

MDPI and ACS Style

He, H.; Wu, J. A New Approach to Nonlinear Invariants for Hybrid Systems Based on the Citing Instances Method. Information 2020, 11, 246. https://doi.org/10.3390/info11050246

AMA Style

He H, Wu J. A New Approach to Nonlinear Invariants for Hybrid Systems Based on the Citing Instances Method. Information. 2020; 11(5):246. https://doi.org/10.3390/info11050246

Chicago/Turabian Style

He, Honghui, and Jinzhao Wu. 2020. "A New Approach to Nonlinear Invariants for Hybrid Systems Based on the Citing Instances Method" Information 11, no. 5: 246. https://doi.org/10.3390/info11050246

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop