Polymorphic Type Inference in Scheme
نویسندگان
چکیده
This paper presents a type-inference system for Scheme that is designed to be used by students in an introductory programming course. The major goal of the work is to present a simple type inference system that can be used by beginning students, yet is powerful enough to express the ideas of types, polymorphism, abstract data types (ADTs), and higher-order procedures. The system also performs some rudimentary syntax checking. The system uses subtyping, but only in a primitive fashion. It has a type datum which is a supertype of all types, and a type poof which is a subtype of all types. It uses and-types (intersection types) to control the use of datum and to generate accurate but simple types.
منابع مشابه
Safe polymorphic type inference for a Dynamically Typed Language: Translating Scheme to ML∗
We describe a new method for polymorphic type inference for the dynamically typed language Scheme. The method infers both types and explicit run-time type operations (coercions) for a given program. It can be used to statically debug Scheme programs and to give a high-level translation to ML, in essence providing an “embedding” of Scheme into ML. Our method combines the following desirable prop...
متن کاملInference for a Skew Normal Distribution Based on Progressively Type-II Censored Samples
In many industrial experiments involving lifetimes of machines or units, experiments have to be terminated early or the number of experiments must be limited due to a variety of circumstances (e.g. when expensive, etc.) the samples that arise from such experiments are called censored data. Cohen (1991) was one of the earliest to study a more general censoring scheme called progressive censor...
متن کاملPolymorphic Dynamic Typing
We study dynamic typing in continuation of Henglein’s dynamically typed λ-calculus, with particular regard to proof theoretic aspects and aspects of polymorphic completion inference. Dynamically typed λ-calculus provides a formal framework within which we can reason in a precise manner about properties of the process of completion for higher order programming languages. Completions arise from r...
متن کاملGarbage Collection via Dynamic Type Inference
A garbage collection (GC) scheme | what we call type inference GC | that dynamically performs type inference is studied. In contrast to conventional garbage collection that can collect only unreachable objects, this scheme can collect objects that are reachable yet semantically garbage. The idea is to exploit ML-like polymorphic types that can tell whether or not each object may be used in the ...
متن کاملType Checking and Inference for Polymorphic and Existential Types
This paper proves undecidability of type checking and type inference problems in some variants of typed lambda calculi with polymorphic and existential types. First, type inference in the domain-free polymorphic lambda calculus is proved to be undecidable, and then it is proved that type inference is undecidable in the negation, conjunction, and existence fragment of the domain-free typed lambd...
متن کامل