z-logo
open-access-imgOpen Access
Safety Analysis versus Type Inference
Author(s) -
Jens Palsberg,
Michael I. Schwartzbach
Publication year - 1992
Publication title -
daimi pb
Language(s) - English
Resource type - Journals
eISSN - 2245-9316
pISSN - 0105-8517
DOI - 10.7146/dpb.v21i389.6624
Subject(s) - inference , type inference , closure (psychology) , type (biology) , mathematics , algorithm , semantics (computer science) , term (time) , programming language , computer science , calculus (dental) , discrete mathematics , artificial intelligence , physics , medicine , ecology , dentistry , quantum mechanics , economics , market economy , biology
Safety analysis is an algorithm for determining if a term in the 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 based on closure analysis, whereas type inference attempts to assign a type to all subterms. In this paper we prove that safety analysis is sound , relative to both a strict and a lazy operational semantics, and superior to type inference, in the sense that it accepts strictly more safe lambda terms. The latter result may indicate the relative potentials of static program analyses based on respectively closure analysis and type inference.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here