308 research outputs found

    On proving the equivalence of concurrency primitives

    Get PDF
    Various concurrency primitives have been added to sequential programming languages, in order to turn them concurrent. Prominent examples are concurrent buffers for Haskell, channels in Concurrent ML, joins in JoCaml, and handled futures in Alice ML. Even though one might conjecture that all these primitives provide the same expressiveness, proving this equivalence is an open challenge in the area of program semantics. In this paper, we establish a first instance of this conjecture. We show that concurrent buffers can be encoded in the lambda calculus with futures underlying Alice ML. Our correctness proof results from a systematic method, based on observational semantics with respect to may and must convergence

    Deterministic Automata for Unordered Trees

    Get PDF
    Automata for unordered unranked trees are relevant for defining schemas and queries for data trees in Json or Xml format. While the existing notions are well-investigated concerning expressiveness, they all lack a proper notion of determinism, which makes it difficult to distinguish subclasses of automata for which problems such as inclusion, equivalence, and minimization can be solved efficiently. In this paper, we propose and investigate different notions of "horizontal determinism", starting from automata for unranked trees in which the horizontal evaluation is performed by finite state automata. We show that a restriction to confluent horizontal evaluation leads to polynomial-time emptiness and universality, but still suffers from coNP-completeness of the emptiness of binary intersections. Finally, efficient algorithms can be obtained by imposing an order of horizontal evaluation globally for all automata in the class. Depending on the choice of the order, we obtain different classes of automata, each of which has the same expressiveness as CMso.Comment: In Proceedings GandALF 2014, arXiv:1408.556

    Adequacy of compositional translations for observational semantics

    Get PDF
    We investigate methods and tools for analysing translations between programming languages with respect to observational semantics. The behaviour of programs is observed in terms of may- and must-convergence in arbitrary contexts, and adequacy of translations, i.e., the reflection of program equivalence, is taken to be the fundamental correctness condition. For compositional translations we propose a notion of convergence equivalence as a means for proving adequacy. This technique avoids explicit reasoning about contexts, and is able to deal with the subtle role of typing in implementations of language extension

    On correctness of buffer implementations in a concurrent lambda calculus with futures

    Get PDF
    Motivated by the question of correctness of a specific implementation of concurrent buffers in the lambda calculus with futures underlying Alice ML, we prove that concurrent buffers and handled futures can correctly encode each other. Correctness means that our encodings preserve and reflect the observations of may- and must-convergence. This also shows correctness wrt. program semantics, since the encodings are adequate translations wrt. contextual semantics. While these translations encode blocking into queuing and waiting, we also provide an adequate encoding of buffers in a calculus without handles, which is more low-level and uses busy-waiting instead of blocking. Furthermore we demonstrate that our correctness concept applies to the whole compilation process from high-level to low-level concurrent languages, by translating the calculus with buffers, handled futures and data constructors into a small core language without those constructs

    Program equivalence for a concurrent lambda calculus with futures

    Get PDF
    Reasoning about the correctness of program transformations requires a notion of program equivalence. We present an observational semantics for the concurrent lambda calculus with futures Lambda(fut), which formalizes the operational semantics of the programming language Alice ML. We show that natural program optimizations, as well as partial evaluation with respect to deterministic rules, are correct for Lambda(fut). This relies on a number of fundamental properties that we establish for our observational semantics

    Constraint programming in computational linguistics

    Get PDF
    Constraint programming is a programming paradigm that was originally invented in computer science to deal with hard combinatorial problems. Recently, constraint programming has evolved into a technology which permits to solve hard industrial scheduling and optimization problems. We argue that existing constraint programming technology can be useful for applications in natural language processing. Some problems whose treatment with traditional methods requires great care to avoid combinatorial explosion of (potential) readings seem to be solvable in an efficient and elegant manner using constraint programming. We illustrate our claim by two recent examples, one from the area of underspecified semantics and one from parsing

    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

    Early = Earliest?

    No full text
    Early query answering is the core issue of memory efficient query evaluation on data streams. The idea is to select and reject answer candidates as early as possible on the stream, so that they do not have to be stored in main memory. Since earliest query answering is unfeasible for XPath, as first no- ticed by Benedikt, Jeffrey and Ley-Wild in 2008, most exist- ing streaming algorithms for XPath approximate it in some early manner, while focussing on high time efficiency. Such approximations, however, spoil all theoretical guarantees on memory efficiency. In this paper, we prove that earliest query answering is indeed feasible for positive Forward XPath queries, which have neither unsatisfiable nor valid subqueries. The core in- sight is that a variant of Colmerauer's independence property can be proven for the corresponding fragment of the FXP tree logic. Based on this independence property, we can show that the early query answering algorithm from [13], which is based on a compiler from FXP to early nested word automata, is indeed earliest for all positive FXP0 queries with neither unsatisfiable nor valid subformulas. Further- more, this algorithm outperforms most previous algorithms for XPath evaluation on XML streams in time efficiency and coverage, as shown elsewhere. Available here.</p

    A Functional Language for Hyperstreaming XSLT

    No full text
    The problem of how to transform large data trees received on streams with a much smaller memory is still an open challenge despite of a decade of research on XML. Therefore, the current approach of the XSLT working of the W3C is to provide streaming support only for a smaller fragment of XSLT 3.0. This has the drawback that many existing XSLT programs need to be rewritten in order to become executable on XML streams, while many others cannot be rewritten at all, since defining nonstreamble transformations. In this paper, we propose a new hyperstreaming approach that does not require any a priori restrictions. The model of hyperstreaming generalizes on the model of streaming by adding shredding operations for the output stream, so that its parts may be plugged together later on. Many transformations such as flips of document pairs are hyperstreamable but not streamable. We then present the functional language X-Fun for defining transformations between XML data trees, while providing shredding instructions. X-Fun can be understood as an extension of Frisch's XStream language with output shredding, while pattern matching is replaced by tree navigation with XPath expressions. We provide a compiler from XSLT into a fragment of X-Fun, which can be considered as the core of XSLT. We then present a hyperstreaming algorithm for evaluating X-Fun programs which combines a recent XPath evaluator with a traditional functional programming engine. We have implemented a hyperstreaming evaluator for X-Fun and thus for XSLT and compare it experimentally with Saxon's XSLT implementation. It turns out that many XSLT programs become hyperstreamable with good efficiency and without any manual rewriting. Available here.</p
    corecore