Skip to main content

Abstract interpretation for type checking

  • Session: Abstract Interpretation
  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1991)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 528))

Abstract

The typed logic languages are more expressive than the usual untyped ones, but run-time type-checking is in general quite costly. Compile-time type checking is a classical application of the abstract interpretation paradigm. We describe a general abstract interpretation framework and inside it we develop two new methods for the compile-time type-checking of typed logic programs. The first method applies to a restricted class of programs (those that are type-preserving and use a finite number of types) and it detects the programs that need no type-checking at all. The second one applies to any program, but, in general, it only avoids part of the run-time type-checking.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. K.Apt & D.Pedreschi; Studies in pure Prolog: termination. Proc. Symp. on Computational Logic, Lec. Notes in AI, n.1, Springer Verlag, 1990.

    Google Scholar 

  2. J.Bakus et al.; The FORTRAN automatic coding system. Western Joint Computer Conf. (1957), 188–198.

    Google Scholar 

  3. R.N.Bol, K.A.Apt, J.W.Klop; An analysis of loop checking mechanisms for logic programs. CWI, R. CS-R8942, 1989.

    Google Scholar 

  4. A.Bossi, N.Cocco & M.Fabris; Proving termination of logic programs by exploiting term properties. Dep. of Math., Univ. of Padova, R.21, 1990. Accepted to the TAPSOFT Conf., Brighton, 1991.

    Google Scholar 

  5. M.Bezem; Characterizing termination of logic programs with level mappings. Proc. North American conf. on Logic Programming, Cleveland, eds. L.Lusk & R.Overbeek, MIT Press, (1989), 69–80.

    Google Scholar 

  6. M.Bruijhooghe; A practical framework for the abstract interpretation of logic programs. To appear in the J. of Logic Programming.

    Google Scholar 

  7. A.Cortesi & G.Filè; Abstract Interpretation: an abstract domain for groundness, sharing, freeness and compoundness analysis. Dep. of Math., University of Padova, R.4-1991; also to appear in the Proc. of the ACM SIGPLAN Symposium on partial evaluation and semantics based program manipulation, New Haven, 1991.

    Google Scholar 

  8. P.Codognet & G.Filè; Coomputations, abstractions and constraints. In preparation.

    Google Scholar 

  9. M.Hanus; Horn clause programs with polymorphic types: semantics and resolution. Proc. of TAPSOFT 89, LNCS 352, 225–240.

    Google Scholar 

  10. T.Kanamori & T.Kawamura; Abstract interpretation based on OLDT-resolution. ICOT TR, 1990.

    Google Scholar 

  11. J.Lloyd; Foundations of logic programming. Springer Verlag, 2nd edition, 1987.

    Google Scholar 

  12. R. Milner; A theory of type polymorphism in programming. J.Comput. System Sci. 17, (1978), 348–375.

    Google Scholar 

  13. A. Mycroft & R. O'Keefe; A polymorphic type system for Prolog. Artificial intelligence 23, (1984), 295–307.

    Google Scholar 

  14. K. Merriot & H. Sondergaard; A tutorial on abstract interpretation of logic program. Tutorial of the North American conf. on Logic Programming, Cleveland, 1989.

    Google Scholar 

  15. P. Naur; Checking of operand types in Algol compilers. BIT 5, (1965), 151–163.

    Google Scholar 

  16. H. Tamaki & T. Sato; OLD resolution with tabulation. Proc. of the 3rd Conf. on Logic programming, London, LNCS 225, (1986), 84–98.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan Maluszyński Martin Wirsing

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Filè, G., Sottero, P. (1991). Abstract interpretation for type checking. In: Maluszyński, J., Wirsing, M. (eds) Programming Language Implementation and Logic Programming. PLILP 1991. Lecture Notes in Computer Science, vol 528. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54444-5_108

Download citation

  • DOI: https://doi.org/10.1007/3-540-54444-5_108

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-54444-9

  • Online ISBN: 978-3-540-38362-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics