McMini: A Programmable DPOR-based Model Checker for Multithreaded Programs

12/11/2022
by   Maxwell Pirtle, et al.
0

Model checking has become a key tool for gaining confidence in correctness of multi-threaded programs. Unit tests and functional tests do not suffice because of race conditions that are not discovered by those tests. McMini is an extensible model checker based on DPOR (Dynamic Partial Order Reduction). A mechanism was invented to declare to McMini new, primitive thread operations, typically in 100 lines or less of C code. The mechanism was extended to also allow the end user to declare alternative thread wakeup policies, including spurious wakeups from condition variables. One declares: (I) under what conditions an operation is enabled; (ii) which thread operations are independent of each other; and (iii) when two operations can be considered as co-enabled. An optional wakeup policy is implemented by defining when a wait operation (on a semaphore, condition variable, etc.) is enabled. A new enqueue thread operation is described, allowing a user to declare alternative wakeup policies. McMini was first confirmed to operate correctly and efficiently as a traditional, but extensible model checker for mutex, semaphore, condition variable, and reader-writer. McMini's extensibility was then tested on novel primitive operations, representing other useful paradigms for multithreaded operations. An example is readers-and-two-writers. The speed of model checking was found to be five times faster and more, as compared to traditional implementations on top of condition variables. Alternative wakeup policies (e.g., FIFO, LIFO, arbitrary, etc.) were then tested using an enqueue operation. Finally, spurious wakeups were tested with a program that exposes a bug only in the presence of a spurious wakeup.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/29/2023

Tailoring Stateless Model Checking for Event-Driven Multi-Threaded Programs

Event-driven multi-threaded programming is an important idiom for struct...
research
08/07/2018

A Spin-based model checking for the simple concurrent program on a preemptive RTOS

We adapt an existing preemptive scheduling model of RTOS kernel by eChro...
research
01/30/2022

Deciding Asynchronous Hyperproperties for Recursive Programs

We introduce a novel logic for asynchronous hyperproperties with a new m...
research
12/31/2020

A Detailed Account of The Inconsistent Labelling Problem of Stutter-Preserving Partial-Order Reduction

One of the most popular state-space reduction techniques for model check...
research
10/31/2011

CTL Model Update for System Modifications

Model checking is a promising technology, which has been applied for ver...
research
02/16/2020

The HPIM-DM Multicast Routing Protocol

This paper proposes the HPIM-DM (Hard-state Protocol Independent Multica...

Please sign up or login with your details

Forgot password? Click here to reset