13 research outputs found
Strongly Normalizing Higher-Order Relational Queries
Language-integrated query is a powerful programming construct allowing database queries and ordinary program code to interoperate seamlessly and safely. Language-integrated query techniques rely on classical results about monadic comprehension calculi, including the conservativity theorem for nested relational calculus. Conservativity implies that query expressions can freely use nesting and unnesting, yet as long as the query result type is a flat relation, these capabilities do not lead to an increase in expressiveness over flat relational queries. Wong showed how such queries can be translated to SQL via a constructive rewriting algorithm, and Cooper and others advocated higher-order nested relational calculi as a basis for language-integrated queries in functional languages such as Links and F#. However there is no published proof of the central strong normalization property for higher-order nested relational queries: a previous proof attempt does not deal correctly with rewrite rules that duplicate subterms. This paper fills the gap in the literature, explaining the difficulty with a previous proof attempt, and showing how to extend the ??-lifting approach of Lindley and Stark to accommodate duplicating rewrites. We also sketch how to extend the proof to a recently-introduced calculus for heterogeneous queries mixing set and multiset semantics
Mixing set and bag semantics
The conservativity theorem for nested relational calculus implies that query
expressions can freely use nesting and unnesting, yet as long as the query
result type is a flat relation, these capabilities do not lead to an increase
in expressiveness over flat relational queries. Moreover, Wong showed how such
queries can be translated to SQL via a constructive rewriting algorithm. While
this result holds for queries over either set or multiset semantics, to the
best of our knowledge, the questions of conservativity and normalization have
not been studied for queries that mix set and bag collections, or provide
duplicate-elimination operations such as SQL's
. In this paper we formalize the problem,
and present partial progress: specifically, we introduce a calculus with both
set and multiset collection types, along with natural mappings from sets to
bags and vice versa, present a set of valid rewrite rules for normalizing such
queries, and give an inductive characterization of a set of queries whose
normal forms can be translated to SQL. We also consider examples that do not
appear straightforward to translate to SQL, illustrating that the relative
expressiveness of flat and nested queries with mixed set and multiset semantics
remains an open question.Comment: DBPL 2019 -- short pape
A Homotopical Completion Procedure with Applications to Coherence of Monoids
International audienceOne of the most used algorithm in rewriting theory is the Knuth-Bendix completion procedure which starts from a terminating rewriting system and iteratively adds rules to it, trying to produce an equivalent convergent rewriting system. It is in particular used to study presentations of monoids, since normal forms of the rewriting system provide canonical representatives of words modulo the congruence generated by the rules. Here, we are interested in extending this procedure in order to retrieve information about the low-dimensional homotopy properties of a monoid. We therefore consider the notion of coherent presentation, which is a generalization of rewriting systems that keeps track of the cells generated by confluence diagrams. We extend the Knuth-Bendix completion procedure to this setting, resulting in a homotopical completion procedure. It is based on a generalization of Tietze transformations, which are operations that can be iteratively applied to relate any two presentations of the same monoid. We also explain how these transformations can be used to remove useless generators, rules, or confluence diagrams in a coherent presentation, thus leading to a homotopical reduction procedure. Finally, we apply these techniques to the study of some examples coming from representation theory, to compute minimal coherent presentations for them: braid, plactic and Chinese monoids
SEER: Super-Optimization Explorer for HLS using E-graph Rewriting with MLIR
High-level synthesis (HLS) is a process that automatically translates a
software program in a high-level language into a low-level hardware
description. However, the hardware designs produced by HLS tools still suffer
from a significant performance gap compared to manual implementations. This is
because the input HLS programs must still be written using hardware design
principles.
Existing techniques either leave the program source unchanged or perform a
fixed sequence of source transformation passes, potentially missing
opportunities to find the optimal design. We propose a super-optimization
approach for HLS that automatically rewrites an arbitrary software program into
efficient HLS code that can be used to generate an optimized hardware design.
We developed a toolflow named SEER, based on the e-graph data structure, to
efficiently explore equivalent implementations of a program at scale. SEER
provides an extensible framework, orchestrating existing software compiler
passes and hardware synthesis optimizers.
Our work is the first attempt to exploit e-graph rewriting for large software
compiler frameworks, such as MLIR. Across a set of open-source benchmarks, we
show that SEER achieves up to 38x the performance within 1.4x the area of the
original program. Via an Intel-provided case study, SEER demonstrates the
potential to outperform manually optimized designs produced by hardware
experts
Introduction to Milestones in Interactive Theorem Proving
On March 8, 2018, Tobias Nipkow celebrated his sixtieth birthday. In anticipation of the occasion, in January 2016, two of his former students, Gerwin Klein and Jasmin Blanchette, and one of his former postdocs, Andrei Popescu, approached the editorial board of the Journal of Automated Reasoning with a proposal to publish a surprise Festschrift issue in his honor. The e-mail was sent to twenty-six members of the board, leaving out one, for reasons that will become clear in a moment. It is a sign of the love and respect that Tobias commands from his colleagues that within two days every recipient of the e-mail had responded favorably and enthusiastically to the proposal
Causally consistent dynamic slicing
We offer a lattice-theoretic account of the problem of dynamic slicing for π-calculus, building on
prior work in the sequential setting. For any particular run of a concurrent program, we exhibit a
Galois connection relating forward slices of the initial configuration to backward slices of the terminal
configuration. We prove that, up to lattice isomorphism, the same Galois connection arises
for any causally equivalent execution, allowing an efficient concurrent implementation of slicing
via a standard interleaving semantics. Our approach has been formalised in the dependentlytyped
programming language Agda