Abstract
A method for deducing type properties at each execution point of a Prolog procedure is proposed. Such properties allow to detect at compile-time inconsistent calls, i.e. whose arguments don't respect some type preconditions.
Our method differs from most usual abstract interpretation frameworks, which are more code optimization-oriented. First, the procedure is analysed without the code of its subprocedures. Instead, formal specifications in form of pre-post conditions are associated to each subprocedures.
Another difference concerns the way types (collection of terms) are handled by our Analyser. There is no fixed type system. Any type can be freely defined by means of a fixed set of primitive operations. The main operations of the Analyser are completely defined upon these primitives.
Preview
Unable to display preview. Download preview PDF.
9. References
A. Bansal, L. Sterling, An abstract interpretation scheme for logic programs based on type expression. In Proc. Int. Conf. on Fifth Generation Computer Systems, Tokyo 1988, pp. 422–429.
M. Bruynooghe, A framework for the Abstract Interpretation of Logic Programs. Technical Report CW62, Department of Computer Science, Katholieke Universiteit Leuven, October 1987.
M. Bruynooghe, Adding Redundancy to Obtain More Reliable and More Readable Prolog Programs. In Proc. 1st Int. Logic Programming Conf., Marseille, pp. 129–133.
M. Bruynooghe, A. Mulkers, K.Musumbu, Compile-time garbage collection for Prolog. Draft, Department of Computer Science, Katholieke Universiteit Leuven, April 1988.
S.K. Debray, D.S. Warren, Automatic mode inferencing for Prolog programs. Proc. 1986 Logic Programming Symposium, Salt Lake City, Sept. 86, IEEE Society Press, 1986, pp. 78–88.
P. De Boeck, Static Type Analysis of Prolog Procedures for Ensuring Correctness. Technical Report (first version), Institut d'Informatique, Namur, March 1990.
Y. Deville, Logic Programming: Systematic Program Development. Addison-Wesley, 1990.
G. Janssens, Deriving run time properties of logic programs by means of abstract interpretation. Ph.D. Thesis, Department of Computer Science, Katholieke Universiteit Leuven, March 1990.
N.D. Jones, H. Sondergaard, A Semantics Based Framework for the Abstract Interpretation of Prolog. In Abstract Interpretation of Declarative Languages, eds. S. Abramsky and C. Hankin, Ellis Horwood.
T. Kanomori, K. Horiuchi, Type inference in Prolog and its application. Proc. IJCAI 85, Aug. 85, pp. 704–707.
F. Kluzniak, Type Synthesis for Ground Prolog. In Proc. 4th Int. Conf. Logic Programming, Melbourne, may 1987.
C.S. Mellish, Abstract interpretation of Prolog programs. In Proc. Third Int. Conf. Logic Programming, London, July 86, LNCS 225, Springer Verlag 1986, pp. 463–474.
C.S. Mellish, Some global optimisations for a Prolog compiler. J. Logic Programming, Vol. 2(1), 1985, pp. 43–66.
P. Mishra, Towards a theory of types in Prolog. Proc. 1984 Symposium on Logic Programming, Atlanta City, IEEE Society Press 1984, pp. 289–298.
K. Musumbu, Interpretation Abstraite de Programmes Prolog. Ph.D. Thesis, Department of Computer Science, Institut d'Informatique, Namur, April 1990.
Z. Somogyi, A system of precise modes for logic programs. In Proc. 4th Int. Conf. on Logic Programming, Melbourne 1987.
K.L. Clark, Negation as failure. In Logic and Data Bases, eds. H. Gallaire and J. Minker, Plenum Press, N.Y. 1984.
A. Mycroft, R.A. O'Keefe, A polymorphic type system for Prolog. In Artificial Intelligence, Vol.23, 1984, pp. 295–307.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1990 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
De Boeck, P., Charlier, B.L. (1990). Static type analysis of prolog procedures for ensuring correctness. In: Deransart, P., Maluszyński, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1990. Lecture Notes in Computer Science, vol 456. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0024187
Download citation
DOI: https://doi.org/10.1007/BFb0024187
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53010-7
Online ISBN: 978-3-540-46298-9
eBook Packages: Springer Book Archive