88,855 research outputs found
Program transformations using temporal logic side conditions
This paper describes an approach to program optimisation based on transformations, where temporal logic is used to specify side conditions, and strategies are created which expand the repertoire of transformations and provide a suitable level of abstraction. We demonstrate the power of this approach by developing a set of optimisations using our transformation language and showing how the transformations can be converted into a form which makes it easier to apply them, while maintaining trust in the resulting optimising steps. The approach is illustrated through a transformational case study where we apply several optimisations to a small program
Mechanized semantics
The goal of this lecture is to show how modern theorem provers---in this
case, the Coq proof assistant---can be used to mechanize the specification of
programming languages and their semantics, and to reason over individual
programs and over generic program transformations, as typically found in
compilers. The topics covered include: operational semantics (small-step,
big-step, definitional interpreters); a simple form of denotational semantics;
axiomatic semantics and Hoare logic; generation of verification conditions,
with application to program proof; compilation to virtual machine code and its
proof of correctness; an example of an optimizing program transformation (dead
code elimination) and its proof of correctness
On the Practical use of Variable Elimination in Constraint Optimization Problems: 'Still-life' as a Case Study
Variable elimination is a general technique for constraint processing. It is
often discarded because of its high space complexity. However, it can be
extremely useful when combined with other techniques. In this paper we study
the applicability of variable elimination to the challenging problem of finding
still-lifes. We illustrate several alternatives: variable elimination as a
stand-alone algorithm, interleaved with search, and as a source of good quality
lower bounds. We show that these techniques are the best known option both
theoretically and empirically. In our experiments we have been able to solve
the n=20 instance, which is far beyond reach with alternative approaches
A discriminative view of MRF pre-processing algorithms
While Markov Random Fields (MRFs) are widely used in computer vision, they
present a quite challenging inference problem. MRF inference can be accelerated
by pre-processing techniques like Dead End Elimination (DEE) or QPBO-based
approaches which compute the optimal labeling of a subset of variables. These
techniques are guaranteed to never wrongly label a variable but they often
leave a large number of variables unlabeled. We address this shortcoming by
interpreting pre-processing as a classification problem, which allows us to
trade off false positives (i.e., giving a variable an incorrect label) versus
false negatives (i.e., failing to label a variable). We describe an efficient
discriminative rule that finds optimal solutions for a subset of variables. Our
technique provides both per-instance and worst-case guarantees concerning the
quality of the solution. Empirical studies were conducted over several
benchmark datasets. We obtain a speedup factor of 2 to 12 over expansion moves
without preprocessing, and on difficult non-submodular energy functions produce
slightly lower energy.Comment: ICCV 201
Formal Compiler Implementation in a Logical Framework
The task of designing and implementing a compiler can be a difficult and error-prone process. In this paper, we present a new approach based on the use of higher-order abstract syntax and term rewriting in a logical framework. All program transformations, from parsing to code generation, are cleanly isolated and specified as term rewrites. This has several advantages. The correctness of the compiler depends solely on a small set of rewrite rules that are written in the language of formal mathematics. In addition, the logical framework guarantees the preservation of scoping, and it automates many frequently-occurring tasks including substitution and rewriting strategies. As we show, compiler development in a logical framework can be easier than in a general-purpose language like ML, in part because of automation, and also because the framework provides extensive support for examination, validation, and debugging of the compiler transformations. The paper is organized around a case study, using the MetaPRL logical framework to compile an ML-like language to Intel x86 assembly. We also present a scoped formalization of x86 assembly in which all registers are immutable
- …
