More Precise Yet Efficient Type Inference for Logic Programs

  • Claudio Vaucheret
  • Francisco Bueno
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2477)


Type analyses of logic programs which aim at inferring the types of the program being analyzed are presented in a unified abstract interpretation-based framework. This covers most classical abstract interpretation-based type analyzers for logic programs, built on either top-down or bottom-up interpretation of the program. In this setting, we discuss the widening operator, arguably a crucial one. We present a new widening which is more precise than those previously proposed. Practical results with our analysis domain are also presented, showing that it also allows for efficient analysis.


Logic Program Widening Operator Abstract Interpretation Type Graph Type Inference 
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.
    W. Charatonik, A. Podelski, and J.-M. Talbot. Paths vs. Trees in Set-based Program Analysis. In Principles of Programming Languages, pages 330–338. ACM Press, January 2000.Google Scholar
  2. 2.
    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.CrossRefGoogle Scholar
  3. 3.
    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.Google Scholar
  4. 4.
    T. Früwirth, E. Shapiro, M.Y. Vardi, and E. Yardeni. Logic Programs as Types for Logic Programs. In Proc. LICS’91, pages 300–309, 1991.Google Scholar
  5. 5.
    J. Gallagher and G. Puebla. Abstract Interpretation over Non-Deterministic Finite Tree Automata for Set-Based Analysis of Logic Programs. In Fourth International Symposium on Practical Aspects of Declarative Languages, LNCS, pages 243–261. Springer-Verlag, January 2002.CrossRefGoogle Scholar
  6. 6.
    J.P. Gallagher and D.A. de Waal. Fast and Precise Regular Approximations of Logic Programs. In Pascal Van Hentenryck, editor, Proc. of the 11th International Conference on Logic Programming, pages 599–613. MIT Press, 1994.Google Scholar
  7. 7.
    M. Hermenegildo, F. Bueno, D. Cabeza, M. Carro, M. García de la Banda, P. López-García, and G. Puebla. The Ciao Logic Programming Environment. In International Conference on Computational Logic, CL2000, July 2000.Google Scholar
  8. 8.
    M. Hermenegildo, F. Bueno, G. Puebla, and P. López-García. Program Analysis, Debugging and Optimization Using the Ciao System Preprocessor. In 1999 International Conference on Logic Programming, pages 52–66, Cambridge, MA, November 1999. MIT Press.Google Scholar
  9. 9.
    G. Janssens and M. Bruynooghe. Deriving Descriptions of Possible Values of Program Variables by means of Abstract Interpretation. Journal of Logic Programming, 13(2 and 3):205–258, July 1992.Google Scholar
  10. 10.
    T. Lindgren and P. Mildner. The Impact of Structure Analysis on Prolog Compilation. Technical Report 140, Computing Science Dept., Uppsala University, 1997.Google Scholar
  11. 11.
    P. Mildner. Type Domains for Abstract Interpretation: A Critical Study. PhD thesis, Computing Science Department-Uppsala University, 1999.Google Scholar
  12. 12.
    H. Saglam and J. Gallagher. Approximating Logic Programs Using Types and Regular Descriptions. Technical Report CSTR-94-19, Department of Computer Science, University of Bristol, Bristol BS8 1TR, 1994.Google Scholar
  13. 13.
    P. Van Hentenryck, A. Cortesi, and B. Le Charlier. Type Analysis of Prolog Using Type Graphs. Journal of Logic Programming, 22(3):179–209, 1995.zbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2002

Authors and Affiliations

  • Claudio Vaucheret
    • 1
  • Francisco Bueno
    • 1
  1. 1.Technical University of Madrid (UPM)Spain

Personalised recommendations