119 research outputs found

    First-order theory of subtyping constraints

    Get PDF
    We investigate the first-order theory of subtyping constraints. We show that the first-order theory of non-structural subtyping is undecidable, and we show that in the case where all constructors are either unary or nullary, the first-order theory is decidable for both structural and non-structural subtyping. The decidability results are shown by reduction to a decision problem on tree automata. This work is a step towards resolving long-standing open problems of the decidability of entailment for non-structural subtyping

    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

    Subtype satisfiability and entailment

    Get PDF
    Subtype constraints were introduced in advanced programming language research for designing subtype systems and program analysis algorithms. Two logical problems arise in this context: subtype satisfiability and subtype entailment. Subtype satisfiability underlies subtype inference; subtype entailment is for simplifying subtyping constraints in the same application. In this thesis, we investigate both problems systematically for a number of dialects of subtyping constraint languages that may vary in the following dimensions: types may be simple (finite) or recursive (infinite), type constants may be ordered in lattices or in general partially ordered sets, subtyping can be structural or non-structural, depending on whether least and greatest types are permitted. We use and develop new formal reasoning techniques based on automata, unification, and modal logic. Subtype satisfiability is well understood for all dialects with constants ordered in a lattice. Although cubic time algorithms are given by Palsberg and O\u27Keefe (1995), Pottier (1996), and Palsberg, Wand, and O\u27Keefe (1997), little is known about dialects where constants belong to arbitrary partially ordered sets. We present a uniform treatment to determine the complexities of all these classes. As a consequence, we settle a problem left open by Tiuryn and Wand in 1993 and also subsume complexity bounds given by Wand and Tiuryn (1993), Tiuryn (1992), and Frey (2002). Our results are based on a new connection between modal logic and subtype constraints that we present. Subtype entailment is known to be hard even for simple subtype constraint languages. Rehof and Henglein determined the complexity of structural subtype entailment with type constants ordered in a lattice. They proved coNP-completeness for simple types (1997) and PSPACE-completeness for recursive types (1998). Furthermore, they showed that non-structural subtype entailment is PSPACE-hard and is conjectured PSPACE-complete for the case with only two type constants for the least and greatest types respectively (1998). Yet the problem still remains open today. We argue that the difficulty occurs due to e ects linked to non-regular word languages. In order to do so, we precisely characterize subtype entailment by finite word automata with word equations. This characterization induces new results on non-structural subtype entailment, constituting a promising starting point for future investigation on decidability.Diese Arbeit untersucht zwei logische Probleme der programmiersprachlichen Typinferenz: Erfüllbarkeit und Subsumption von Teiltyp-Constraints. Wir untersuchen diese Probleme systematisch für eine Reihe von Constraintsprachen. Dabei greifen wir auf Methoden der computationalen Logik, Unifikations- und Automatentheorie zurück. Teiltyp-Erfüllbarkeit ist für den Fall wohl verstanden, dass die Typkonstanten in einem Verband angeordnet sind (Palsberg und O\u27Keefe (1995), Pottier (1996), Palsberg, Wand und O\u27Keefe (1997)). Der allgemeinere Fall mit beliebig angeordneten Konstanten wurde bislang weniger untersucht. Wir stellen einen ersten universellen Ansatz vor, indem wir erstmals einen Zusammenhang zwischen Teiltyp-Constraints und Modallogik aufzeigen. Dadurch lösen wir unter Anderem ein seit 1993 offenes Komplexitätsproblem von Wand und Tiuryn. Teiltyp-Subsumption ist selbst für einfachste Constraintsprachen von hoher Komplexität. Rehof und Henglein zeigten dies für den strukturellen Verbandsfall (mit zwei Typkonstanten 1997, 1998), ließen jedoch den nicht-strukturellen Fall offen. In dieser Arbeit betrachten wir den einfachsten nicht-strukturellen Fall. Hier zeigen wir, dass versteckte Wortgleichungen neue Schwierigkeiten verursachen. Hierzu charakterisieren wir Teiltyp-Subsumption durch spezielle endliche Automaten mit Wortgleichungen. Unsere Charakterisierung liefert partielle Entscheidbarkeitsresulte zur nichtstrukturellen Teiltyp-Subsumption und kann als Grundlage für künftige Untersuchungen dienen

    First-order theory of subtyping constraints

    Get PDF
    We investigate the first-order theory of subtyping constraints. We show that the first-order theory of non-structural subtyping is undecidable, and we show that in the case where all constructors are either unary or nullary, the first-order theory is decidable for both structural and non-structural subtyping. The decidability results are shown by reduction to a decision problem on tree automata. This work is a step towards resolving long-standing open problems of the decidability of entailment for non-structural subtyping

    The Algebraic Intersection Type Unification Problem

    Full text link
    The algebraic intersection type unification problem is an important component in proof search related to several natural decision problems in intersection type systems. It is unknown and remains open whether the algebraic intersection type unification problem is decidable. We give the first nontrivial lower bound for the problem by showing (our main result) that it is exponential time hard. Furthermore, we show that this holds even under rank 1 solutions (substitutions whose codomains are restricted to contain rank 1 types). In addition, we provide a fixed-parameter intractability result for intersection type matching (one-sided unification), which is known to be NP-complete. We place the algebraic intersection type unification problem in the context of unification theory. The equational theory of intersection types can be presented as an algebraic theory with an ACI (associative, commutative, and idempotent) operator (intersection type) combined with distributivity properties with respect to a second operator (function type). Although the problem is algebraically natural and interesting, it appears to occupy a hitherto unstudied place in the theory of unification, and our investigation of the problem suggests that new methods are required to understand the problem. Thus, for the lower bound proof, we were not able to reduce from known results in ACI-unification theory and use game-theoretic methods for two-player tiling games

    Polymorphism, subtyping, and type inference in MLsub

    Get PDF
    We present a type system combining subtyping and ML-style parametric polymorphism. Unlike previous work, our system support type inference and has compact principal types. We demonstrate this system in the minimal language MLsub, which types a strict superset of core ML programs. This is made possible by keeping a strict separation between the types used to describe inputs and those used to describe outputs, and extending the classical unification algorithm to handle subtyping constraints between these input and output types. Principal types are kept compact by type simplification, which exploits deep connections between subtyping and the algebra of regular languages. An implementation is available online

    Set based failure diagnosis for concurrent constraint programming

    Get PDF
    Oz is a recent high-level programming language, based on an extension of the concurrent constraint model by higher-order procedures and state. Oz is a dynamically typed language like Prolog, Scheme, or Smalltalk. We investigate two approaches of making static type analysis available for Oz: Set-based failure diagnosis and strong typing. We define a new system of set constraints over feature trees that is appropriate for the analysis of record structures, and we investigate its satisfiability, emptiness, and entailment problem. We present a set-based diagnosis for constraint logic programming and concurrent constraint programming as first-order fragments of Oz, and we prove that it correctly detects inevitable run-time errors. We also propose an analysis for a larger sublanguage of Oz. Complementarily, we define an Oz-style language called Plain that allows an expressive strong type system. We present such a type system and prove its soundness.Oz ist eine anwendungsnahe Programmiersprache, deren Grundlage eine Erweiterung des Modells nebenläufiger Constraintprogrammierung um Prozeduren höherer Stufe und Zustand ist. Oz ist eine Sprache mit dynamischer Typüberprüfung wie Prolog, Scheme oder Smalltalk. Wir untersuchen zwei Ansätze, statische Typüberprüfung für Oz zu ermöglichen: Mengenbasierte Fehlerdiagnose und Starke Typisierung. Wir definieren ein neues System von Mengenconstraints über Featurebäumen, das für die Analyse von Recordstrukturen geeignet ist, und wir untersuchen das Erfüllbarkeits-, das Leerheits- und das Subsumtionsproblem für dieses Constraintsystem. Wir präsentieren eine mengenbasierte Diagnose für Constraint-Logikprogrammierung und für nebenläufige Constraintprogrammierung als Teilsprachen von Oz, und wir beweisen, daß diese unvermeidliche Laufzeitfehler erkennt. Wir schlagen auch eine mengenbasierte Analyse für eine grössere Teilsprache von Oz vor. Komplementär dazu definieren wir eine Oz-artige Sprache genannt Plain, die ein expressives starkes Typsystem erlaubt. Wir stellen ein solches Typsystem vor und beweisen seine Korrektheit

    Advanced flow-based type systems for object-oriented languages

    Get PDF
    Ph.DDOCTOR OF PHILOSOPH

    Set based failure diagnosis for concurrent constraint programming

    Get PDF
    Oz is a recent high-level programming language, based on an extension of the concurrent constraint model by higher-order procedures and state. Oz is a dynamically typed language like Prolog, Scheme, or Smalltalk. We investigate two approaches of making static type analysis available for Oz: Set-based failure diagnosis and strong typing. We define a new system of set constraints over feature trees that is appropriate for the analysis of record structures, and we investigate its satisfiability, emptiness, and entailment problem. We present a set-based diagnosis for constraint logic programming and concurrent constraint programming as first-order fragments of Oz, and we prove that it correctly detects inevitable run-time errors. We also propose an analysis for a larger sublanguage of Oz. Complementarily, we define an Oz-style language called Plain that allows an expressive strong type system. We present such a type system and prove its soundness.Oz ist eine anwendungsnahe Programmiersprache, deren Grundlage eine Erweiterung des Modells nebenläufiger Constraintprogrammierung um Prozeduren höherer Stufe und Zustand ist. Oz ist eine Sprache mit dynamischer Typüberprüfung wie Prolog, Scheme oder Smalltalk. Wir untersuchen zwei Ansätze, statische Typüberprüfung für Oz zu ermöglichen: Mengenbasierte Fehlerdiagnose und Starke Typisierung. Wir definieren ein neues System von Mengenconstraints über Featurebäumen, das für die Analyse von Recordstrukturen geeignet ist, und wir untersuchen das Erfüllbarkeits-, das Leerheits- und das Subsumtionsproblem für dieses Constraintsystem. Wir präsentieren eine mengenbasierte Diagnose für Constraint-Logikprogrammierung und für nebenläufige Constraintprogrammierung als Teilsprachen von Oz, und wir beweisen, daß diese unvermeidliche Laufzeitfehler erkennt. Wir schlagen auch eine mengenbasierte Analyse für eine grössere Teilsprache von Oz vor. Komplementär dazu definieren wir eine Oz-artige Sprache genannt Plain, die ein expressives starkes Typsystem erlaubt. Wir stellen ein solches Typsystem vor und beweisen seine Korrektheit
    corecore