SAFETY ANALYSIS VERSUS TYPE INFERENCE

Citation
J. Palsberg et Mi. Schwartzbach, SAFETY ANALYSIS VERSUS TYPE INFERENCE, Information and computation, 118(1), 1995, pp. 128-141
Citations number
23
Categorie Soggetti
Information Science & Library Science",Mathematics,"Computer Science Information Systems
Journal title
ISSN journal
08905401
Volume
118
Issue
1
Year of publication
1995
Pages
128 - 141
Database
ISI
SICI code
0890-5401(1995)118:1<128:SAVTI>2.0.ZU;2-V
Abstract
Safety analysis is an algorithm for determining if a term in an untype d lambda calculus with constants is safe, i.e., if it does not cause a n error during evaluation. This ambition is also shared by algorithms for type inference. Safety analysis and type inference are based on ra ther different perspectives, however. Safety analysis is global in tha t 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 t his paper we prove that safety analysis is sound, relative to both a s trict and a lazy operational semantics. We also prove that safety anal ysis accepts strictly more safe lambda terms than does type inference for simple types. The latter result demonstrates that global program a nalyses can be more precise than local ones. (C) 1995 Academic Press, Inc.