Skip to main content Accessibility help
×
Home
Hostname: page-component-684899dbb8-ct24h Total loading time: 1.3 Render date: 2022-05-26T11:11:56.041Z Has data issue: true Feature Flags: { "shouldUseShareProductTool": true, "shouldUseHypothesis": true, "isUnsiloEnabled": true, "useRatesEcommerce": false, "useNewApi": true }

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

HTML view is 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).CrossRefGoogle 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.CrossRefGoogle Scholar
Rosen, B. 1979. Data Flow Analysis for Procedural Languages. J. ACM, 26 (2): 322344 (Apr.).CrossRefGoogle 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.
You have Access
100
Cited by

Save article to Kindle

To save this article to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Polymorphic type, region and effect inference
Available formats
×

Save article to Dropbox

To save this article to your Dropbox account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Dropbox account. Find out more about saving content to Dropbox.

Polymorphic type, region and effect inference
Available formats
×

Save article to Google Drive

To save this article to your Google Drive account, please select one or more formats and confirm that you agree to abide by our usage policies. If this is the first time you used this feature, you will be asked to authorise Cambridge Core to connect with your Google Drive account. Find out more about saving content to Google Drive.

Polymorphic type, region and effect inference
Available formats
×
×

Reply to: Submit a response

Please enter your response.

Your details

Please enter a valid email address.

Conflicting interests

Do you have any conflicting interests? *