ArticlePublisher preview available

Quantifiability: a concurrent correctness condition modeled in vector space

Authors:
To read the full-text of this research, you can request a copy directly from the authors.

Abstract and Figures

Architectural imperatives due to the slowing of Moore’s Law, the broad acceptance of relaxed semantics and the O(n!) worst case verification complexity of generating sequential histories motivate a new approach to concurrent correctness. Desiderata for a new correctness condition are that it be independent of sequential histories, compositional, flexible as to timing, modular as to semantics and free of inherent locking or waiting. We propose Quantifiability, a novel correctness condition that models a system in vector space to launch a new mathematical analysis of concurrency. The vector space model is suitable for a wide range of concurrent systems and their associated data structures. This paper formally defines quantifiability and demonstrates that quantifiability is compositional and non-blocking and that it implies observational refinement. Analysis is facilitated with linear algebra, better supported and of much more efficient time complexity than traditional combinatorial methods.
This content is subject to copyright. Terms and conditions apply.
Computing (2023) 105:955–978
https://doi.org/10.1007/s00607-022-01092-3
SPECIAL ISSUE ARTICLE
Quantifiability: a concurrent correctness condition modeled
in vector space
Victor Cook1·Christina Peterson1·Zachary Painter1·Damian Dechev1
Received: 4 May 2021 / Accepted: 12 May 2022 / Published online: 7 June 2022
© The Author(s), under exclusive licence to Springer-Verlag GmbH Austria, part of Springer Nature 2022
Abstract
Architectural imperatives due to the slowing of Moore’s Law, the broad acceptance
of relaxed semantics and the O(n!) worst case verification complexity of generating
sequential histories motivate a new approach to concurrent correctness. Desiderata
for a new correctness condition are that it be independent of sequential histories,
compositional, flexible as to timing, modular as to semantics and free of inherent
locking or waiting. We propose Quantifiability, a novel correctness condition that
models a system in vector space to launch a new mathematical analysis of concurrency.
The vector space model is suitable for a wide range of concurrent systems and their
associated data structures. This paper formally defines quantifiability and demonstrates
that quantifiability is compositional and non-blocking and that it implies observational
refinement. Analysis is facilitated with linear algebra, better supported and of much
more efficient time complexity than traditional combinatorial methods.
Keywords Concurrent correctness ·Multicore performance ·Formal methods
Mathematics Subject Classification 15-04 ·15-11
BChristina Peterson
clp8199@knights.ucf.edu
Victor Cook
victor.cook@knights.ucf.edu
Zachary Painter
zacharypainter@knights.ucf.edu
Damian Dechev
Damian.Dechev@ucf.edu
1University of Central Florida, Orlando, FL, USA
123
Content courtesy of Springer Nature, terms of use apply. Rights reserved.
ResearchGate has not been able to resolve any citations for this publication.
Article
Full-text available
Parallel computing is one of the top priorities in computer science. The main means of parallel processing information is a distributed computing system (CS) - a composition of elementary machines that interact through a communication medium. Modern distributed VSs implement thread-level parallelism (TLP) within a single computing node (multi-core CS with shared memory), as well as process-level parallelism (PLP) process-level parallelism for the entire distributed CS. The main tool for developing parallel programs for such systems is the MPI standard. The need to create scalable parallel programs that effectively use compute nodes with shared memory has determined the development of the MPI standard, which today supports the creation of hybrid multi-threaded MPI programs. A hybrid multi-threaded MPI program is the combination of the computational capabilities of processes and threads. The standard defines four types of multithreading: Single - one thread of execution; Funneled - a multi-threaded program, but only main thread can perform MPI operations; Serialized - only one thread at the exact same time can make a call to MPI functions; Multiple - each program flow can perform MPI functions at any time. The main task of the multiple mode is the need to synchronize the communication flows within each process. This paper presents an overview of the work that addresses the problem of synchronizing processes running on remote machines and synchronizing internal program threads. Method for synchronization of threads based on queues with weakened semantics of operations is proposed.
Article
Full-text available
We present a new approach for stateless model checking (SMC) of multithreaded programs under Sequential Consistency (SC) semantics. To combat state-space explosion, SMC is often equipped with a partial-order reduction technique, which defines an equivalence on executions, and only needs to explore one execution in each equivalence class. Recently, it has been observed that the commonly used equivalence of Mazurkiewicz traces can be coarsened but still cover all program crashes and assertion violations. However, for this coarser equivalence, which preserves only the reads-from relation from writes to reads, there is no SMC algorithm which is (i) optimal in the sense that it explores precisely one execution in each reads-from equivalence class, and (ii) efficient in the sense that it spends polynomial effort per class. We present the first SMC algorithm for SC that is both optimal and efficient in practice, meaning that it spends polynomial time per equivalence class on all programs that we have tried. This is achieved by a novel test that checks whether a given reads-from relation can arise in some execution. We have implemented the algorithm by extending Nidhugg, an SMC tool for C/C++ programs, with a new mode called rfsc. Our experimental results show that Nidhugg/rfsc, although slower than the fastest SMC tools in programs where tools happen to examine the same number of executions, always scales similarly or better than them, and outperforms them by an exponential factor in programs where the reads-from equivalence is coarser than the standard one. We also present two non-trivial use cases where the new equivalence is particularly effective, as well as the significant performance advantage that Nidhugg/rfsc offers compared to state-of-the-art SMC and systematic concurrency testing tools.
Article
Full-text available
In addition to pre- and postconditions, program specifications in recent separation logics for concurrency have employed an algebraic structure of resources—a form of state transition systems—to describe the state-based program invariants that must be preserved, and to record the permissible atomic changes to program state. In this paper we introduce a novel notion of resource morphism, i.e. structure-preserving function on resources, and show how to effectively integrate it into separation logic, using an associated notion of morphism-specific simulation. We apply morphisms and simulations to programs verified under one resource, to compositionally adapt them to operate under another resource, thus facilitating proof reuse.
Chapter
Architectural imperatives due to the slowing of Moore’s Law, the broad acceptance of relaxed semantics and the O(n!) worst case verification complexity of generating sequential histories motivate a new approach to concurrent correctness. Quantifiability is proposed as a novel correctness condition that models a system in vector space to launch a new mathematical analysis of concurrency. Analysis is facilitated with linear algebra, better supported and of much more efficient time complexity than traditional combinatorial methods. In this paper, we design and implement a quantifiable stack (QStack) and queue (QQueue) and present results showing that quantifiable data structures are highly scalable through use of relaxed semantics, an explicit implementation trade-off permitted by quantifiability. We present a technique for proving that a data structure is quantifiable and apply this technique to show that the QStack is quantifiably correct.
Chapter
Correctness verification of a concurrent history is challenging and has been proven to be an NP-complete problem. The reason that verifying correctness cannot be solved in polynomial time is a consequence of the way correctness is defined. Traditional correctness conditions require a concurrent history to be equivalent to a legal sequential history. The worst case number of legal sequential histories for a concurrent history is O(n!) with respect to n methods invoked. Existing correctness verification tools improve the time complexity by either reducing the size of the possible legal sequential histories or improving the efficiency of generating the possible legal sequential histories. Further improvements to the time complexity of correctness verification can be achieved by changing the way correctness of concurrent programs is defined. In this paper, we present the first methodology to recast the correctness conditions in literature to be defined in vector space. The concurrent histories are represented as a set of method call vectors, and correctness is defined as properties over the set of vectors. The challenge with defining correctness in vector space is accounting for method call ordering and data structure semantics. We solve this challenge by incorporating a priority assignment scheme to the values of the method call vectors. Using our new definitions of concurrent correctness, we design a dynamic analysis tool that checks the vector space correctness of concurrent data structures in \(O(n^2)\) with respect to n method calls, a significant improvement over O(n!) time required to analyze legal sequential histories. We showcase our dynamic analysis tool by using it to check the vector space correctness of a variety of queues, stacks, and hashmaps.
Chapter
There is an imminent demand to understand the relationship between correctness and performance to deliver highly scalable multiprocessor programs. The motivation for this relationship is that relaxed correctness conditions provide performance benefits by reducing contention on data structure hot spots. Previous approaches propose metrics for characterizing relaxed correctness conditions that measure the number of method calls or state transitions to be shifted to arrive at a legal sequential history. The reason the existing metrics cannot measure the performance effects of a correctness condition is that they ignore delays in method calls since delayed responses from method calls yield correct behavior in even the strictest correctness conditions. We observe that method call delays can be captured by measuring the disorder in method call ordering using a metric from information theory known as entropy. We propose entropy as the first metric for multiprocessor programs that evaluates the trade-offs between correctness and performance. We measure entropy for a variety of concurrent stacks, queues, and sets from the Synchrobench micro-benchmark suite and correlate entropy, correctness, and performance. Our main insight is that lower entropy corresponds to better performance for strict correctness conditions and higher entropy corresponds to better performance for relaxed correctness conditions.
Article
Stateless model checking is a powerful technique for program verification, which however suffers from an exponential growth in the number of explored executions. A successful technique for reducing this number, while still maintaining complete coverage, is Dynamic Partial Order Reduction (DPOR). We present a new DPOR algorithm, which is the first to be provably optimal in that it always explores the minimal number of executions. It is based on a novel class of sets, called source sets , which replace the role of persistent sets in previous algorithms. First, we show how to modify an existing DPOR algorithm to work with source sets, resulting in an efficient and simple to implement algorithm. Second, we extend this algorithm with a novel mechanism, called wakeup trees , that allows to achieve optimality. We have implemented both algorithms in a stateless model checking tool for Erlang programs. Experiments show that source sets significantly increase the performance and that wakeup trees incur only a small overhead in both time and space.