We present a framework for the application of abstract interpretation as an aid during program development, rather than in the more traditional application of program optimization. Program validation and detection of errors is first performed statically by comparing (partial) specifications written in terms of assertions against information obtained from static analysis of the program. The results of this process are expressed in the user assertion language. Assertions (or parts of assertions) which cannot be verified statically are translated into run-time tests. The framework allows the use of assertions to be optional. It also allows using very general properties in assertions, beyond the predefined set understandable by the static analyzer and including properties defined by means of user programs. We also report briefly on an implementation of the framework. The resulting tool generates and checks assertions for Prolog, CLP(R), and CHIP/CLP(fd) programs, and integrates compile-time and run-time checking in a uniform way. The tool allows using properties such as types, modes, non-failure, determinacy, and computational cost, and can treat modules separately, performing incremental analysis. In practice, this modularity allows detecting statically bugs in user programs even if they do not contain any assertions.
- Logic Program
- Abstract Interpretation
- Predicate Assertion
- Execution State
- Program Point
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.
This is a preview of subscription content, access via your institution.
Unable to display preview. Download preview PDF.
A. Aggoun, F. Benhamou, F. Bueno, M. Carro, P. Deransart, W. Drabent, G. Ferrand, F. Goualard, M. Hermenegildo, C. Lai, J. Lloyd, J. Maluszynski, G. Puebla, and A. Tessier. CP Debugging Tools: Clarification of Functionalities and Selection of the Tools. Technical Report D.WP1.1.M1.1–2, DISCIPL Project, June 1997.
K. Apt, editor.From Logic Programming to Prolog. Prentice-Hall, Hemel Hempstead, Hertfordshire, England, 1997.
K. R. Apt and E. Marchiori. Reasoning about Prolog programs: from modes through types to assertions. Formal Aspects of Computing, 6(6):743–765, 1994.
K. R. Apt and D. Pedreschi. Reasoning about termination of pure PROLOG programs. Information and Computation, 1(106): 109–157, 1993.
F. Bourdoncle. Abstract debugging of higher-order imperative languages. In Programming Languages Design and Implementation’93, pages 46–55, 1993.
J. Boye, W. Drabent, and J. Maluszyński. Declarative diagnosis of constraint programs: an assertion-based approach. In Proc. of the 3rd. Int’l Workshop on Automated Debugging-AADEBUG’97, pages 123–141, Linkoping, Sweden, May 1997. U. of Linkoping Press.
F. Bueno. The CIAO Multiparadigm Compiler: A User’s Manual. Technical Report CLIP8/95.0, Facultad de Informática, UPM, June 1995.
F. Bueno, D. Cabeza, M. Hermenegildo, and G. Puebla. Global Analysis of Standard Prolog Programs. In European Symposium on Programming, number 1058 in LNCS, pages 108–124, Sweden, April 1996. Springer-Verlag
F. Bueno, M. García de la Banda, and M. Hermenegildo. Effectiveness of Abstract Interpretation in Automatic Parallelization: A Case Study in Logic Programming. ACM Transactions on Programming Languages and Systems, 1998. In Press.
F. Bueno, P. Deransart, W. Drabent, G. Ferrand, M. Hermenegildo, J. Maluszynski, and G. Puebla. On the Role of Semantic Approximations in Validation and Diagnosis of Constraint Logic Programs. In Proc. of the 3rd. Int’l Workshop on Automated Debugging-AADEBUG’97, pages 155–170, Linkoping, Sweden, May 1997. U. of Linkoping Press.
L. Byrd. Understanding the Control Flow of Prolog Programs. In S.-A. Tärnlund, editor, Workshop on Logic Programming, Debrecen, 1980
B. Le Charlier and P. Van Hentenryck. Experimental Evaluation of a Generic Abstract Interpretation Algorithm for Prolog. ACM Transactions on Programming Languages and Systems, 16(1):35–101, 1994.
M. Comini, G. Levi, M. C. Meo, and G. Vitiello. Proving properties of logic programs by abstract diagnosis. In M. Dams, editor, Analysis and Verification of Multiple-Agent Languages, 5th LOMAPS Workshop, number 1192 in Lecture Notes in Computer Science, pages 22–50. Springer-Verlag, 1996
M. Comini, G. Levi, and G. Vitiello. Abstract debugging of logic programs. In L. Fribourg and F. Turini, editors, Proc. Logic Program Synthesis and Transformation and Metaprogramming in Logic 1994, volume 883 of Lecture Notes in Computer Science, pages 440–450, Berlin, 1994. Springer-Verlag.
P. Cousot and R. Cousot. Abstract Interpretation: a Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In Fourth ACM Symposium on Principles of Programming Languages, pages 238–252, 1977
P.W. Dart and J. Zobel. A regular type language for logic programs. In F. Pfenning, editor, Types in Logic Programming, pages 157–187. MIT Press, 1992
P. Deransart. Proof methods of declarative properties of definite programs. Theoretical Computer Science, 118:99–166, 1993.
W. Drabent, S. Nadjm-Tehrani, and J. Maluszyński. The Use of Assertions in Algorithmic Debugging. In Proceedings of the Intl. Conf. on Fifth Generation Computer Systems, pages 573–581, 1988
W. Drabent, S. Nadjm-Tehrani, and J. Maluszynski. Algorithmic debugging with assertions. In H. Abramson and M.H.Rogers, editors, Meta-programming in Logic Programming, pages 501–522. MIT Press, 1989
M. Ducassé. OPIUM – an advanced debugging system. In M. J. Comyn, G.; Fuchs, N.E.; Ratcliffe, editors, Proceedings of the Second International Logic Programming Summer School on Logic Programming in Action (LPSS’92), volume 636 of Lecture Notes in Computer Science (subseries LNA1), pages 303–312. Springer Verlag, 1992
M. Ducassé. A pragmatic survey of automated debugging. In Peter A. Fritzson, editor, Automated and Algorithmic Debugging, volume 749 of Lecture Notes in Computer Science, pages 1–15. Springer Verlag, May 1993.
M. Ducassé and J. Noyé. Logic programming environments: Dynamic program analysis and debugging. Journal of Logic Programming, 19,20:351–384, 1994
G. Ferrand. Error diagnosis in logic programming. J. Logic Programming, 4:177–198, 1987.
J.P. Gallagher and D.A. de Waal. Fast and precise regular approximations of logic programs. In Pascal Van Hentenryck, editor, Proceedings of the Eleventh International Conference on Logic Programming, pages 599–613. The MIT Press, 1994.
M. García de la Banda, M. Hermenegildo, M. Bruynooghe, V. Dumortier, G. Janssens, and W. Simoens. Global Analysis of Constraint Logic Programs. ACM Transactions on Programming Languages and Systems, 18(5):564–615
M. Hermenegildo, F. Bueno, D. Cabeza, M. García de la Banda, P. López, and G. Puebla. The CIAO Multi-Dialect Compiler and System: An Experimentation Workbench for Future (C)LP Systems. In Parallelism and Implementation Technology for Logic and Constraint Logic Programming. Nova Science, Com- mack, NY, USA, 1998.
M. Hermenegildo and The CLIP Group. pl2texi: An Automatic Documentation Generator for (C)LP — Reference Manual. The CIAO System Documentation Series - TR CLIP5/97.1, Facultad de Informática, UPM, August.
M. Hermenegildo and The CLIP Group. Programming with Global Analysis. In Proceedings of ILPS’97, pages 49–52, Cambridge, MA, October 1997. MIT Press, (abstract of invited talk).
M. Hermenegildo, R. Warren, and S. K. Debray. Global Flow Analysis as a Practical Compilation Tool. Journal of Logic Programming, 13(4):349–367, August 1992.
P. Hill and J. Lloyd. The Goedel Programming Language. MIT Press, Cambridge MA, 1994.
A. Kelly, A. Macdonald, K. Marriott, P. Stuckey, and R. Yap. Effectiveness of optimizing compilation for CLP(R). In Proceedings of Joint International Conference and Symposium on Logic Programming, pages 37–51. MIT Press, 1996.
K. Marriott and P. Stuckey. The 3 R’s of Optimizing Constraint Logic Programs: Refinement, Removal, and Reordering. In 19th. Annual ACM Conf. on Principles of Programming Languages. ACM, 1992.
K. Muthukumar and M. Hermenegildo. Combined Determination of Sharing and Freeness of Program Variables Through Abstract Interpretation. In 1991 International Conference on Logic Programming, pages 49–63. MIT Press, June 1991.
K. Muthukumar and M. Hermenegildo. Compile-time Derivation of Variable Dependency Using Abstract Interpretation. Journal of Logic Programming, 13(2/3):315–347, July 1992. Originally published as Technical Report FIM 59.1/IA/90, Computer Science Dept, Universidad Politecnica de Madrid, Spain, August 1990.
L. Naish. A three-valued declarative debugging scheme. In 8th Workshop on Logic Programming Environments, July 1997. ICLP Post-Conference Workshop.
G. Puebla, F. Bueno, and M. Hermenegildo. An Assertion Language for Debugging of Constraint Logic Programs. In Proceedings of the ILPS’97 Workshop on Tools and Environments for (Constraint) Logic Programming, October 1997.
G. Puebla, F. Bueno, and M. Hermenegildo. A Framework for Assertion-based Debugging in Constraint Logic Programming. In Proceedings of the JICSLP’98 Workshop on Types for CLP, Manchester, UK, June 1998.
G. Puebla and M. Hermenegildo. Implementation of Multiple Specialization in Logic Programs. In Proc. ACM SIGPLAN Symposium on Partial Evaluation and Semantics Based Program Manipulation, pages 77–87. ACM Press, June 1995.
G. Puebla and M. Hermenegildo. Abstract Multiple Specialization and its Application to Program Parallelization. Journal of Logic Programming. Special Issue on Synthesis, Transformation and Analysis of Logic Programs, 1999. To appear.
D. De Schreye and M. Denecker. Assesment of some issues in CL-theory and program development, this volume, pp. 195–208.
E. Shapiro. Algorithmic Program Debugging. ACM Distiguished Dissertation. MIT Press, 1982.
Z. Somogyi, F. Henderson, and T. Conway. The execution algorithm of Mercury: an efficient purely declarative logic programming language. JLP, 29(1–3), October 1996.
P. Van Roy and A.M. Despain. High-Performace Logic Programming with the Aquarius Prolog Compiler. IEEE Computer Magazine, pages 54–68, January 1992.
E. Vetillard. Utilisation de Declarations en Programmation Logique avec Constraintes. PhD thesis, U. of Aix-Marseilles II, 1994.
R. Warren, M. Hermenegildo, and S. K. Debray. On the Practicality of Global Flow Analysis of Logic Programs. In Fifth International Conference and Symposium on Logic Programming, pages 684–699. MIT Press, August 1988.
E. Yardeni and E. Shapiro. A Type System for Logic Programs. Concurrent Prolog: Collected Papers, pages 211–244, 1987.
Editors and Affiliations
Rights and permissions
© 1999 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Hermenegildo, M., Puebla, G., Bueno, F. (1999). Using Global Analysis, Partial Specifications, and an Extensible Assertion Language for Program Validation and Debugging. In: Apt, K.R., Marek, V.W., Truszczynski, M., Warren, D.S. (eds) The Logic Programming Paradigm. Artificial Intelligence. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-60085-2_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-64249-4
Online ISBN: 978-3-642-60085-2
eBook Packages: Springer Book Archive