Skip to main content Accessibility help
×
×
Home

Polymorphic type, region and effect inference

  • Jean-Pierre Talpin (a1) and Pierre Jouvelot (a1) (a2)
Abstract

We present a new static system which reconstructs the types, regions and effects of expressions in an implicitly typed functional language that supports imperative operations on reference values. Just as types structurally abstract collections of concrete values, regions represent sets of possibly aliased reference values and effects represent approximations of the imperative behaviour on regions.

We introduce a static semantics for inferring types, regions and effects, and prove that it is consistent with respect to the dynamic semantics of the language. We present a reconstruction algorithm that computes the types and effects of expressions, and assigns regions to reference values. We prove the correctness of the reconstruction algorithm with respect to the static semantics. Finally, we discuss potential applications of our system to automatic stack allocation and parallel code generation.

Copyright
References
Hide All
*Lisp Reference Manual. 1977. Thinking Machines Corporation.
Appel, A. W. and MacQueen, D. B. 1990. Standard ML Reference Manual (Preliminary). AT&T Bell Laboratories Princeton University (Oct.).
Cousot, P. and Cousot, R. 1977. Abstract Interpretation, a unified lattice model for static analysis of programs by construction of approximation of fixpoints. In Proc. ACM Conference on Principles of Programming Languages. ACM, New York.
Deutsch, A. 1990. On Determining Lifetime and Aliasing of Dynamically Allocated Data in Higher-Order Functional Specifications. In Proc. ACM Conference on Principles of Programming Languages. ACM, New York.
Gifford, D. K., Jouvelot, P., Lucassen, J. M. and Sheldon, M. A. 1987. FX-87 Reference Manual. MIT/LCS/TR-407, MIT Laboratory for Computer Science (Sept.).
Gordon, M. C. J. and Milner, R. 1979. Edinburgh LCF. Volume no. 78 of Lecture Notes in Computer Science. Springer-Verlag.
Hammel, R. T. and Gifford, D. K. 1988. FX-87 Performance Measurements: Dataflow Implementation. MIT/LCS“TR-421, MIT Laboratory for Computer Science (Nov.).
Harper, R., Milner, R. and Tofte, M. 1988. The definition of Standard ML. Edinburgh LFCS Report 88–62. University of Edinburgh.
Harrison, W. L. 1989. The Interprocedural Analysis and Automatic Parallelization of Scheme Programs. Lisp and Symbolic Computation, an Internal J., 2 (3).
Hillis, W. D. 1985. The Connection Machine. MIT Press.
Hudak, P. 1986. A semantic model of reference counting and its abstraction. In Proc. ACM Conference on Programming Language Design and Implementation. ACM, New York (Aug.).
Hughes, J. 1987. Backward Analysis of Functional Programs. In Proc. Workshop on Partial Evaluation and Mixed Computation. North Holland (Oct.).
Jouvelot, P. and Gifford, D. K. 1991. Algebraic reconstruction of types and effects. In Proc. ACM Conference on Principles of Programming Languages. ACM, New York.
Larus, J. R. and Hilfinger, P. N. 1988. Detecting conflicts between structure accesses. In Proc. ACM Conference on Programming Language Design and Implementation. ACM, New York.
Leroy, X. and Weis, P. 1991. Polymorphic type inference and assignment. In Proc. ACM Conference on Principles of Programming Languages. ACM, New York.
Lucassen, J. M. 1987. Types and Effects, towards the integration of functional and imperative programming. MIT/LCS/TR-408 (PhD Thesis), MIT Laboratory for Computer Science (Aug.).
Milner, R. 1978. A Theory for type polymorphism in programming. J. Comput. and Syst. Sci., 17: 348375.
Mitchell, J. C. and Harper, R. 1988. The Essence of ML. In Proc. ACM Conference on Principles of Programming Languages. ACM, New York.
Morris, J. H. 1968. Lambda Calculus Models of Programming Languages. MAC-TR-57, Massachusetts Institute of Technology.
Neirynck, A., Panangaden, P. and Demers, A. 1989. Effect analysis of higher order languages. Int. J. Parallel Program., 18 (119).
Plotkin, G. 1981. A structural approach to operational semantics. Technical report DAIMI-FN-19, Aarhus University.
Rees, J. and Clinger, W. (eds.) 1988. Fourth Report on the Algorithmic Language Scheme (Sept.).
Robinson, J. A. 1965. A machine oriented logic based on the resolution principle. J. ACM, 12 (1): 2341.
Rosen, B. 1979. Data Flow Analysis for Procedural Languages. J. ACM, 26 (2): 322344 (Apr.).
Sheldon, A. M. and Gifford, D. K. 1990. Static Dependent Types for First Class Modules. In Proc. ACM Conference on Lisp and Functional Programming. ACM, New York.
Talpin, J. P. and Jouvelot, P. 1991 a. The Type and Effect Discipline. Research Report EMP-CRI-A206 (revised version), Ecole Nationale Supérieure des Mines de Paris (Nov.).
Talpin, J. P. and Jouvelot, P. 1991 b. The FX/CM Compiler Backend, or Taming Massive Parallelism with an Effect System. Research Report EMP-CRI-A208, Ecole Nationale Supérieure des Mines de Paris (Nov.).
Tofte, M. 1987. Operational semantics and polymorphic type inference. PhD Thesis, University of Edinburgh.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

Polymorphic type, region and effect inference

  • Jean-Pierre Talpin (a1) and Pierre Jouvelot (a1) (a2)
Submit a response

Discussions

No Discussions have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *