2,646 research outputs found
On a New Notion of Partial Refinement
Formal specification techniques allow expressing idealized specifications,
which abstract from restrictions that may arise in implementations. However,
partial implementations are universal in software development due to practical
limitations. Our goal is to contribute to a method of program refinement that
allows for partial implementations. For programs with a normal and an
exceptional exit, we propose a new notion of partial refinement which allows an
implementation to terminate exceptionally if the desired results cannot be
achieved, provided the initial state is maintained. Partial refinement leads to
a systematic method of developing programs with exception handling.Comment: In Proceedings Refine 2013, arXiv:1305.563
Path-Based Program Repair
We propose a path-based approach to program repair for imperative programs.
Our repair framework takes as input a faulty program, a logic specification
that is refuted, and a hint where the fault may be located. An iterative
abstraction refinement loop is then used to repair the program: in each
iteration, the faulty program part is re-synthesized considering a symbolic
counterexample, where the control-flow is kept concrete but the data-flow is
symbolic. The appeal of the idea is two-fold: 1) the approach lazily considers
candidate repairs and 2) the repairs are directly derived from the logic
specification. In contrast to prior work, our approach is complete for programs
with finitely many control-flow paths, i.e., the program is repaired if and
only if it can be repaired at the specified fault location. Initial results for
small programs indicate that the approach is useful for debugging programs in
practice.Comment: In Proceedings FESCA 2015, arXiv:1503.0437
Healthiness from Duality
Healthiness is a good old question in program logics that dates back to
Dijkstra. It asks for an intrinsic characterization of those predicate
transformers which arise as the (backward) interpretation of a certain class of
programs. There are several results known for healthiness conditions: for
deterministic programs, nondeterministic ones, probabilistic ones, etc.
Building upon our previous works on so-called state-and-effect triangles, we
contribute a unified categorical framework for investigating healthiness
conditions. We find the framework to be centered around a dual adjunction
induced by a dualizing object, together with our notion of relative
Eilenberg-Moore algebra playing fundamental roles too. The latter notion seems
interesting in its own right in the context of monads, Lawvere theories and
enriched categories.Comment: 13 pages, Extended version with appendices of a paper accepted to
LICS 201
Inferring Concise Specifications of APIs
Modern software relies on libraries and uses them via application programming
interfaces (APIs). Correct API usage as well as many software engineering tasks
are enabled when APIs have formal specifications. In this work, we analyze the
implementation of each method in an API to infer a formal postcondition.
Conventional wisdom is that, if one has preconditions, then one can use the
strongest postcondition predicate transformer (SP) to infer postconditions.
However, SP yields postconditions that are exponentially large, which makes
them difficult to use, either by humans or by tools. Our key idea is an
algorithm that converts such exponentially large specifications into a form
that is more concise and thus more usable. This is done by leveraging the
structure of the specifications that result from the use of SP. We applied our
technique to infer postconditions for over 2,300 methods in seven popular Java
libraries. Our technique was able to infer specifications for 75.7% of these
methods, each of which was verified using an Extended Static Checker. We also
found that 84.6% of resulting specifications were less than 1/4 page (20 lines)
in length. Our technique was able to reduce the length of SMT proofs needed for
verifying implementations by 76.7% and reduced prover execution time by 26.7%
Lower and Upper Conditioning in Quantum Bayesian Theory
Updating a probability distribution in the light of new evidence is a very
basic operation in Bayesian probability theory. It is also known as state
revision or simply as conditioning. This paper recalls how locally updating a
joint state can equivalently be described via inference using the channel
extracted from the state (via disintegration). This paper also investigates the
quantum analogues of conditioning, and in particular the analogues of this
equivalence between updating a joint state and inference. The main finding is
that in order to obtain a similar equivalence, we have to distinguish two forms
of quantum conditioning, which we call lower and upper conditioning. They are
known from the literature, but the common framework in which we describe them
and the equivalence result are new.Comment: In Proceedings QPL 2018, arXiv:1901.0947
- …