Advertisement

Polymorphic typing by abstract interpretation

  • B. Monsuez
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 652)

Abstract

This paper presents a generic method which uses the framework of Abstract Interpretation as defined by the Cousots [6] to build type reconstruction algorithms. Fundamentally, this method is based upon the combination of an upper and a lower approximation as well as the use of widening operators to insure algorithm termination. We illustrate this method with a type reconstruction algorithm of the expressions of a ML-like language more or less similar to Mycroft's ML+ type system[14]. We first show that restricting recursively defined constants to monomorphic types—as in ML—can be seen as a widening operator. Then we exhibit a less restrictive operator which lets recursively defined expressions have polymorphic types, while still insuring algorithm termination.

Keywords

Type System Widening Operator Type Scheme Abstract Interpretation Type Inference 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    A. Aiken, B. Murphy, Static Type Inference in a Dynamically Typed Language, Conf. rec of the 18th ACM Symposium on POPL, Orlando Florida 279–290, Jan 1991.Google Scholar
  2. 2.
    R. Burstall, D. MacQueen and D. Sanella, Hope: An experimental applicative language, Conf. rec. of the 1980 Lisp Conference, Standford 1980Google Scholar
  3. 3.
    M.Coppo, M.Dezani-Ciancaglini, An extension of the Basic Functionality Theory for the l-Calculus, Notre Dame, Journal of Formal Logic 21 (4), 1980.Google Scholar
  4. 4.
    P.Cousot, Méthodes itératives de construction et d'approximation de points fixes d'opérateurs monotones sur un treillis, analyse sémantique des programmes. Thèse d'Etat, Grenoble 1978.Google Scholar
  5. 5.
    P. Cousot, Semantic foundations of program analysis, in ”Program Flow Analysis: theory and applications” edited by S. Muchnick N. Jones, Prentice Hall 1981.Google Scholar
  6. 6.
    P. & R. Cousot, Systematic design of program analysis framework, Conf. rec of the 6th ACM Symposium on POPL, Jan 1979.Google Scholar
  7. 7.
    C.A. Gunther D.S. Scott Semantic domains in J. van Leeuwen (ed.) Formal Models and Semantics. vol. B of Handbook of Theoritical Computer Science, Elsevier 1990.Google Scholar
  8. 8.
    N.D. Jones, A. Mycroft, A relational framework for abstract interpretation, in “Program as Data Objects” Proc. of a workshop in Copenhagen Oct. 1985. Ed. Ganziger and Jones. LNCS 215 Springer Verlag.Google Scholar
  9. 9.
    G. Kahn, Natural Semantics, “Programming of Future Generation Computers” edited by K. Fuchi, M. Nivat, Elsevier Science Publishers B. V. (North-Holland) 1988.Google Scholar
  10. 10.
    T. Karnomori, K. Iloriuchi Polymorphic Type Inference in Prolog by Abstract Interpretation, in Logic Programming '87, Tokyo, LNCS 315, 1988, 195–214.Google Scholar
  11. 11.
    A.J. Kfoury, J. Tiuryn, P. Urzyczyn, The undecidability of the semi-unification problem, Proc. ACM Symp. Theory of Computing, 1990.Google Scholar
  12. 12.
    D. MacQueen, G. Plotkin, R. Sethi An ideal model for recursive polymorphic types, Conf. rec of the 11th ACM Symposium on POPL, Jan 1984.Google Scholar
  13. 13.
    B. Monsuez Fractional Types, to in Bigre, Workshop on Static Analysis, Bordeaux, September 1992.Google Scholar
  14. 14.
    A. Mycroft Polymorphic Types Schemes and Recursive Definitions, in LNCS 167 International Symposium on Programming. 6th Colloquium April 1984, Toulouse.Google Scholar
  15. 15.
    A. Mycroft, R. O'Keefe A polymorphic Type System for Prolog, Artificial Intelligence 23, 1984, 195–307.CrossRefGoogle Scholar
  16. 16.
    G. D. Plotkin, A Structural Approach to Operational Semantics, DAIMI FN-19, Computer Science Department, Aarhus, Denmark, September 1981.Google Scholar
  17. 17.
    D. Turner, Miranda, a non-strict functional language with polymorphic types in Functional programming Languages and Computer Architecture, Nancy, LNCS 201.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • B. Monsuez
    • 1
  1. 1.Laboratoire de l'École Normale Supérieure (URA CNRS 1327)Paris

Personalised recommendations