Skip to main content
QUICK REVIEW

[Paper Review] Bounded Model Checking of Multi-threaded Software using SMT solvers

Lucas C. Cordeiro, Bernd Fischer|arXiv (Cornell University)|Mar 19, 2010
Formal Methods in VerificationComputer Science25 references4 citations
TL;DR

This paper presents an SMT-based bounded model checking (BMC) framework for verifying multi-threaded C software with shared variables and Pthread synchronization primitives. It introduces three novel approaches—lazy, schedule recording, and underapproximation-widening—combined with partial-order reduction to efficiently explore interleavings, significantly reducing verification time and enabling detection of complex bugs like deadlocks in real-world embedded systems.

ABSTRACT

The transition from single-core to multi-core processors has made multi-threaded software an important subject in computer aided verification. Here, we describe and evaluate an extension of the ESBMC model checker to support the verification of multi-threaded software with shared variables and locks using bounded model checking (BMC) based on Satisfiability Modulo Theories (SMT). We describe three approaches to model check multi-threaded software and our modelling of the synchronization primitives of the Pthread library. In the lazy approach, we generate all possible interleavings and call the BMC procedure on each of them individually, until we either find a bug, or have systematically explored all interleavings. In the schedule recording approach, we encode all possible interleavings into one single formula and then exploit the high speed of the SMT solvers. In the underapproximation-widening approach, we reduce the state space by abstracting the number of state variables and interleavings from the proofs of unsatisfiability generated by the SMT solvers. In all three approaches, we use partial-order reduction (POR) techniques to reduce the number of interleavings explored. Experiments show that our approaches can analyze larger problems and substantially reduce the verification time compared to state-of-the-art techniques that combine classic POR methods with symbolic algorithms and others that implement the Counter-Example Guided Abstraction Refinement technique.

Motivation & Objective

  • To address the state space explosion problem in verifying multi-threaded software with shared variables and locks.
  • To extend the ESBMC model checker to support Pthread synchronization primitives (mutexes, condition variables) using SMT solvers.
  • To integrate partial-order reduction (POR) with SMT-based BMC to reduce redundant interleaving exploration.
  • To enable detection of complex concurrency bugs such as deadlocks in real-world embedded C programs.
  • To evaluate the effectiveness of underapproximation-widening (UW) with SMT solvers in multi-threaded verification.

Proposed method

  • The lazy approach generates all possible thread interleavings and applies BMC individually to each, using SMT solvers to check for violations.
  • The schedule recording approach encodes all possible execution paths of each thread into a single SMT formula, enabling high-speed analysis via SMT solving.
  • The underapproximation-widening (UW) approach abstracts the number of state variables and interleavings using unsatisfiable cores from SMT solvers to reduce state space.
  • Partial-order reduction (POR) is integrated into all three approaches to eliminate redundant interleavings by exploiting independence between thread actions.
  • The framework models Pthread primitives (mutexes, condition variables) using SMT-compatible constraints and supports finite bit-width, arrays, structures, and pointers.
  • The ESBMC tool is extended to support SMT-based BMC with background theories for ANSI-C semantics, including bit-vector and array operations.

Experimental results

Research questions

  • RQ1Can SMT-based bounded model checking effectively verify multi-threaded C programs with shared variables and Pthread synchronization?
  • RQ2How do different SMT-based BMC strategies (lazy, schedule recording, UW) compare in scalability and verification performance?
  • RQ3To what extent can partial-order reduction reduce the number of explored interleavings in SMT-based multi-threaded verification?
  • RQ4Can the underapproximation-widening technique combined with SMT solvers detect complex concurrency bugs like deadlocks that other methods miss?
  • RQ5How does the proposed SMT-based BMC framework outperform existing techniques such as CEGAR and POR-symbolic combinations in real-world benchmarks?

Key findings

  • The UW ESBMC approach outperforms the CEGAR-based SATABS model checker in verification time and scalability on real-world benchmarks.
  • The lazy ESBMC approach enables fast detection of bugs in non-trivial multi-threaded C programs by incrementally adding concurrency constraints.
  • The integration of partial-order reduction with SMT-based BMC significantly reduces the number of explored interleavings without losing soundness.
  • The framework successfully detects deadlocks caused by mutex and condition variable operations, a capability missing in prior two-thread-only or context-bounded approaches.
  • The schedule recording approach leverages the high-speed solving of SMT solvers by encoding all interleavings into a single formula, improving performance on larger problems.
  • The use of unsatisfiable cores from SMT solvers enables effective abstraction and state space reduction in the UW approach, enhancing scalability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.