139 research outputs found

    FliPpr: A Prettier Invertible Printing System

    Get PDF
    When implementing a programming language, we often write a parser and a pretty-printer. However, manually writing both programs is not only tedious but also error-prone; it may happen that a pretty-printed result is not correctly parsed. In this paper, we propose FliPpr, which is a program transformation system that uses program inversion to produce a CFG parser from a pretty-printer. This novel approach has the advantages of fine-grained control over pretty-printing, and easy reuse of existing efficient pretty-printer and parser implementations

    Adventures in Bidirectional Programming

    Get PDF
    Most programs get used in just one direction, from input to output. But sometimes, having computed an output, we need to be able to update this output and then calculate backwards to find a correspondingly updated input. The problem of writing such bidirectional transformations — often called lenses — arises in applications across a multitude of domains and has been attacked from many perspectives [1–12, etc.]. See [13] for a detailed survey

    Finite Automata for the Sub- and Superword Closure of CFLs: Descriptional and Computational Complexity

    Full text link
    We answer two open questions by (Gruber, Holzer, Kutrib, 2009) on the state-complexity of representing sub- or superword closures of context-free grammars (CFGs): (1) We prove a (tight) upper bound of 2O(n)2^{\mathcal{O}(n)} on the size of nondeterministic finite automata (NFAs) representing the subword closure of a CFG of size nn. (2) We present a family of CFGs for which the minimal deterministic finite automata representing their subword closure matches the upper-bound of 22O(n)2^{2^{\mathcal{O}(n)}} following from (1). Furthermore, we prove that the inequivalence problem for NFAs representing sub- or superword-closed languages is only NP-complete as opposed to PSPACE-complete for general NFAs. Finally, we extend our results into an approximation method to attack inequivalence problems for CFGs

    Multifocal: a strategic bidirectional transformation language for XML schemas

    Get PDF
    Lenses are one of the most popular approaches to define bidirectional transformations between data models. However, writing a lens transformation typically implies describing the concrete steps that convert values in a source schema to values in a target schema. In contrast, many XML-based languages allow writing structure-shy programs that manipulate only specific parts of XML documents without having to specify the behavior for the remaining structure. In this paper, we propose a structure-shy bidirectional two-level transformation language for XML Schemas, that describes generic type-level transformations over schema representations coupled with value-level bidirectional lenses for document migration. When applying these two-level programs to particular schemas, we employ an existing algebraic rewrite system to optimize the automatically-generated lens transformations, and compile them into Haskell bidirectional executables. We discuss particular examples involving the generic evolution of recursive XML Schemas, and compare their performance gains over non-optimized definitions.Fundação para a Ciência e a Tecnologi

    EFSUMB Guidelines on Interventional Ultrasound (INVUS), Part II : Diagnostic ultrasound-guided interventional procedures (Long Version)

    Get PDF
    Publisher Copyright: © Georg Thieme Verlag KG Stuttgart New York.This is the second part of the series on interventional ultrasound guidelines of the Federation of Societies for Ultrasound in Medicine and Biology (EFSUMB). It deals with the diagnostic interventional procedure. General points are discussed which are pertinent to all patients, followed by organ-specific imaging that will allow the correct pathway and planning for the interventional procedure. This will allow for the appropriate imaging workup for each individual interventional procedure (Long version).publishersversionPeer reviewe
    corecore