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.
Preview
Unable to display preview. Download preview PDF.
References
K.Apt & D.Pedreschi; Studies in pure Prolog: termination. Proc. Symp. on Computational Logic, Lec. Notes in AI, n.1, Springer Verlag, 1990.
J.Bakus et al.; The FORTRAN automatic coding system. Western Joint Computer Conf. (1957), 188–198.
R.N.Bol, K.A.Apt, J.W.Klop; An analysis of loop checking mechanisms for logic programs. CWI, R. CS-R8942, 1989.
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.
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.
M.Bruijhooghe; A practical framework for the abstract interpretation of logic programs. To appear in the J. of Logic Programming.
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.
P.Codognet & G.Filè; Coomputations, abstractions and constraints. In preparation.
M.Hanus; Horn clause programs with polymorphic types: semantics and resolution. Proc. of TAPSOFT 89, LNCS 352, 225–240.
T.Kanamori & T.Kawamura; Abstract interpretation based on OLDT-resolution. ICOT TR, 1990.
J.Lloyd; Foundations of logic programming. Springer Verlag, 2nd edition, 1987.
R. Milner; A theory of type polymorphism in programming. J.Comput. System Sci. 17, (1978), 348–375.
A. Mycroft & R. O'Keefe; A polymorphic type system for Prolog. Artificial intelligence 23, (1984), 295–307.
K. Merriot & H. Sondergaard; A tutorial on abstract interpretation of logic program. Tutorial of the North American conf. on Logic Programming, Cleveland, 1989.
P. Naur; Checking of operand types in Algol compilers. BIT 5, (1965), 151–163.
H. Tamaki & T. Sato; OLD resolution with tabulation. Proc. of the 3rd Conf. on Logic programming, London, LNCS 225, (1986), 84–98.
Author information
Authors and Affiliations
Editor information
Rights 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