25 research outputs found

    Coinductive subtyping for abstract compilation of object-oriented languages into Horn formulas

    Full text link
    In recent work we have shown how it is possible to define very precise type systems for object-oriented languages by abstractly compiling a program into a Horn formula f. Then type inference amounts to resolving a certain goal w.r.t. the coinductive (that is, the greatest) Herbrand model of f. Type systems defined in this way are idealized, since in the most interesting instantiations both the terms of the coinductive Herbrand universe and goal derivations cannot be finitely represented. However, sound and quite expressive approximations can be implemented by considering only regular terms and derivations. In doing so, it is essential to introduce a proper subtyping relation formalizing the notion of approximation between types. In this paper we study a subtyping relation on coinductive terms built on union and object type constructors. We define an interpretation of types as set of values induced by a quite intuitive relation of membership of values to types, and prove that the definition of subtyping is sound w.r.t. subset inclusion between type interpretations. The proof of soundness has allowed us to simplify the notion of contractive derivation and to discover that the previously given definition of subtyping did not cover all possible representations of the empty type

    Principal types for object-oriented languages

    Get PDF
    Object-oriented languages can he translated into a lambda-calculus with records. Therefore, type inference for record languages is one aspect of the yet unsolved problem of inferring types for object-oriented languages. In order to obtain the necessary flexibility for such a type system, we can either introduce a general subtyping notion or use extensible record types. Subtyping, especially in combination with imperative features, poses many hard problems. Therefore, the second approach is promising. The problem is that, in previous type inference systems that used extensible record types, principal types could not be inferred. We have found that, for an object-oriented language where classes are not first-class citizens, we could greatly simplify the underlying record language. We show that, for our simple record language, there exists a type inference algorithm that infers principal types

    Non-structural subtype entailment in automata theory

    Get PDF
    Decidability of non-structural subtype entailment is a long standing open problem in programming language theory. In this paper, we apply automata theoretic methods to characterize the problem equivalently by using regular expressions and word equations. This characterization induces new results on non-structural subtype entailment, constitutes a promising starting point for further investigations on decidability, and explains for the first time why the problem is so difficult. The difficulty is caused by implicit word equations that we make explicit

    Introduction to the Literature on Programming Language Design

    Get PDF
    This is an introduction to the literature on programming language design and related topics. It is intended to cite the most important work, and to provide a place for students to start a literature search

    Introduction to the Literature On Programming Language Design

    Get PDF
    This is an introduction to the literature on programming language design and related topics. It is intended to cite the most important work, and to provide a place for students to start a literature search
    corecore