13 research outputs found

    Typability and type checking in the second-order Λ-calculus are equivalent and undecidable (Preliminary Draft)

    Full text link
    We consider the problems of typability[1] and type checking[2] in the Girard/Reynolds second-order polymorphic typed λ-calculus, for which we use the short name "System F" and which we use in the "Curry style" where types are assigned to pure λ -terms. These problems have been considered and proven to be decidable or undecidable for various restrictions and extensions of System F and other related systems, and lower-bound complexity results for System F have been achieved, but they have remained "embarrassing open problems"[3] for System F itself. We first prove that type checking in System F is undecidable by a reduction from semi-unification. We then prove typability in System F is undecidable by a reduction from type checking. Since the reverse reduction is already known, this implies the two problems are equivalent. The second reduction uses a novel method of constructing λ-terms such that in all type derivations, specific bound variables must always be assigned a specific type. Using this technique, we can require that specific subterms must be typable using a specific, fixed type assignment in order for the entire term to be typable at all. Any desired type assignment may be simulated. We develop this method, which we call "constants for free", for both the λK and λI calculi.NSF (CCR-9113196

    A Direct Algorithm for the Type Interference in the Rank 2 Fragment of the Second--Order λ-Calculus

    Full text link
    We study the problem of type inference for a family of polymorphic type disciplines containing the power of Core-ML. This family comprises all levels of the stratification of the second-order lambda-calculus by "rank" of types. We show that typability is an undecidable problem at every rank k ≥ 3 of this stratification. While it was already known that typability is decidable at rank ≤ 2, no direct and easy-to-implement algorithm was available. To design such an algorithm, we develop a new notion of reduction and show how to use it to reduce the problem of typability at rank 2 to the problem of acyclic semi-unification. A by-product of our analysis is the publication of a simple solution procedure for acyclic semi-unification

    Lambda račun kao osnova funkcijskog programiranja

    Get PDF
    Funkcijsko programiranje stil je programiranja koji se zasniva na izračunavanju funkcija. U ovome članku izlažemo teorijske osnove funkcijskog programiranja. Za razliku od imperativnog programiranja, koje kao teorijski model izračunavanja koristi Turingov stroj, funkcijsko programiranje kao osnovu koristi λ-račun. Dok Turingov stroj koristi promjenu stanja kao postupak izračunavanja, λ-račun sastoji se isključivo od primjena funkcija te korištenja njihovih povratnih vrijednosti. Kao primjer konkretnog funkcijskog programskog jezika, u članku opisujemo Haskell, moderan funkcijski programski jezik koji se temelji na tipiziranom λ-računu

    Constraint-based type inference for FreezeML

    Get PDF

    A Polymorphic RPC Calculus

    Get PDF
    The RPC calculus is a simple semantic foundation for multi-tier programming languages such as Links in which located functions can be written for the client-server model. Subsequently, the typed RPC calculus is designed to capture the location information of functions by types and to drive location type-directed slicing compilations. However, the use of locations is currently limited to monomorphic ones, which is one of the gaps to overcome to put into practice the theory of RPC calculi for client-server model. This paper proposes a polymorphic RPC calculus to allow programmers to write succinct multi-tier programs using polymorphic location constructs. Then the polymorphic multi-tier programs can be automatically translated into programs only containing location constants amenable to the existing slicing compilation methods. We formulate a type system for the polymorphic RPC calculus, and prove its type soundness. Also, we design a monomorphization translation together with proofs on its type and semantic correctness for the translation.Comment: SBMF-Brazilian Symposium on Formal Methods 201
    corecore