Abstract
We present an abstract interpretation method for polymorphic type inference for Prolog programs. The method is an extension of our monomorphic type inference method, which is one of the examples of analyzing patterns of Prolog goals at calling time and exiting time by abstract interpretation. The framework is based on OLDT resolution by Tamaki and Sato, a hybrid of the top-down and bottom-up interpretations of Prolog programs. By abstracting the hybrid interpretation directly, we can compute approximately not only the type information at calling time and exiting time without infinite looping but also just the necessary and relevant information without waste. The monomorphic type inference method is extended to polymorphic types by introducting parameterized type definitions and generalizing operations for manipulating type information accordingly.
Preview
Unable to display preview. Download preview PDF.
References
Bruynooghe, M., “Adding Redundancy to Obtain More Reliable and More Readable Prolog Programs,” Proc. of 1st International Logic Programming Conference, pp. 129–133, 1982.
Cousot, P. and R. Cousot, “Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints,” Conference Record of the 4th ACM Symposium on Principles of Programming Languages, Los Angeles, pp. 238–252, 1977.
Kanamori, T. and T. Kawamura, “Analyzing Success Patterns of Logic Programs by Abstract Interpretation,” ICOT Technical Report TR-279, 1987.
Kanamori, T. and K. Horiuchi, “Detecting Functionality of Logic Programs Based on Abstract Interpretation,” ICOT Technical Report, 1987.
Kanamori, T., K. Horiuchi and T. Kawamura, “Detecting Termination of Logic Programs Based on Abstract Interpretation,” ICOT Technical Report, 1987.
Maeji, M. and T. Kanamori, “Top-down Zooming Diagnosis of Logic Programs,” ICOT Technical Report TR-290, 1987.
Mellish, C. S., “Abstract Interpretation of Prolog Programs,” Proc. of 3rd International Conference on Logic Programming, 1986.
Milner, R. “A Theory of Type Polymorphism in Programming,” J. Computer and Systems Science, 17, pp. 348–375, 1978.
Mishra, P., “Towards a Theory of Types in Prolog,” Proc. of 1984 International Symposium on Logic Programming, pp. 289–298, 1984.
Mycroft, A. and R. A. O'Keefe, “A Polymorphic Type System for Prolog,” Artificial Intelligence, 23, pp.295–307, 1984.
Pereira, L. M., F. C. N. Pereira and D. H. D. Warren, “User's Guide to DECsystem-10 Prolog,” Occasional Paper 15, Dept. of Artificial Intelligence, Edinburgh, 1979.
Tamaki, H. and T. Sato, “OLD Resolution with Tabulation,” Proc. of 3rd International Conference on Logic Programming, pp. 84–98, London, 1986.
Zobel, J, “Derivation of Polymorphic Types for Prolog,” Logic Programming: Proc. of 4th International Conference, pp. 817–838, The MIT Press, 1987.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1988 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Horiuchi, K., Kanamori, T. (1988). Polymorphic type inference in Prolog by abstract interpretation. In: Furukawa, K., Tanaka, H., Fujisaki, T. (eds) Logic Programming '87. LP 1987. Lecture Notes in Computer Science, vol 315. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-19426-6_13
Download citation
DOI: https://doi.org/10.1007/3-540-19426-6_13
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-19426-2
Online ISBN: 978-3-540-39267-5
eBook Packages: Springer Book Archive