scispace - formally typeset
Search or ask a question

Showing papers by "Wei-Ngan Chin published in 2013"


Journal ArticleDOI
TL;DR: This paper reduces the need for some user annotations by automatically inferring loop invariants over an abstract domain with both shape and numerical information and proves that it can synthesise loop invariant synthesis with non-trivial constraints.

14 citations


Book ChapterDOI
09 Dec 2013
TL;DR: A novel approach, called pure bi-abduction, for inferring pure information for pre/post specifications, using the result from a prior shape analysis step, and a predicate extension mechanism to systematically extend shape predicates with pure properties.
Abstract: Separation logic is a state-of-the-art logic for dealing with the program heap. Using its frame rule, initial works have strived towards automated modular verification for heap-manipulating programs against user-supplied specifications. Since manually writing specifications is a tedious and error-prone engineering process, the so-called bi-abduction (a combination of the frame rule and abductive inference) is proposed to automatically infer pre/post specifications on data structure shapes. However, it has omitted the inference of pure properties of data structures such as their size, sum, height, content and minimum/maximum value, which are needed to express a higher level of program correctness. In this paper, we propose a novel approach, called pure bi-abduction, for inferring pure information for pre/post specifications, using the result from a prior shape analysis step. The power of our new bi-abductive entailment procedure is significantly enhanced by its collection of proof obligations over uninterpreted relations (functions). Additionally, we design a predicate extension mechanism to systematically extend shape predicates with pure properties. We have implemented our inference mechanism and evaluated its utility on a benchmark of programs. We show that pure properties are prerequisite to allow the correctness of about 20% of analyzed procedures to be captured and verified.

14 citations


Book ChapterDOI
14 May 2013
TL;DR: An error calculus to support a novel specification mechanism for sound and/or complete safety properties that are to be given by users can achieve the dual objectives, namely of safety proving and bug finding, with modest overheads.
Abstract: We present an error calculus to support a novel specification mechanism for sound and/or complete safety properties that are to be given by users. With such specifications, our calculus can form a foundation for both proving program safety and/or discovering real bugs. The basis of our calculus is an algebra with a lattice domain of four abstract statuses (namely unreachability, validity, must-error and may-error) on possible program states and four operators for this domain to calculate suitable program status.We show how proof search and error localization can be supported by our calculus. Our calculus can also be extended to separation logic with support for user-defined predicates and lemmas.We have implemented our calculus in an automated verification tool for pointer-based programs. Initial experiments have confirmed that it can achieve the dual objectives, namely of safety proving and bug finding, with modest overheads.

12 citations


Book ChapterDOI
15 Oct 2013
TL;DR: A novel delayed lockset checking technique is introduced to guarantee deadlock freedom of programs with interactions between thread and lock operations and an abstraction based on precise lockset can be supported in this framework.
Abstract: This paper presents an expressive specification and verification framework for ensuring deadlock freedom of shared-memory concurrent programs that manipulate locks. We introduce a novel delayed lockset checking technique to guarantee deadlock freedom of programs with interactions between thread and lock operations. With disjunctive formulae, we highlight how an abstraction based on precise lockset can be supported in our framework. By combining our technique with locklevels, we form a unified formalism for ensuring deadlock freedom from (1) double lock acquisition, (2) interactions between thread and lock operations, and (3) unordered locking. The proposed framework is general, and can be integrated with existing specification logics such as separation logic. Specifically, we have implemented this framework into a prototype tool, called ParaHIP, to automatically verify deadlock freedom and correctness of concurrent programs against user-supplied specifications.

8 citations


Book ChapterDOI
29 Oct 2013
TL;DR: This work verifies correct synchronization of barriers in fork/join programs to provide compilers and analysers with important phasing information for improving the precision of their analyses and optimizations.
Abstract: Mainstream languages such as C/C++ (with Pthreads), Java, and .NET provide programmers with both static and dynamic barriers for synchronizing concurrent threads in fork/join programs. However, such barrier synchronization in fork/join programs is hard to verify since programmers must not only keep track of the dynamic number of participating threads, but also ensure that all participants proceed in correctly synchronized phases. As barriers are commonly used in practice, verifying correct synchronization of barriers can provide compilers and analysers with important phasing information for improving the precision of their analyses and optimizations.

6 citations


Journal ArticleDOI
TL;DR: A dual static analysis that is based only on over-approximation to concurrently derive conditions that lead to either success or failure outcomes and thus provides a comprehensive solution for both proving safety and finding real program bugs.

6 citations


Book ChapterDOI
29 Oct 2013
TL;DR: A novel abstraction method with a bi-abduction technique in the combined domain to discover pre-/post-conditions that could not be automatically inferred before and does not only prove the memory safety properties, but also finds relationships between pure and shape domains towards full functional correctness of programs.
Abstract: Automated discovery of specifications for heap-manipulating programs is a challenging task due to the complexity of aliasing and mutability of data structures. This task is further complicated by an expressive domain that combines shape, numerical and bag information. In this paper, we propose a compositional analysis framework in the presence of user-defined predicates, which would derive the summary for each method in the expressive abstract domain, independently from its callers. We propose a novel abstraction method with a bi-abduction technique in the combined domain to discover pre-/post-conditions that could not be automatically inferred before. The analysis does not only prove the memory safety properties, but also finds relationships between pure and shape domains towards full functional correctness of programs. A prototype of the framework has been implemented and initial experiments have shown that our approach can discover interesting properties for non-trivial programs.

3 citations


Book ChapterDOI
01 Jan 2013
TL;DR: In this paper, invariant synthesis algorithms for the following scenarios are presented: i) to synthesise a missing loop invariant, ii) to refine given pre/post shape templates to complete pre/ post-conditions, iii) to infer a missing precondition, iv) to calculate a missing postcondition, given a preconditions.
Abstract: Program invariants such as loop invariants and method specifications ( a.k.a. procedural summaries) are key components in program verification. Such invariants are usually manually specified by users before passed as inputs to a program verifier. The process of manually annotating programs with such invariants is tedious and error-prone and can significantly hinder the level of automation in program verification. Although invariant synthesis techniques have made noticeable progress in reducing the burden of user annotations; when it comes to automated verification of memory safety and functional correctness for heap-manipulating programs, it remains a rather challenging task to discover program specifications and invariants automatically, due to the complexity of aliasing and mutability of data structures. In this paper, we present invariant synthesis algorithms for the following scenarios: i) to synthesise a missing loop invariant, ii) to refine given pre/post shape templates to complete pre/post-conditions, iii) to infer a missing precondition, iv) to calculate a missing postcondition, given a precondition. The proposed analyses are based on abstract interpretation and are built over an abstract domain combining separation, numerical and multi-set (bag) information. Our inference mechanisms are equipped with newly designed abstraction, join, widening and abduction operations. Initial prototypical experiments have shown that they are viable and powerful enough to discover interesting useful invariants for non-trivial programs.

3 citations


Book ChapterDOI
29 Oct 2013
TL;DR: In the context of program verification, this work proposes a formal framework for proof slicing that can aggressively reduce the size of proof obligations as a means of performance improvement, and develops a calculus that formalizes a complete proof slicing procedure.
Abstract: In the context of program verification, we propose a formal framework for proof slicing that can aggressively reduce the size of proof obligations as a means of performance improvement. In particular, each large proof obligation may be broken down into smaller proofs, for which the overall processing cost can be greatly reduced, and be even more effective under proof caching. Our proposal is built on top of existing automatic provers, including the state-of-the-art prover Z3, and can also be viewed as a re-engineering effort in proof decomposition that attempts to avoid large-sized proofs for which these provers may be particularly inefficient. In our approach, we first develop a calculus that formalizes a complete proof slicing procedure, which is followed by the development of an aggressive proof slicing method. Retaining completeness is important, and thus in our experiments the complete method serves as a backup for the cases when the aggressive procedure fails. The foundations of the aggressive slicing procedure are based on a novel lightweight annotation scheme that captures weak links between sub-formulas of a proof obligation; the annotations can be inferred automatically in practice, and thus both methods are fully automated.