1Dipartimento di Scienze, University `G. D’Annunzio’, Pescara, Italy
2DISP, University of Rome Tor Vergata, Rome, Italy
3CNR-IASI, Rome, Italy
One of the present challenges in the field of automatic verification of reactive systems is the extension of the model checking techniques  to systems with an infinite number of states. For these systems exhaustive state exploration is obviously impossible and, even for restricted classes, simple properties such as safety (or reachability) properties are undecidable.
In order to overcome this limitation, several verification tools make use of constraints over the integers Ζ (or the reals R) to represent infinite sets of states (see, for instance, [1,3,6,11,13,19]). By manipulating constraint-based representations of sets of states, one can verify a safety property φ of an infinite state system by one of the following two strategies:
(i) Backward Strategy: one applies a backward reachability algorithm, thereby computing the set BR of states from which it is possible to reach an unsafe state (that is, a state where ¬φ holds), and then one checks whether or not BR has an empty intersection with the set I of the initial states;
(ii) Forward Strategy: one applies a forward reachability algorithm, thereby computing the set FR of states reachable from an initial state, and then one checks whether or not FR has an empty intersection with the set U of the unsafe states.
Variants of these two strategies have been proposed and implemented in the above mentioned automatic verification tools. Some of them also use techniques borrowed from the field of abstract interpretation , whereby in order to check whether or not a safety property φ holds for all states which are reachable from the initial states, an upper approximation BR (or FR) of the set BR (or FR) is computed. These techniques improve the termination of the verification tools at the expense of a possible loss of precision. Indeed, whenever BR ∩I ≠ ∅ (or FR ∩U ≠ ∅), one cannot conclude that, for some state, φ does not hold.
One weakness of the Backward Strategy is that, when computing BR, it does not take into account the properties holding in the initial states. This may lead, even if the formula φ does hold, to a failure of the verification process, because either the computation of BR does not terminate or one gets an overly approximated BR with a non-empty intersection with the set I. A similar weakness is also present in the Forward Strategy as it does not take into account the properties holding on the unsafe states when computing FR or FR.
We have developed a method, based on program specialization [12,14], for overcoming the weaknesses of Backward and Forward Strategies. Program specialization is a program transformation technique that, given a program and a specific context of use, derives a specialized program that is more effective in the given context. Our specialization method is applied before computing BR (or FR). Its objective is to transform the constraint-based specification of a reactive system into a new specification that, when used for computing BR (or FR), takes into consideration also the properties holding on the initial states (or the unsafe states, respectively).
Our method consists of the following three steps:
(1) the translation of a reactive system specification into a constraint logic program (CLP) that implements backward (or forward) reachability;
(2) the specialization of the CLP program with respect to the initial states (or the unsafe states, respectively), and
(3) the reverse translation of the specialized CLP program into a specialized reactive system.
The core of our specialization method is an algorithm that makes use of the definition introduction, unfolding, clause removal, and folding rules for transforming constraint logic programs (see, for instance, ).
An important feature of our specialization algorithm is that the applicability conditions of the transformation rules used by the algorithm are expressed in terms of the unsatisfiability (or entailment) of constraints on the domain R of the real numbers, instead of the domain Ζ of the integer numbers, thereby allowing us to use more efficient constraint solvers (according to the present state-of-the-art solvers). Note that, despite this domain change from Ζ to R, program specialization preserves the least model semantics of CLP(Ζ) programs. This result is based on the correctness of the transformation rules  and on the fact that the unsatisfiability (or entailment) of constraints on R implies the unsatisfiability (or entailment) of those constraints on Ζ. As a consequence of the correctness of (1) the translation, (2) the specialization, and (3) the reverse translation, our method is guaranteed to transform a given reactive system specification into one which satisfies the same safety properties.
The termination of the specialization algorithm is ensured by the fact that we use suitable generalization operators, similar to the widening operator introduced in the field of abstract interpretation .
A more detailed presentation of our specialization method appears in .
We have implemented our specialization method on the MAP transformation system for CLP programs , a tool for transforming CLP programs which uses the SICStus Prolog clpr library to operate on constraints on the reals. Then, we have performed experiments on several infinite state systems by using the Action Language Verifier (ALV), which is tool based on a BDD-based symbolic manipulation for enumerated types and on a solver for linear constraints on integers . ALV performs backward and forward reachability analysis by an approximate computation of the least fixpoint of the transition relation of the system. We have run ALV using the options: `default’ and `A’ (both for backward analysis), and the option `F’ (for forward analysis). All experiments were performed on an Intel Core 2 Duo E7300 2.66 GHz under Linux.
The results of our experiments are reported in Table 1, where we have indicated, for each system and for each ALV option used, the following times expressed in seconds:
(i) the time taken by ALV for verifying the given system (columns Sys), and
(ii) the total time taken by MAP for specializing the system and by ALV for verifying the specialized system (columns SpSys).
|6. Berkeley RISC||0.01||0.04||⊥||0.04||0.01||0.02|
|7. DEC Firefly||0.01||0.02||⊥||0.03||0.01||0.07|
|8. IEEE Futurebus||0.26||0.68||⊥||⊥||∞||∞|
|9. Illinois University||0.01||0.03||⊥||0.03||∞||0.07|
|12. Synapse N+1||0.01||0.02||⊥||0.02||0.01||0.01|
|13. Xerox PARC Dragon||0.01||0.05||⊥||0.06||0.02||0.10|
|15. Bounded Buffer||0.01||3.10||0.01||3.16||∞||0.03|
|16. Unbounded Buffer||0.01||0.06||0.01||0.06||0.04||0.04|
|19. Insertion Sort||0.03||0.06||0.04||0.06||0.18||0.02|
|20. Selection Sort||∞||0.21||⊥||0.21||∞||0.33|
|21. Reset Petri Net||∞||0.02||⊥||⊥||∞||0.01|
Table 1: Verification times (in seconds) using ALV .
`⊥’ means termination with the answer `Unable to verify’
and `∞’ means `No answer’ within 10 minutes.
The experiments show that our specialization method always increases the precision of ALV, that is, for every ALV option used, the number of properties verified increases when considering the specialized systems (columns SpSys) instead of the given, non-specialized systems (columns Sys).
As far as the verification times are concerned, the time in column Sys and the time in column SpSys are of the same order of magnitude in almost all cases. In two examples (Peterson and CSM, with the `default’ option) our method substantially reduces the total verification time. Finally, in the Bounded Buffer example (with options `default’ and `A’) our specialization method significantly increases the verification time. Thus, overall, the increase of precision due to the specialization method we have proposed, does not determine a significant degradation of the time performance.
The use of constraint logic programs in the area of system verification has been proposed by several authors (see [2,6], and  for a survey of early works). Also transformation techniques for constraint logic programs have been shown to be useful for the verification of infinite state systems [8,9,15,17,18]. In the approach presented in this paper, constraint logic programs provide as an intermediate representation of the systems to be verified so that one can easily specialize those systems. To these constraint logic programs we apply a variant of the specialization technique presented in . However, unlike [8,9,15,17,18], the final result of our specialization is not a constraint logic program, but a new reactive system which can be analyzed by using any verification tool for reactive systems specified by linear constraints on the integers. We have used the ALV tool  to perform the verification task on the specialized systems (see Section 3), but we could have also used (with minor syntactic modifications) other verification tools, such as TReX , FAST , and LASH . Thus, one can apply to the specialized systems any of the optimization techniques implemented in those verification tools, such as fixpoint acceleration. We leave it for future research to evaluate the combined use of our specialization technique with other available optimization techniques.
Our specialization method is also related to some techniques for abstract interpretation  and, in particular, to those proposed in the field of CLP-based verification of infinite state systems [6,2]. For instance, program specialization makes use of generalization operators  which are similar to the widening operators used in abstract interpretation. The main difference between program specialization and abstract interpretation is that, when applied to a given system specification, the former produces an equivalent specification, while the latter produces a more abstract (possibly, finite state) model whose semantics is an approximation of the semantics of the given specification. Moreover, since our specialization method returns a new system specification which is written in the same language of the given specification, after performing specialization one may also apply abstract interpretation techniques for proving system properties. Finding combinations of program specialization and abstract interpretation techniques that are most suitable for the verification of infinite state systems is an interesting issue for future research.
This work has been partially supported by PRIN-MIUR and by a joint project between CNR (Italy) and CNRS (France) Verification of Infinite State and Real Time Systems. The last author has been supported by an ERCIM grant during his stay at LORIA-INRIA. Thanks to Laurent Fribourg, John Gallagher, and Michael Leuschel for many stimulating conversations.
-  A. Annichini, A. Bouajjani, and M. Sighireanu. TReX: A tool for reachability analysis of complex systems. In Proc. CAV 2001, LNCS 2102, pages 368-372. Springer, 2001.
-  G. Banda and J. P. Gallagher. Constraint-based abstract semantics for temporal logic: A direct approach to design and implementation. In Proc. LPAR 2010, LNAI 6355, pages 27-45. Springer, 2010.
-  S. Bardin, A. Finkel, J. Leroux, and L. Petrucci. FAST: Acceleration from theory to practice. Int. J. on Software Tools for Technology Transfer, 10(5):401-424, 2008.
-  E. M. Clarke, O. Grumberg, and D. Peled. Model Checking. MIT Press, 1999.
-  P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction of approximation of fixpoints. In Proc. POPL’77, pages 238-252. ACM Press, 1977.
-  G. Delzanno and A. Podelski. Constraint-based deductive model checking. Int. J. on Software Tools for Technology Transfer, 3(3):250-270, 2001.
-  S. Etalle and M. Gabbrielli. Transformations of CLP modules. Theoretical Computer Science, 166:101-146, 1996.
-  F. Fioravanti, A. Pettorossi, and M. Proietti. Verifying CTL properties of infinite state systems by specializing constraint logic programs. In Proc. VCL’01, Tech. Rep. DSSE-TR-2001-3, pages 85-96. Univ. of Southampton, UK, 2001.
-  F. Fioravanti, A. Pettorossi, M. Proietti, and V. Senni. Program specialization for verifying infinite state systems: An experimental evaluation. In Proc. LOPSTR 2010, LNCS 6564, pages 164-183. Springer, 2011.
-  F. Fioravanti, A. Pettorossi, M. Proietti, and V. Senni. Improving reachability analysis of infinite state systems by specialization. In G. Delzanno and I. Potapov, editors, Proc. Int. Workshop on Reachability Problems (RP 2011), September 28-30, 2011, Genova, Italy, LNCS 6945. Springer, 2011.
-  L. Fribourg. Constraint logic programming applied to model checking. In Proc. LOPSTR ’99, LNCS 1817, pages 31-42. Springer-Verlag, 2000.
-  N. D. Jones, C. K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall, 1993.
-  LASH: http://www.montefiore.ulg.ac.be/~boigelot/research/lash
-  M. Leuschel and M. Bruynooghe. Logic program specialisation through partial deduction: Control issues. Theory and Practice of Logic Programming, 2(4&5):461-515, 2002.
-  M. Leuschel and T. Massart. Infinite state model checking by abstract interpretation and program specialization. In Proc. LOPSTR ’99, LNCS 1817, pages 63-82. Springer, 2000.
-  MAP: http://map.uniroma2.it/mapweb
-  J. C. Peralta and J. P. Gallagher. Convex hull abstractions in specialization of CLP programs. In Proc. LOPSTR 2002, LNCS 2664, pages 90-108, 2003.
-  A. Roychoudhury, K. Narayan Kumar, C. R. Ramakrishnan, I. V. Ramakrishnan, and S. A. Smolka. Verification of parameterized systems using logic program transformations. In Proc. TACAS 2000, LNCS 1785, pages 172-187. Springer, 2000.
- T. Yavuz-Kahveci and T. Bultan. Action Language Verifier: An infinite-state model checker for reactive software specifications. Formal Methods in System Design, 35(3):325-367, 2009.