Interference Relation-Guided SMT Solving for Multi-Threaded Program Verification

Hongyu Fan, Weiting Liu, and Fei He

Abstract

Concurrent program verification is challenging due to a large number of thread interferences. A popular approach is to encode concurrent programs as SMT formulas and then rely on off-the-shelf SMT solvers to accomplish the verification. Experimental results show the promising improvements of our approach. In most existing works, an SMT solver is simply treated as the backend. There is little research on improving SMT solving for concurrent program verification.

In this paper, we recognize the characteristics of interference relation in multi-threaded programs and propose a novel approach for utilizing the interference relation in the SMT solving of multi-threaded program verification under various memory models. We show that the backend SMT solver can benefit a lot from the domain knowledge of concurrent programs. We implemented our approach in a prototype tool called Zpre and compared it with the state-of-the-art CBMC tool on credible benchmarks from the ConcurrencySafety category of SV-COMP 2019. Experimental results show promising improvements attributed to our approach.

Artifact

The artifact contains all scripts, source code, log files, and benchmarks in our evaluation.


Environment


Preparation (Optional)


Getting Started

This section shows how to set up the artifact quickly in a small subset of benchmarks.

First, run.sh calls cbmc to generate SMT files from benchmarks/ folder, which contains a small subset of benchmarks (randomly select from solvable examples). Three new folders – smt_sc/, smt_tso/, and smt_pso/ will be created; they contain the generated SMT files under SC/TSO/PSO memory models.

Secondly, run.sh calls z3 to perform SMT solving with default/partial-pre/all-pre solving strategies. Three new folders – /results-sc, /results-tso, and /results-pso will be generated; they contain log files under SC/TSO/PSO memory models.

Finally, Three excel files – sc.xlsx, tso.xlsx, and pso.xlsx will be generated; they correspond to solving time of z3 with different strategies under SC/TSO/PSO memory models.


Full Experiment

This section shows how to set up the artifact in all the benchmarks.

The detailed procedure is the same as in Getting Start.


Directory Structure of the Artifact

The artifact consists of the following four directories: