Context-Sensitive Multivariant Assertion Checking in Modular Programs

  • Paweł Pietrzak
  • Jesús Correas
  • Germán Puebla
  • Manuel V. Hermenegildo
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4246)


We propose a modular, assertion-based system for verification and debugging of large logic programs, together with several interesting models for checking assertions statically in modular programs, each with different characteristics and representing different trade-offs. Our proposal is a modular and multivariant extension of our previously proposed abstract assertion checking model and we also report on its implementation in the CiaoPP system. In our approach, the specification of the program, given by a set of assertions, may be partial, instead of the complete specification required by traditional verification systems. Also, the system can deal with properties which cannot always be determined at compile-time. As a result, the proposed system needs to work with safe approximations: all assertions proved correct are guaranteed to be valid and all errors actual errors. The use of modular, context-sensitive static analyzers also allows us to introduce a new distinction between assertions checked in a particular context or checked in general.


Logic Program Abstract Interpretation Pred Assertion Modular Analysis Initial Query 
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.
    Apt, K.R., Marchiori, E.: Reasoning about Prolog programs: from modes through types to assertions. Formal Aspects of Computing 6(6), 743–765 (1994)MATHCrossRefGoogle Scholar
  2. 2.
    Bruynooghe, M.: A Practical Framework for the Abstract Interpretation of Logic Programs. JLP 10, 91–124 (1991)MATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Comini, M., Levi, G., Meo, M.C., Vitiello, G.: Abstract diagnosis. JLP 39(1–3), 43–93 (1999)MATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Comini, M., Levi, G., Vitiello, G.: Modular abstract diagnosis. In: APPIA-GULP-PRODE 1998, pp. 409–420 (1998)Google Scholar
  5. 5.
    Correas, J., Puebla, G., Hermenegildo, M., Bueno, F.: Experiments in Context-Sensitive Analysis of Modular Programs. In: Hill, P.M. (ed.) LOPSTR 2005. LNCS, vol. 3901, pp. 163–178. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  6. 6.
    Cousot, P., Cousot, R.: Abstract Interpretation: a Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. Proc. of POPL 1977, pp. 238–252 (1977)Google Scholar
  7. 7.
    Cousot, P., Cousot, R.: Modular Static Program Analysis (invited paper). In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, pp. 159–178. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  8. 8.
    García de la Banda, M., Hermenegildo, M., Bruynooghe, M., Dumortier, V., Janssens, G., Simoens, W.: Global Analysis of Constraint Logic Programs. ACM Trans. on Programming Languages and Systems 18(5), 564–615 (1996)CrossRefGoogle Scholar
  9. 9.
    Deransart, P.: Proof methods of declarative properties of definite programs. Theoretical Computer Science 118, 99–166 (1993)MATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Drabent, W., Nadjm-Tehrani, S., Maluszynski, J.: Algorithmic debugging with assertions. In: Abramson, H., Rogers, M.H. (eds.) Meta-programming in Logic Programming, pp. 501–522. MIT Press, Cambridge (1989)Google Scholar
  11. 11.
    Leino, K.R.M., Müller, P.: Modular verification of static class invariants. In: Fitzgerald, J.S., Hayes, I.J., Tarlecki, A. (eds.) FM 2005. LNCS, vol. 3582, pp. 26–42. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  12. 12.
    Muthukumar, K., Hermenegildo, M.: Compile-time Derivation of Variable Dependency Using Abstract Interpretation. JLP 13(2/3), 315–347 (1992)MATHCrossRefGoogle Scholar
  13. 13.
    Puebla, G., Bueno, F., Hermenegildo, M.: An Assertion Language for Constraint Logic Programs. In: Deransart, P., Małuszyński, J. (eds.) DiSCiPl 1999. LNCS, vol. 1870, pp. 23–61. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  14. 14.
    Puebla, G., Bueno, F., Hermenegildo, M.: Combined Static and Dynamic Assertion-Based Debugging of Constraint Logic Programs. In: Bossi, A. (ed.) LOPSTR 1999. LNCS, vol. 1817, pp. 273–292. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  15. 15.
    Puebla, G., Correas, J., Hermenegildo, M., Bueno, F., García de la Banda, M., Marriott, K., Stuckey, P.J.: A generic framework for context-sensitive analysis of modular programs. In: Bruynooghe, M., Lau, K.-K. (eds.) Program Development in Computational Logic. LNCS, vol. 3049, pp. 233–260. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  16. 16.
    Somogyi, Z., Henderson, F., Conway, T.: The execution algorithm of Mercury: an efficient purely declarative logic programming language. JLP 29(1–3) (October 1996)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Paweł Pietrzak
    • 1
  • Jesús Correas
    • 2
  • Germán Puebla
    • 1
  • Manuel V. Hermenegildo
    • 1
    • 3
  1. 1.School of Computer ScienceTechnical University of Madrid (UPM) 
  2. 2.School of Computer ScienceComplutense University of Madrid 
  3. 3.CS and ECE DepartmentsUniversity of New Mexico 

Personalised recommendations