Hostname: page-component-848d4c4894-nmvwc Total loading time: 0 Render date: 2024-06-28T21:25:07.990Z Has data issue: false hasContentIssue false

Polymorphic type, region and effect inference

Published online by Cambridge University Press:  07 November 2008

Jean-Pierre Talpin
Affiliation:
CRI, Ecole Nationale Supérieure des Mines de Paris, Paris, France
Pierre Jouvelot
Affiliation:
CRI, Ecole Nationale Supérieure des Mines de Paris, Paris, France MIT Laboratory for Computer Science, MIT, Cambridge, MA, USA
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

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.

Type
Articles
Copyright
Copyright © Cambridge University Press 1992

References

*Lisp Reference Manual. 1977. Thinking Machines Corporation.Google Scholar
Appel, A. W. and MacQueen, D. B. 1990. Standard ML Reference Manual (Preliminary). AT&T Bell Laboratories Princeton University (Oct.).Google Scholar
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.Google Scholar
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.Google Scholar
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.).Google Scholar
Gordon, M. C. J. and Milner, R. 1979. Edinburgh LCF. Volume no. 78 of Lecture Notes in Computer Science. Springer-Verlag.Google Scholar
Hammel, R. T. and Gifford, D. K. 1988. FX-87 Performance Measurements: Dataflow Implementation. MIT/LCS“TR-421, MIT Laboratory for Computer Science (Nov.).Google Scholar
Harper, R., Milner, R. and Tofte, M. 1988. The definition of Standard ML. Edinburgh LFCS Report 88–62. University of Edinburgh.Google Scholar
Harrison, W. L. 1989. The Interprocedural Analysis and Automatic Parallelization of Scheme Programs. Lisp and Symbolic Computation, an Internal J., 2 (3).Google Scholar
Hillis, W. D. 1985. The Connection Machine. MIT Press.Google Scholar
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.).Google Scholar
Hughes, J. 1987. Backward Analysis of Functional Programs. In Proc. Workshop on Partial Evaluation and Mixed Computation. North Holland (Oct.).Google Scholar
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.Google Scholar
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.Google Scholar
Leroy, X. and Weis, P. 1991. Polymorphic type inference and assignment. In Proc. ACM Conference on Principles of Programming Languages. ACM, New York.Google Scholar
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.).Google Scholar
Milner, R. 1978. A Theory for type polymorphism in programming. J. Comput. and Syst. Sci., 17: 348375.CrossRefGoogle Scholar
Mitchell, J. C. and Harper, R. 1988. The Essence of ML. In Proc. ACM Conference on Principles of Programming Languages. ACM, New York.Google Scholar
Morris, J. H. 1968. Lambda Calculus Models of Programming Languages. MAC-TR-57, Massachusetts Institute of Technology.Google Scholar
Neirynck, A., Panangaden, P. and Demers, A. 1989. Effect analysis of higher order languages. Int. J. Parallel Program., 18 (119).Google Scholar
Plotkin, G. 1981. A structural approach to operational semantics. Technical report DAIMI-FN-19, Aarhus University.Google Scholar
Rees, J. and Clinger, W. (eds.) 1988. Fourth Report on the Algorithmic Language Scheme (Sept.).Google Scholar
Robinson, J. A. 1965. A machine oriented logic based on the resolution principle. J. ACM, 12 (1): 2341.Google Scholar
Rosen, B. 1979. Data Flow Analysis for Procedural Languages. J. ACM, 26 (2): 322344 (Apr.).Google Scholar
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.Google Scholar
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.).Google Scholar
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.).Google Scholar
Tofte, M. 1987. Operational semantics and polymorphic type inference. PhD Thesis, University of Edinburgh.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.