Formal verification of concurrent programs with read-write locks
Read-write locking is an important mechanism to improve concurrent granularity, but it is difficult to reason about the safety of concurrent programs with read-write locks. Concurrent separation logic (CSL) provides a simple but powerful technique for locally reasoning about concurrent programs with mutual exclusive locks. Unfortunately, CSL cannot be directly applied to reasoning about concurrent programs with read-write locks due to the different concurrent control mechanisms. This paper focuses on extending CSL and presenting a proof-carrying code (PCC) system for reasoning about concurrent programs with read-write locks. We extend the heap model with a writing permission set, denoted as logical heap, then define “strong separation” and “weak separation” over logical heap. Following CSL’s local-reasoning idea, we develop a novel program logic to enforce weak separations of heap between different threads and provide verification of concurrent programs with read-write locks.
- Research Article
8
- 10.1007/s10817-012-9258-1
- Aug 30, 2012
- Journal of Automated Reasoning
We present a framework for the specification and verification of reactive concurrent programs using general-purpose mechanical theorem proving. We define specifications for concurrent programs by formalizing a notion of refinements analogous to stuttering trace containment. The formalization supports the definition of intuitive specifications of the intended behavior of a program. We present a collection of proof rules that can be effectively orchestrated by a theorem prover to reason about complex programs using refinements. The proof rules systematically reduce the correctness proof for a concurrent program to the definition and proof of an invariant. We include automated support for discharging this invariant proof with a predicate abstraction tool that leverages the existing theorems proven about the components of the concurrent programs. The framework is integrated with the ACL2 theorem prover and we demonstrate its use in the verification of several concurrent programs in ACL2.
- Research Article
17
- 10.1016/j.entcs.2007.11.010
- Feb 1, 2008
- Electronic Notes in Theoretical Computer Science
A Coq Library for Verification of Concurrent Programs
- Research Article
154
- 10.1016/0168-0072(91)90066-u
- Mar 1, 1991
- Annals of Pure and Applied Logic
Verification of concurrent programs: the automata-theoretic framework
- Research Article
- 10.1145/3229783.3229799
- Dec 7, 2018
- ACM SIGSOFT Software Engineering Notes
Substantial effort has been directed toward the specification and verification of concurrent programs. Separation logic is one such project and is considered by many to be the state of the art int he field. However, the shortcomings of separation logic in the face of data abstraction cannot be overlooked. This paper enumerates several variants of a concurrent program for which separation logic cannot capture the desired level of abstraction without compromising its readability and usefulness
- Research Article
3
- 10.1016/s1007-0214(07)70176-1
- Dec 1, 2007
- Tsinghua Science & Technology
Verification of Concurrent Assembly Programs with a Petri Net Based Safety Policy
- Single Report
2
- 10.21236/ada265201
- Feb 1, 1993
: This module introduces formal specification of concurrent software and verification of the consistency between concurrent programs and their specifications. First, what one might want to be able to prove about a concurrent program is discussed. Then, a number of formal descriptions of the concept are presented. These vary in their coverage of the phenomena, and some can be used as the bases of formal specification of programs. Next, techniques for carrying out the proof of consistency between the specification and the program are described. Finally, it is noted that some of these techniques have automated tools such as verifiers associated with them.... Concurrent programs, Multiprocessing, Formal specification, Multitasking, Formal verification, Semantics of concurrency
- Conference Article
1
- 10.1109/synasc57785.2022.00027
- Sep 1, 2022
Quantitative programming (or performance evaluation programming) is a programming paradigm, which supports the formal verification of (bounded versions of) concurrent programs by using model checking techniques. By partitioning the state space of programs into bisimulation equivalence classes, this approach enables the formal verification of programs with large state spaces. The paradigm was introduced by us in previous works by developing an experimental concurrent language designed to facilitate the construction of probabilistic models that capture the behavior of programs and that can be verified by using probabilistic model checking techniques. The experimental language introduced in previous works is extended in this paper with constructions which enable the specification of behavioral equivalence classes. Concurrent programs are translated into corresponding probabilistic models, which are analyzed by using the PRISM probabilistic model checker. The programmer identifies bisimulation equivalence classes to enable the formal verification of programs with large state spaces. For formal verification, we employ Markov Decision Processes.
- Book Chapter
24
- 10.1007/978-3-319-96145-3_5
- Jan 1, 2018
We present layered concurrent programs, a compact and expressive notation for specifying refinement proofs of concurrent programs. A layered concurrent program specifies a sequence of connected concurrent programs, from most concrete to most abstract, such that common parts of different programs are written exactly once. These programs are expressed in the ordinary syntax of imperative concurrent programs using gated atomic actions, sequencing, choice, and (recursive) procedure calls. Each concurrent program is automatically extracted from the layered program. We reduce refinement to the safety of a sequence of concurrent checker programs, one each to justify the connection between every two consecutive concurrent programs. These checker programs are also automatically extracted from the layered program. Layered concurrent programs have been implemented in the Civl verifier which has been successfully used for the verification of several complex concurrent programs.
- Book Chapter
2
- 10.1007/978-3-319-94111-0_3
- Jan 1, 2018
Separation Logic is a framework for the development of modular program analyses for sequential, inter-procedural and concurrent programs. The first part of the paper introduces Separation Logic first from a historical, then from a program verification perspective. Because program verification eventually boils down to deciding logical queries such as the validity of verification conditions, the second part is dedicated to a survey of decision procedures for Separation Logic, that stem from either SMT, proof theory or automata theory. Incidentally we address issues related to decidability and computational complexity of such problems, in order to expose certain sources of intractability.
- Research Article
5
- 10.1016/j.entcs.2008.04.010
- Apr 1, 2008
- Electronic Notes in Theoretical Computer Science
Verification of Fine-grain Concurrent Programs
- Dissertation
- 10.26686/wgtn.17060108
- Jan 1, 2017
<p>This thesis explores two kinds of program logics that have become important for modern program verification - separation logic, for reasoning about programs that use pointers to build mutable data structures, and rely guarantee reasoning, for reasoning about shared variable concurrent programs. We look more closely into the motivations for merging these two kinds of logics into a single formalism that exploits the benefits of both approaches - local, modular, and explicit reasoning about interference between threads in a shared memory concurrent program. We discuss in detail two such formalisms - RGSep and Local Rely Guarantee (LRG), in particular we analyse how each formalism models program state and treats the distinction between global state (shared by all threads) and local state (private to a given thread) and how each logic models actions performed by threads on shared state, and look into the proof rules specifically for reasoning about atomic blocks of code. We present full examples of proofs in each logic and discuss their differences. This thesis also illustrates how a weakest precondition semantics for separation logic can be used to carry out calculational proofs. We also note how in essence these proofs are data abstraction proofs showing that a data structure implements some abstract data type, and relate this idea to a classic data abstraction technique by Hoare. Finally, as part of the thesis we also present a survey of tools that are currently available for doing manual or semi-automated proofs as well as program analyses with separation logic and rely guarantee.</p>
- Dissertation
- 10.26686/wgtn.17060108.v1
- Jan 1, 2017
<p>This thesis explores two kinds of program logics that have become important for modern program verification - separation logic, for reasoning about programs that use pointers to build mutable data structures, and rely guarantee reasoning, for reasoning about shared variable concurrent programs. We look more closely into the motivations for merging these two kinds of logics into a single formalism that exploits the benefits of both approaches - local, modular, and explicit reasoning about interference between threads in a shared memory concurrent program. We discuss in detail two such formalisms - RGSep and Local Rely Guarantee (LRG), in particular we analyse how each formalism models program state and treats the distinction between global state (shared by all threads) and local state (private to a given thread) and how each logic models actions performed by threads on shared state, and look into the proof rules specifically for reasoning about atomic blocks of code. We present full examples of proofs in each logic and discuss their differences. This thesis also illustrates how a weakest precondition semantics for separation logic can be used to carry out calculational proofs. We also note how in essence these proofs are data abstraction proofs showing that a data structure implements some abstract data type, and relate this idea to a classic data abstraction technique by Hoare. Finally, as part of the thesis we also present a survey of tools that are currently available for doing manual or semi-automated proofs as well as program analyses with separation logic and rely guarantee.</p>
- Book Chapter
63
- 10.1007/978-3-319-06410-9_9
- Jan 1, 2014
The VerCors tool implements thread-modular static verification of concurrent programs, annotated with functional properties and heap access permissions. The tool supports both generic multithreaded and vector-based programming models. In particular, it can verify multithreaded programs written in Java, specified with JML extended with separation logic. It can also verify parallelizable programs written in a toy language that supports the characteristic features of OpenCL. The tool verifies programs by first encoding the specified program into a much simpler programming language and then applying the Chalice verifier to the simplified program. In this paper we discuss both the implementation of the tool and the features of its specification language.
- Single Report
- 10.21236/ada127900
- Oct 1, 1982
: This report summarizes research activities concentrated on the following topics; (1) Verification of Concurrent Programs: The Temporal Framework; (2) Verification of Concurrent Programs: Temporal Proof Principles; (3) Verification of Sequential Programs: Temporal Axiomatization; (4) Verification of Concurrent Programs: A Temporal Proof System; (5) How to Cook a Temporal Proof System for General Languages; (6) Verification of Concurrent Programs: Proving Eventualities by Well-Founded Ranking; (7) Synthesis of Communicating Processes from Temporal Specifications; (8) Deductive Synthesis of the Unification Algorithm; and (9) Special Relations in Program Synthetic Deduction.
- Research Article
3
- 10.1007/s11390-010-1065-8
- Jul 11, 2010
- Journal of Computer Science and Technology
Transactional memory (TM) is an easy-using parallel programming model that avoids common problems associated with conventional locking techniques. Several researchers have proposed a large amount of alternative hardware and software TM implementations. However, few ones focus on formal reasoning about these TM programs. In this paper, we propose a framework at assembly level for reasoning about lazy software transactional memory (STM) programs. First, we give a software TM implementation based on lightweight locks. These locks are also one part of the shared memory. Then we define the semantics of the model operationally, and the lightweight locks in transaction are non-blocking, avoiding deadlocks among transactions. Finally we design a logic -- a combination of permission accounting in separation logic and concurrent separation logic -- to verify various properties of concurrent programs based on this machine model. The whole framework is formalized using a proof-carrying-code (PCC) framework.