Abstract
Safety analysis is an algorithm for determining if a term in an untyped lambda calculus with constants is safe, i.e., if it does not cause an error during evaluation. This ambition is also shared by algorithms for type inference. Safety analysis and type inference are based on rather different perspectives, however. Safety analysis is global in that it can only analyze a complete program. In contrast, type inference is local in that it can analyze pieces of a program in isolation. In this paper we prove that safety analysis is sound, relative to both a strict and a lazy operational semantics. We also prove that safety analysis accepts strictly more safe lambda terms than does type inference for simple types. The latter result demonstrates that global program analyses can be more precise than local ones. © 1995 Academic Press, Inc.
Cite
CITATION STYLE
Palsberg, J., & Schwartzbach, M. I. (1995). Safety analysis versus type inference. Information and Computation, 118(1), 128–141. https://doi.org/10.1006/inco.1995.1058
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.