Using Real Relaxations during Program Specialization

  • Fabio Fioravanti
  • Alberto Pettorossi
  • Maurizio Proietti
  • Valerio Senni
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7225)


We propose a program specialization technique for locally stratified CLP(ℤ) programs, that is, logic programs with linear constraints over the set ℤ of the integer numbers. For reasons of efficiency our technique makes use of a relaxation from integers to reals. We reformulate the familiar unfold/fold transformation rules for CLP programs so that: (i) the applicability conditions of the rules are based on the satisfiability or entailment of constraints over the set ℝ of the real numbers, and (ii) every application of the rules transforms a given program into a new program with the same perfect model constructed over ℤ. Then, we introduce a strategy which applies the transformation rules for specializing CLP(ℤ) programs with respect to a given query. Finally, we show that our specialization strategy can be applied for verifying properties of infinite state reactive systems specified by constraints over ℤ.


Logic Program Specialization Strategy Transformation Rule Generalization Operator Safety Property 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Annichini, A., Bouajjani, A., Sighireanu, M.: TReX: A Tool for Reachability Analysis of Complex Systems. In: Berry, G., Comon, H., Finkel, A. (eds.) CAV 2001. LNCS, vol. 2102, pp. 368–372. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  2. 2.
    Apt, K.R., Bol, R.N.: Logic programming and negation: A survey. Journal of Logic Programming 19/20, 9–71 (1994)MathSciNetCrossRefGoogle Scholar
  3. 3.
    Bagnara, R., Hill, P.M., Zaffanella, E.: The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems. Science of Computer Programming 72(1-2), 3–21 (2008)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Banda, G., Gallagher, J.P.: Analysis of Linear Hybrid Systems in CLP. In: Hanus, M. (ed.) LOPSTR 2008. LNCS, vol. 5438, pp. 55–70. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  5. 5.
    Banda, G., Gallagher, J.P.: Constraint-Based Abstract Semantics for Temporal Logic: A Direct Approach to Design and Implementation. In: Clarke, E.M., Voronkov, A. (eds.) LPAR-16 2010. LNCS(LNAI), vol. 6355, pp. 27–45. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  6. 6.
    Bardin, S., Finkel, A., Leroux, J., Petrucci, L.: FAST: Acceleration from theory to practice. International Journal on Software Tools for Technology Transfer 10(5), 401–424 (2008)CrossRefGoogle Scholar
  7. 7.
    Bérard, B., Fribourg, L.: Reachability Analysis of (Timed) Petri Nets Using Real Arithmetic. In: Baeten, J.C.M., Mauw, S. (eds.) CONCUR 1999. LNCS, vol. 1664, pp. 178–193. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  8. 8.
    Chen, W., Warren, D.S.: Tabled evaluation with delaying for general logic programs. JACM 43(1) (1996)Google Scholar
  9. 9.
    Clarke, E.M., Grumberg, O., Peled, D.: Model Checking. MIT Press (1999)Google Scholar
  10. 10.
    Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of programs by construction of approximation of fixpoints. In: Proceedings of the 4th ACM-SIGPLAN POPL 1977, pp. 238–252. ACM Press (1977)Google Scholar
  11. 11.
    Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: Proceedings of the Fifth ACM Symposium on Principles of Programming Languages (POPL 1978), pp. 84–96. ACM Press (1978)Google Scholar
  12. 12.
    Craig, S.-J., Leuschel, M.: A Compiler Generator for Constraint Logic Programs. In: Broy, M., Zamulin, A.V. (eds.) PSI 2003. LNCS, vol. 2890, pp. 148–161. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  13. 13.
    Delzanno, G., Podelski, A.: Constraint-based deductive model checking. International Journal on Software Tools for Technology Transfer 3(3), 250–270 (2001)zbMATHGoogle Scholar
  14. 14.
    Etalle, S., Gabbrielli, M.: Transformations of CLP modules. Theoretical Computer Science 166, 101–146 (1996)MathSciNetzbMATHCrossRefGoogle Scholar
  15. 15.
    Fioravanti, F.: Transformation of Constraint Logic Programs for Software Specialization and Verification. PhD thesis, Università di Roma “La Sapienza”, Italy (2002)Google Scholar
  16. 16.
    Fioravanti, F., Pettorossi, A., Proietti, M.: Automated Strategies for Specializing Constraint Logic Programs. In: Lau, K.-K. (ed.) LOPSTR 2000. LNCS, vol. 2042, pp. 125–146. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  17. 17.
    Fioravanti, F., Pettorossi, A., Proietti, M.: Verifying CTL properties of infinite state systems by specializing constraint logic programs. In: Proceedings of the ACM SIGPLAN Workshop on Verification and Computational Logic, VCL 2001, Florence, Italy, Technical Report DSSE-TR-2001-3, pp. 85–96. University of Southampton, UK (2001)Google Scholar
  18. 18.
    Fioravanti, F., Pettorossi, A., Proietti, M.: Transformation Rules for Locally Stratified Constraint Logic Programs. In: Bruynooghe, M., Lau, K.-K. (eds.) Program Development in CL. LNCS, vol. 3049, pp. 291–339. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  19. 19.
    Fioravanti, F., Pettorossi, A., Proietti, M., Senni, V.: Program Specialization for Verifying Infinite State Systems: An Experimental Evaluation. In: Alpuente, M. (ed.) LOPSTR 2010. LNCS, vol. 6564, pp. 164–183. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  20. 20.
    Fribourg, L.: Constraint Logic Programming Applied to Model Checking. In: Bossi, A. (ed.) LOPSTR 1999. LNCS, vol. 1817, pp. 30–41. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  21. 21.
    Fribourg, L., Olsén, H.: A decompositional approach for computing least fixed-points of Datalog programs with Z-counters. Constraints 2(3/4), 305–335 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  22. 22.
    Henriksen, J.G., Jensen, J.L., Jørgensen, M.E., Klarlund, N., Paige, R., Rauhe, T., Sandholm, A.: Mona: Monadic Second-Order Logic in Practice. In: Brinksma, E., Steffen, B., Cleaveland, W.R., Larsen, K.G., Margaria, T. (eds.) TACAS 1995. LNCS, vol. 1019, pp. 89–110. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  23. 23.
    Hickey, T.J., Smith, D.A.: Towards the partial evaluation of CLP languages. In: Proceedings of the 1991 ACM Symposium PEPM 1991, New Haven, CT, USA. SIGPLAN Notices, vol. 26(9), pp. 43–51. ACM Press (1991)Google Scholar
  24. 24.
    Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Evaluation and Automatic Program Generation. Prentice Hall (1993)Google Scholar
  25. 25.
  26. 26.
    Leroux, J.: Vector addition system reachability problem: a short self-contained proof. In: Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2011, Austin, TX, USA, January 26-28, pp. 307–316. ACM (2011)Google Scholar
  27. 27.
    Leroux, J., Sutre, G.: Flat Counter Automata Almost Everywhere! In: Peled, D.A., Tsay, Y.-K. (eds.) ATVA 2005. LNCS, vol. 3707, pp. 489–503. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  28. 28.
    Leuschel, M., Bruynooghe, M.: Logic program specialisation through partial deduction: Control issues. Theory and Practice of Logic Programming 2(4&5), 461–515 (2002)MathSciNetzbMATHCrossRefGoogle Scholar
  29. 29.
    Leuschel, M., Lehmann, H.: Coverability of Reset Petri Nets and Other Well-Structured Transition Systems by Partial Deduction. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 101–115. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  30. 30.
    Leuschel, M., Massart, T.: Infinite State Model Checking by Abstract Interpretation and Program Specialization. In: Bossi, A. (ed.) LOPSTR 1999. LNCS, vol. 1817, pp. 62–81. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  31. 31.
    Peralta, J.C., Gallagher, J.P.: Convex Hull Abstractions in Specialization of CLP Programs. In: Leuschel, M. (ed.) LOPSTR 2002. LNCS, vol. 2664, pp. 90–108. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  32. 32.
    Pugh, W.: A practical algorithm for exact array dependence analysis. Communications of the ACM 35(8), 102–114 (1992)CrossRefGoogle Scholar
  33. 33.
    Schrijver, A.: Theory of Linear and Integer Programming. John Wiley & Sons (1986)Google Scholar
  34. 34.
    Seki, H.: On Negative Unfolding in the Answer Set Semantics. In: Hanus, M. (ed.) LOPSTR 2008. LNCS, vol. 5438, pp. 168–184. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  35. 35.
    Wrzos-Kaminska, A.: Partial Evaluation in Constraint Logic Programming. In: Michalewicz, M., Raś, Z.W. (eds.) ISMIS 1996. LNCS, vol. 1079, pp. 98–107. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  36. 36.
    Yavuz-Kahveci, T., Bultan, T.: Action Language Verifier: An infinite-state model checker for reactive software specifications. Formal Methods in System Design 35(3), 325–367 (2009)zbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Fabio Fioravanti
    • 1
  • Alberto Pettorossi
    • 2
  • Maurizio Proietti
    • 3
  • Valerio Senni
    • 2
    • 4
  1. 1.Dipartimento di ScienzeUniversity ‘G. D’Annunzio’PescaraItaly
  2. 2.DISPUniversity of Rome Tor VergataRomeItaly
  3. 3.CNR-IASIRomeItaly
  4. 4.LORIA-INRIAVillers-les-NancyFrance

Personalised recommendations