Results 1 
4 of
4
Inferring better contracts
 In Proceedings of ICSE
, 2011
"... Considerable progress has been made towards automatic support for one of the principal techniques available to enhance program reliability: equipping programs with extensive contracts. The results of current contract inference tools are still often unsatisfactory in practice, especially for programm ..."
Abstract

Cited by 18 (8 self)
 Add to MetaCart
Considerable progress has been made towards automatic support for one of the principal techniques available to enhance program reliability: equipping programs with extensive contracts. The results of current contract inference tools are still often unsatisfactory in practice, especially for programmers who already apply some kind of basic Design by Contract discipline, since the inferred contracts tend to be simple assertions—the very ones that programmers find easy to write. We present new, completely automatic inference techniques and a supporting tool, which take advantage of the presence of simple programmerwritten contracts in the code to infer sophisticated assertions, involving for example implication and universal quantification. Applied to a production library of classes covering standard data structures such as linked lists, arrays, stacks, queues and hash tables, the tool is able, entirely automatically, to infer 75 % of the complete contracts—contracts yielding the full formal specification of the classes—with very few redundant or irrelevant clauses.
Decision Procedures for Region Logic
"... Abstract. Region logic is Hoare logic for objectbased programs. It features local reasoning with frame conditions expressed in terms of sets of heap locations. This paper studies tableaubased decision procedures for RL, the quantifierfree fragment of the assertion language. This fragment combines ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
Abstract. Region logic is Hoare logic for objectbased programs. It features local reasoning with frame conditions expressed in terms of sets of heap locations. This paper studies tableaubased decision procedures for RL, the quantifierfree fragment of the assertion language. This fragment combines sets and (functional) images with the theories of arrays and partial orders. The procedures are of practical interest because they can be integrated efficiently into the satisfiability modulo theories (SMT) framework. We provide a semidecision procedure for RL and its implementation as a theory plugin inside the SMT solver Z3. We also provide a decision procedure for an expressive fragment of RL termed restrictedRL. We prove that deciding satisfiability of restrictedRL formulas is NPcomplete. Both procedures are proven sound and complete. Preliminary performance results indicate that the semidecision procedure has the potential toscale to large input formulas. 1
Sets with Cardinality Constraints in Satisfiability Modulo Theories
"... Abstract. Boolean Algebra with Presburger Arithmetic (BAPA) is a decidable logic that can express constraints on sets of elements and their cardinalities. Problems from verification of complex properties of software often contain fragments that belong to quantifierfree BAPA (QFBAPA). In contrast to ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
Abstract. Boolean Algebra with Presburger Arithmetic (BAPA) is a decidable logic that can express constraints on sets of elements and their cardinalities. Problems from verification of complex properties of software often contain fragments that belong to quantifierfree BAPA (QFBAPA). In contrast to many other NPcomplete problems (such as quantifierfree firstorder logic or linear arithmetic), the applications of QFBAPA to a broader set of problems has so far been hindered by the lack of an efficient implementation that can be used alongside other efficient decision procedures. We overcome these limitations by extending the efficient SMT solver Z3 with the ability to reason about cardinality (QFBAPA) constraints. Our implementation uses the DPLL(T) mechanism of Z3 to reason about the toplevel propositional structure of a QFBAPA formula, improving the efficiency compared to previous implementations. Moreover, we present a new algorithm for automatically decomposing QFBAPA formulas. Our algorithm alleviates the exponential explosion of considering all Venn regions, significantly improving the tractability of formulas with many set variables. Because it is implemented as a theory plugin, our implementation enables Z3 to prove formulas that use QFBAPA constructs with constructs from other theories that Z3 supports, as well as with quantifiers. We have applied our implementation to the verification of functional programs; we show it can automatically prove formulas that no automated approach was reported to be able to prove before. 1
On Deciding Functional Lists with Sublist Sets
"... Abstract. Motivated by the problem of deciding verification conditions for the verification of functional programs, we present new decision procedures for automated reasoning about functional lists. We first show how to decide in NP the satisfiability problem for logical constraints containing equal ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Abstract. Motivated by the problem of deciding verification conditions for the verification of functional programs, we present new decision procedures for automated reasoning about functional lists. We first show how to decide in NP the satisfiability problem for logical constraints containing equality, constructor, selectors, as well as the transitive sublist relation. We then extend this class of constraints with operators to compute the set of all sublists, and the set of objects stored in a list. Finally, we support constraints on sizes of sets, which gives us the ability to compute list length as well as the number of distinct list elements. We show that the extended theory is reducible to the theory of sets with linear cardinality constraints, and therefore still in NP. This reduction enables us to combine our theory with other decidable theories that impose constraints on sets of objects, which further increases the potential of our decidability result in verification of functional and imperative software. 1