Polymorphic type inference in Prolog by abstract interpretation

  • Kenji Horiuchi
  • Tadashi Kanamori
Part of the Lecture Notes in Computer Science book series (LNCS, volume 315)


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.


Search Tree Abstract Interpretation Type Inference Prolog Program Solution Node 
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]
    Bruynooghe, M., “Adding Redundancy to Obtain More Reliable and More Readable Prolog Programs,” Proc. of 1st International Logic Programming Conference, pp. 129–133, 1982.Google Scholar
  2. [2]
    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.Google Scholar
  3. [3]
    Kanamori, T. and T. Kawamura, “Analyzing Success Patterns of Logic Programs by Abstract Interpretation,” ICOT Technical Report TR-279, 1987.Google Scholar
  4. [4]
    Kanamori, T. and K. Horiuchi, “Detecting Functionality of Logic Programs Based on Abstract Interpretation,” ICOT Technical Report, 1987.Google Scholar
  5. [5]
    Kanamori, T., K. Horiuchi and T. Kawamura, “Detecting Termination of Logic Programs Based on Abstract Interpretation,” ICOT Technical Report, 1987.Google Scholar
  6. [6]
    Maeji, M. and T. Kanamori, “Top-down Zooming Diagnosis of Logic Programs,” ICOT Technical Report TR-290, 1987.Google Scholar
  7. [7]
    Mellish, C. S., “Abstract Interpretation of Prolog Programs,” Proc. of 3rd International Conference on Logic Programming, 1986.Google Scholar
  8. [8]
    Milner, R. “A Theory of Type Polymorphism in Programming,” J. Computer and Systems Science, 17, pp. 348–375, 1978.Google Scholar
  9. [9]
    Mishra, P., “Towards a Theory of Types in Prolog,” Proc. of 1984 International Symposium on Logic Programming, pp. 289–298, 1984.Google Scholar
  10. [10]
    Mycroft, A. and R. A. O'Keefe, “A Polymorphic Type System for Prolog,” Artificial Intelligence, 23, pp.295–307, 1984.Google Scholar
  11. [11]
    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.Google Scholar
  12. [12]
    Tamaki, H. and T. Sato, “OLD Resolution with Tabulation,” Proc. of 3rd International Conference on Logic Programming, pp. 84–98, London, 1986.Google Scholar
  13. [13]
    Zobel, J, “Derivation of Polymorphic Types for Prolog,” Logic Programming: Proc. of 4th International Conference, pp. 817–838, The MIT Press, 1987.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1988

Authors and Affiliations

  • Kenji Horiuchi
    • 1
  • Tadashi Kanamori
    • 1
  1. 1.Central Research LaboratoryMitsubishi Electric CorporationAmagasaki, HyogoJapan

Personalised recommendations