107,431 research outputs found
Fifty years of Hoare's Logic
We present a history of Hoare's logic.Comment: 79 pages. To appear in Formal Aspects of Computin
Bounded Expectations: Resource Analysis for Probabilistic Programs
This paper presents a new static analysis for deriving upper bounds on the
expected resource consumption of probabilistic programs. The analysis is fully
automatic and derives symbolic bounds that are multivariate polynomials of the
inputs. The new technique combines manual state-of-the-art reasoning techniques
for probabilistic programs with an effective method for automatic
resource-bound analysis of deterministic programs. It can be seen as both, an
extension of automatic amortized resource analysis (AARA) to probabilistic
programs and an automation of manual reasoning for probabilistic programs that
is based on weakest preconditions. As a result, bound inference can be reduced
to off-the-shelf LP solving in many cases and automatically-derived bounds can
be interactively extended with standard program logics if the automation fails.
Building on existing work, the soundness of the analysis is proved with respect
to an operational semantics that is based on Markov decision processes. The
effectiveness of the technique is demonstrated with a prototype implementation
that is used to automatically analyze 39 challenging probabilistic programs and
randomized algorithms. Experimental results indicate that the derived constant
factors in the bounds are very precise and even optimal for many programs
Disjunctive Answer Set Solvers via Templates
Answer set programming is a declarative programming paradigm oriented towards
difficult combinatorial search problems. A fundamental task in answer set
programming is to compute stable models, i.e., solutions of logic programs.
Answer set solvers are the programs that perform this task. The problem of
deciding whether a disjunctive program has a stable model is
-complete. The high complexity of reasoning within disjunctive
logic programming is responsible for few solvers capable of dealing with such
programs, namely DLV, GnT, Cmodels, CLASP and WASP. In this paper we show that
transition systems introduced by Nieuwenhuis, Oliveras, and Tinelli to model
and analyze satisfiability solvers can be adapted for disjunctive answer set
solvers. Transition systems give a unifying perspective and bring clarity in
the description and comparison of solvers. They can be effectively used for
analyzing, comparing and proving correctness of search algorithms as well as
inspiring new ideas in the design of disjunctive answer set solvers. In this
light, we introduce a general template, which accounts for major techniques
implemented in disjunctive solvers. We then illustrate how this general
template captures solvers DLV, GnT and Cmodels. We also show how this framework
provides a convenient tool for designing new solving algorithms by means of
combinations of techniques employed in different solvers.Comment: To appear in Theory and Practice of Logic Programming (TPLP
Expression-based aliasing for OO-languages
Alias analysis has been an interesting research topic in verification and
optimization of programs. The undecidability of determining whether two
expressions in a program may reference to the same object is the main source of
the challenges raised in alias analysis. In this paper we propose an extension
of a previously introduced alias calculus based on program expressions, to the
setting of unbounded program executions s.a. infinite loops and recursive
calls. Moreover, we devise a corresponding executable specification in the
K-framework. An important property of our extension is that, in a
non-concurrent setting, the corresponding alias expressions can be
over-approximated in terms of a notion of regular expressions. This further
enables us to show that the associated K-machinery implements an algorithm that
always stops and provides a sound over-approximation of the "may aliasing"
information, where soundness stands for the lack of false negatives. As a case
study, we analyze the integration and further applications of the alias
calculus in SCOOP. The latter is an object-oriented programming model for
concurrency, recently formalized in Maude; K-definitions can be compiled into
Maude for execution
- …