2 research outputs found

    Safety Analysis versus Type Inference for Partial Types

    Get PDF
    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. We prove that safety analysis accepts strictly more safe lambda terms than does type inference for Thatte's partial types. 1 Introduction We will compare two techniques for analyzing the safety of terms in an untyped lambda calculus with constants, see figure 1. The safety we are concerned with is the absence of those run-time errors that arise from the misuse of constants. In this paper we consider just the two constants 0 and succ. They can be misused either by applying a number to an argument, or by applying succ to an abstraction. Safety is undecidable so any analysis algorithm must reject some safe programs. E ::= x j x:E j E 1 E 2 j 0 j succ E Figure 1: The lambda calculus. One way of achieving a safety guarantee is to perform type inference (TI), because "well-typed programs cannot go wrong". Two examples of type ..

    Safety Analysis versus Type Inference for Partial Types

    No full text
    corecore