Skip to main content

Type inference in Prolog

  • Conference paper
  • First Online:
9th International Conference on Automated Deduction (CADE 1988)

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

Included in the following conference series:

Abstract

This paper presents a type inference system for Prolog. The idea is to describe sets of terms for which the predicates may succeed. We calculate ordered sets of terms containing some variables called "type variables" (corresponding to variables appearing in simultaneously heads and bodies of clauses), and we generate inequations (from the bodies of clauses) on these type variables. The inequations are then solved in order to instanciate type variables by their domains, obtained from this resolution. The resolution of inequations is done by unification and strategy resolution simulation, with a particular treatment of recursive calls.

This work was supported by a CNET contract

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.

Bibiography

  1. Apt, K.R. and Van Emden M.H., "Contributions to the Theory of Logic Programming", Journal of ACM, Vol 29 No 3 pp 841–862 1982.

    Article  Google Scholar 

  2. Bruynooghe M., "Abstract Interpretation: Towards the Global Optimization of Prolog Programs", Proceedings 1987 Symposium on Logic Programming August 31–September 1987 San Francisco IEEE Society Press pp 192–204.

    Google Scholar 

  3. Bruynooghe M., "Adding redundancy to obtain more reliable and more readable Prolog Programs", Proc. First Int. Logic Prog. Conf pp 129–133 1982.

    Google Scholar 

  4. Gordon, M.J.C.,Milner,A.J.R.G., Morris,L.,Newey,M.and Wadsworth,C., "A Metalanguage for interactive proof in LCF", in Proc. 5 th ACM Symposium Principles of Programming Language, Tucson AZ, 1978.

    Google Scholar 

  5. Kanamori T. and Horiuchi K., "Type Inference in Prolog and its Applications", ICOT TR 95, December 1984.

    Google Scholar 

  6. Kowalski R.A., "Logic for Problem Solving", Elsevier Science Publishing, 1979 North Holland.

    Google Scholar 

  7. Mellish C.S., "An Automatic Generation of Mode Declaration for Prolog Programs", D.A.I. Research Paper No 163, University of Edinburgh 1981.

    Google Scholar 

  8. Mishra P., "Towards a Theory of Types in Prolog", Proc 1984 Inter. Symp. on Logic Programmig, pp289–298.

    Google Scholar 

  9. Mycroft A. and O'Keefe R.A., "A polymorphic Type System for Prolog", Logic Programming Workshop 1983.

    Google Scholar 

  10. Nilsson J.F., "On the Compilation of a Domain-Based Prolog", Information Processing pp 293–298 1983.

    Google Scholar 

  11. Pereira L.M., Pereira F.C.N. and Warren D.H.D., "User's Guide to DEC system-10 Prolog", Occasional Paper 15, Dept of Artificial Intelligence, Edinburgh 1979.

    Google Scholar 

  12. Tamaki H. and Sato T., "Unfold/Fold Transformation of Logic Programs", Second International Logic Programming Conference, Uppsala 1984.

    Google Scholar 

  13. Van Emden, M.H. and Kowalski, R.A., "The Semantics of Predicate Logic as Programming", Journal of ACM Vol 23 No 4, pp733–742 1976.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Ewing Lusk Ross Overbeek

Rights and permissions

Reprints and permissions

Copyright information

© 1988 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Azzoune, H. (1988). Type inference in Prolog. In: Lusk, E., Overbeek, R. (eds) 9th International Conference on Automated Deduction. CADE 1988. Lecture Notes in Computer Science, vol 310. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0012836

Download citation

  • DOI: https://doi.org/10.1007/BFb0012836

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-19343-2

  • Online ISBN: 978-3-540-39216-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics