85 research outputs found
Certification of Compiler Optimizations using Kleene Algebra with Tests
We use Kleene algebra with tests to verify a wide assortment of common compiler optimizations, including dead code elimination, common subexpression elimination, copy propagation, loop hoisting, induction variable elimination, instruction scheduling, algebraic simplification, loop unrolling, elimination of redundant instructions, array bounds check elimination, and introduction of sentinels. In each of these cases, we give a formal equational proof of the correctness of the optimizing transformation
Symbolic Algorithms for Language Equivalence and Kleene Algebra with Tests
We first propose algorithms for checking language equivalence of finite
automata over a large alphabet. We use symbolic automata, where the transition
function is compactly represented using a (multi-terminal) binary decision
diagrams (BDD). The key idea consists in computing a bisimulation by exploring
reachable pairs symbolically, so as to avoid redundancies. This idea can be
combined with already existing optimisations, and we show in particular a nice
integration with the disjoint sets forest data-structure from Hopcroft and
Karp's standard algorithm. Then we consider Kleene algebra with tests (KAT), an
algebraic theory that can be used for verification in various domains ranging
from compiler optimisation to network programming analysis. This theory is
decidable by reduction to language equivalence of automata on guarded strings,
a particular kind of automata that have exponentially large alphabets. We
propose several methods allowing to construct symbolic automata out of KAT
expressions, based either on Brzozowski's derivatives or standard automata
constructions. All in all, this results in efficient algorithms for deciding
equivalence of KAT expressions
Modularizing the Elimination of r=0 in Kleene Algebra
Given a universal Horn formula of Kleene algebra with hypotheses of the form
r = 0, it is already known that we can efficiently construct an equation which
is valid if and only if the Horn formula is valid. This is an example of
elimination of hypotheses, which is useful because the equational theory
of Kleene algebra is decidable while the universal Horn theory is not. We show
that hypotheses of the form r = 0 can still be eliminated in the presence of
other hypotheses. This lets us extend any technique for eliminating hypotheses
to include hypotheses of the form r = 0
Kleene Algebra with Observations
Kleene algebra with tests (KAT) is an algebraic framework for reasoning about the control flow of sequential programs. Generalising KAT to reason about concurrent programs is not straightforward, because axioms native to KAT in conjunction with expected axioms for concurrency lead to an anomalous equation. In this paper, we propose Kleene algebra with observations (KAO), a variant of KAT, as an alternative foundation for extending KAT to a concurrent setting. We characterise the free model of KAO, and establish a decision procedure w.r.t. its equational theory
Kleene algebra with observations
Kleene algebra with tests (KAT) is an algebraic framework for reasoning about the control flow of sequential programs. Generalising KAT to reason about concurrent programs is not straightforward, because axioms native to KAT in conjunction with expected axioms for concurrency lead to an anomalous equation. In this paper, we propose Kleene algebra with observations (KAO), a variant of KAT, as an alternative foundation for extending KAT to a concurrent setting. We characterise the free model of KAO, and establish a decision procedure w.r.t. its equational theory
An Elementary Proof of the FMP for Kleene Algebra
Kleene Algebra (KA) is a useful tool for proving that two programs are
equivalent by reasoning equationally. Because it abstracts from the meaning of
primitive programs, KA's equational theory is decidable, so it integrates well
with interactive theorem provers. This raises the question: which equations can
we (not) prove using the laws of KA? Moreover, which models of KA are complete,
in the sense that they satisfy exactly the provable equations? Kozen (1994)
answered these questions by characterizing KA in terms of its language model.
Concretely, equivalences provable in KA are exactly those that hold for regular
expressions.
Pratt (1980) observed that KA is complete w.r.t. relational models, i.e.,
that its provable equations are those that hold for any relational
interpretation. A less known result due to Palka (2005) says that finite models
are complete for KA, i.e., that provable equivalences coincide with equations
satisfied by all finite KAs. Phrased contrapositively, the latter is a finite
model property (FMP): any unprovable equation is falsified by a finite KA.
These results can be argued using Kozen's theorem, but the implication is
mutual: given that KA is complete w.r.t. finite (resp. relational) models,
Palka's (resp. Pratt's) arguments show that it is complete w.r.t. the language
model.
We embark on a study of the different complete models of KA, and the
connections between them. This yields a fourth result subsuming those of Palka
and Pratt, namely that KA is complete w.r.t. finite relational models. Next, we
put an algebraic spin on Palka's techniques, which yield an elementary proof of
the finite model property, and by extension, of Kozen's and Pratt's theorems.
In contrast with earlier approaches, this proof relies not on minimality or
bisimilarity of automata, but rather on representing the regular expressions
involved in terms of transformation automata
Kleene Algebra with Hypotheses
We study the Horn theories of Kleene algebras and star continuous Kleene algebras, from the complexity point of view. While their equational theories coincide and are PSpace-complete, their Horn theories differ and are undecidable. We characterise the Horn theory of star continuous Kleene algebras in terms of downward closed languages and we show that when restricting the shape of allowed hypotheses, the problems lie in various levels of the arithmetical or analytical hierarchy. We also answer a question posed by Cohen about hypotheses of the form 1=S where S is a sum of letters: we show that it is decidable
Completeness for Identity-free Kleene Lattices
We provide a finite set of axioms for identity-free Kleene lattices, which we prove sound and complete for the equational theory of their relational models. Our proof builds on the completeness theorem for Kleene algebra, and on a novel automata construction that makes it possible to extract axiomatic proofs using a Kleene-like algorithm
- …