Reasoning about Optimistic Concurrency Using a Program Logic for History

  • Abstract
  • Literature Map
  • Similar Papers
Abstract
Translate article icon Translate Article Star icon

Optimistic concurrency algorithms provide good performance for parallel programs but they are extremely hard to reason about. Program logics such as concurrent separation logic and rely-guarantee reasoning can be used to verify these algorithms, but they make heavy uses of history variables which may obscure the high-level intuition underlying the design of these algorithms. In this paper, we propose a novel program logic that uses invariants on history traces to reason about optimistic concurrency algorithms. We use past tense temporal operators in our assertions to specify execution histories. Our logic supports modular program specifications with history information by providing separation over both space (program states) and time. We verify Michael’s non-blocking stack algorithm and show that the intuition behind such algorithm can be naturally captured using trace invariants.KeywordsProgram LogicExecution TraceTransactional MemorySeparation LogicState AssertionThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Similar Papers
  • Dissertation
  • 10.26686/wgtn.17060108
Program Verification with Separation Logic and Rely Guarantee
  • Jan 1, 2017
  • Allan Tabilog

<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
Program Verification with Separation Logic and Rely Guarantee
  • Jan 1, 2017
  • Allan Tabilog

<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>

  • Conference Article
  • Cite Count Icon 16
  • 10.1109/lics.2006.30
Independence and Concurrent Separation Logic
  • Aug 12, 2006
  • J Hayman + 1 more

A compositional Petri net based semantics is given to a simple pointer-manipulating language. The model is then applied to give a notion of validity to the judgements made by concurrent separation logic that emphasizes the process-environment duality inherent in such rely-guarantee reasoning. Soundness of the rules of concurrent separation logic with respect to this definition of validity is shown. The independence information retained by the Petri net model is then exploited to characterize the independence of parallel processes enforced by the logic. This is shown to permit a refinement operation capable of changing the granularity of atomic actions

  • Conference Article
  • Cite Count Icon 3
  • 10.1063/1.5136476
Comparing the logic programming between Hopfield neural network and radial basis function neural network
  • Jan 1, 2019
  • AIP conference proceedings
  • Shehab Abdulhabib Alzaeemi + 3 more

Logic programming is a superior language because it operates on a higher level of mathematical or logical reasoning. Logic programming is well-suited in building the artificial intelligence systems. In this paper, we reviewed the performance of the logic programming in Hopfield Neural Network (HNN) and Radial Basis Function Neural Network (RBFNN). Logic programming by using the Embedding method will improve the performance of RBFNN. In HNN, the logic programming can be implemented by finding the optimal synaptic weight via Wan Abdullah method. RBFNN is expected to do logic programming optimally compared to HNN. This study gives an overview of HNN and RBFNN regarding architectures, learning processing, and their application in 2 Satisfiability (2SAT) logic programming. Both networks will be assessed based on accuracy, sensitivity, and robustness. Pursuing that, RBFNN is expected to outperform HNN in doing 2 Satisfiability logic programming.Logic programming is a superior language because it operates on a higher level of mathematical or logical reasoning. Logic programming is well-suited in building the artificial intelligence systems. In this paper, we reviewed the performance of the logic programming in Hopfield Neural Network (HNN) and Radial Basis Function Neural Network (RBFNN). Logic programming by using the Embedding method will improve the performance of RBFNN. In HNN, the logic programming can be implemented by finding the optimal synaptic weight via Wan Abdullah method. RBFNN is expected to do logic programming optimally compared to HNN. This study gives an overview of HNN and RBFNN regarding architectures, learning processing, and their application in 2 Satisfiability (2SAT) logic programming. Both networks will be assessed based on accuracy, sensitivity, and robustness. Pursuing that, RBFNN is expected to outperform HNN in doing 2 Satisfiability logic programming.

  • Book Chapter
  • Cite Count Icon 123
  • 10.1007/978-3-540-71316-6_13
On the Relationship Between Concurrent Separation Logic and Assume-Guarantee Reasoning
  • Jan 1, 2007
  • Xinyu Feng + 2 more

We study the relationship between Concurrent Separation Logic (CSL) and the assume-guarantee (A-G) method (a.k.a. rely-guarantee method). We show in three steps that CSL can be treated as a specialization of the A-G method for well-synchronized concurrent programs. First, we present an A-G based program logic for a low-level language with built-in locking primitives. Then we extend the program logic with explicit separation of “private data” and “shared data”, which provides better memory modularity. Finally, we show that CSL (adapted for the low-level language) can be viewed as a specialization of the extended A-G logic by enforcing the invariant that “shared resources are well-formed outside of critical regions”. This work can also be viewed as a different approach (from Brookes’) to proving the soundness of CSL: our CSL inference rules are proved as lemmas in the A-G based logic, whose soundness is established following the syntactic approach to proving soundness of type systems.

  • Research Article
  • Cite Count Icon 29
  • 10.1145/1925844.1926415
A separation logic for refining concurrent objects
  • Jan 26, 2011
  • ACM SIGPLAN Notices
  • Aaron Joseph Turon + 1 more

Fine-grained concurrent data structures are crucial for gaining performance from multiprocessing, but their design is a subtle art. Recent literature has made large strides in verifying these data structures, using either atomicity refinement or separation logic with rely-guarantee reasoning. In this paper we show how the ownership discipline of separation logic can be used to enable atomicity refinement, and we develop a new rely-guarantee method that is localized to the definition of a data structure. We present the first semantics of separation logic that is sensitive to atomicity, and show how to control this sensitivity through ownership. The result is a logic that enables compositional reasoning about atomicity and interference, even for programs that use fine-grained synchronization and dynamic memory allocation.

  • Conference Article
  • Cite Count Icon 31
  • 10.1145/1926385.1926415
A separation logic for refining concurrent objects
  • Jan 26, 2011
  • Aaron Joseph Turon + 1 more

Fine-grained concurrent data structures are crucial for gaining performance from multiprocessing, but their design is a subtle art. Recent literature has made large strides in verifying these data structures, using either atomicity refinement or separation logic with rely-guarantee reasoning. In this paper we show how the ownership discipline of separation logic can be used to enable atomicity refinement, and we develop a new rely-guarantee method that is localized to the definition of a data structure. We present the first semantics of separation logic that is sensitive to atomicity, and show how to control this sensitivity through ownership. The result is a logic that enables compositional reasoning about atomicity and interference, even for programs that use fine-grained synchronization and dynamic memory allocation.

  • PDF Download Icon
  • Research Article
  • Cite Count Icon 10
  • 10.1145/3632851
Trillium: Higher-Order Concurrent and Distributed Separation Logic for Intensional Refinement
  • Jan 2, 2024
  • Proceedings of the ACM on Programming Languages
  • Amin Timany + 6 more

Expressive state-of-the-art separation logics rely on step-indexing to model semantically complex features and to support modular reasoning about imperative higher-order concurrent and distributed programs. Stepindexing comes, however, with an inherent cost: it restricts the adequacy theorem of program logics to a fairly simple class of safety properties. In this paper, we explore if and how intensional refinement is a viable methodology for strengthening higher-order concurrent (and distributed) separation logic to prove non-trivial safety and liveness properties. Specifically, we introduce Trillium, a language-agnostic separation logic framework for showing intensional refinement relations between traces of a program and a model. We instantiate Trillium with a concurrent language and develop Fairis, a concurrent separation logic, that we use to show liveness properties of concurrent programs under fair scheduling assumptions through a fair liveness-preserving refinement of a model. We also instantiate Trillium with a distributed language and obtain an extension of Aneris, a distributed separation logic, which we use to show refinement relations between distributed systems and TLA + models.

  • Conference Article
  • Cite Count Icon 17
  • 10.1109/sp40001.2021.00003
Compositional Non-Interference for Fine-Grained Concurrent Programs
  • May 1, 2021
  • Lirias (KU Leuven)
  • Dan Frumin + 2 more

\n Contains fulltext :\n 230712.pdf (Author’s version preprint ) (Closed access)\n

  • PDF Download Icon
  • Research Article
  • Cite Count Icon 5
  • 10.1145/3591296
Embedding Hindsight Reasoning in Separation Logic
  • Jun 6, 2023
  • Proceedings of the ACM on Programming Languages
  • Roland Meyer + 2 more

Automatically proving linearizability of concurrent data structures remains a key challenge for verification. We present temporal interpolation as a new proof principle to guide automated proof search using hindsight arguments within concurrent separation logic. Temporal interpolation offers an easy-to-automate alternative to prophecy variables and has the advantage of structuring proofs into easy-to-discharge hypotheses. Additionally, we advance hindsight theory by integrating it into a program logic, bringing formal rigor and complementary proof machinery. We substantiate the usefulness of temporal interpolation by implementing it in a tool and using it to automatically verify the Logical Ordering tree. The proof is challenging due to future-dependent linearization points and complex structure overlays. It is the first formal proof of this data structure. Interestingly, our formalization revealed an unknown bug and an existing informal proof as erroneous.

  • Research Article
  • Cite Count Icon 30
  • 10.1016/j.entcs.2011.09.021
Precision and the Conjunction Rule in Concurrent Separation Logic
  • Sep 1, 2011
  • Electronic Notes in Theoretical Computer Science
  • Alexey Gotsman + 2 more

Precision and the Conjunction Rule in Concurrent Separation Logic

  • PDF Download Icon
  • Research Article
  • Cite Count Icon 46
  • 10.1145/3290347
Quantitative separation logic: a logic for reasoning about probabilistic pointer programs
  • Jan 2, 2019
  • Proceedings of the ACM on Programming Languages
  • Kevin Batz + 4 more

We present quantitative separation logic (QSL). In contrast to classical separation logic, QSL employs quantities which evaluate to real numbers instead of predicates which evaluate to Boolean values. The connectives of classical separation logic, separating conjunction and separating implication, are lifted from predicates to quantities. This extension is conservative: Both connectives are backward compatible to their classical analogs and obey the same laws, e.g. modus ponens, adjointness, etc. Furthermore, we develop a weakest precondition calculus for quantitative reasoning about probabilistic pointer programs in QSL. This calculus is a conservative extension of both Ishtiaq’s, O’Hearn’s and Reynolds’ separation logic for heap-manipulating programs and Kozen’s / McIver and Morgan’s weakest preexpectations for probabilistic programs. Soundness is proven with respect to an operational semantics based on Markov decision processes. Our calculus preserves O’Hearn’s frame rule , which enables local reasoning. We demonstrate that our calculus enables reasoning about quantities such as the probability of terminating with an empty heap, the probability of reaching a certain array permutation, or the expected length of a list.

  • PDF Download Icon
  • Research Article
  • Cite Count Icon 50
  • 10.2168/lmcs-11(1:2)2015
Permission-Based Separation Logic for Multithreaded Java Programs
  • Feb 27, 2015
  • Logical Methods in Computer Science
  • Christian Haack + 3 more

This paper presents a program logic for reasoning about multithreaded Java-like programs with dynamic thread creation, thread joining and reentrant object monitors. The logic is based on concurrent separation logic. It is the first detailed adaptation of concurrent separation logic to a multithreaded Java-like language. The program logic associates a unique static access permission with each heap location, ensuring exclusive write accesses and ruling out data races. Concurrent reads are supported through fractional permissions. Permissions can be transferred between threads upon thread starting, thread joining, initial monitor entrancies and final monitor exits. In order to distinguish between initial monitor entrancies and monitor reentrancies, auxiliary variables keep track of multisets of currently held monitors. Data abstraction and behavioral subtyping are facilitated through abstract predicates, which are also used to represent monitor invariants, preconditions for thread starting and postconditions for thread joining. Value-parametrized types allow to conveniently capture common strong global invariants, like static object ownership relations. The program logic is presented for a model language with Java-like classes and interfaces, the soundness of the program logic is proven, and a number of illustrative examples are presented.

  • Book Chapter
  • Cite Count Icon 5
  • 10.1007/978-3-319-47958-3_23
Completeness for a First-Order Abstract Separation Logic
  • Jan 1, 2016
  • Zhé Hóu + 1 more

Existing work on theorem proving for the assertion language of separation logic (SL) either focuses on abstract semantics which are not readily available in most applications of program verification, or on concrete models for which completeness is not possible. An important element in concrete SL is the points-to predicate which denotes a singleton heap. SL with the points-to predicate has been shown to be non-recursively enumerable. In this paper, we develop a first-order SL, called FOASL, with an abstracted version of the points-to predicate. We prove that FOASL is sound and complete with respect to an abstract semantics, of which the standard SL semantics is an instance. We also show that some reasoning principles involving the points-to predicate can be approximated as FOASL theories, thus allowing our logic to be used for reasoning about concrete program verification problems. We give some example theories that are sound with respect to different variants of separation logics from the literature, including those that are incompatible with Reynolds’s semantics. In the experiment we demonstrate our FOASL based theorem prover which is able to handle a large fragment of separation logic with heap semantics as well as non-standard semantics.

  • PDF Download Icon
  • Research Article
  • Cite Count Icon 28
  • 10.1145/3409003
SteelCore: an extensible concurrent separation logic for effectful dependently typed programs
  • Aug 2, 2020
  • Proceedings of the ACM on Programming Languages
  • Nikhil Swamy + 5 more

Much recent research has been devoted to modeling effects within type theory. Building on this work, we observe that effectful type theories can provide a foundation on which to build semantics for more complex programming constructs and program logics, extending the reasoning principles that apply within the host effectful type theory itself. Concretely, our main contribution is a semantics for concurrent separation logic (CSL) within the F ⋆ proof assistant in a manner that enables dependently typed, effectful F ⋆ programs to make use of concurrency and to be specified and verified using a full-featured, extensible CSL. In contrast to prior approaches, we directly derive the partial-correctness Hoare rules for CSL from the denotation of computations in the effectful semantics of non-deterministically interleaved atomic actions. Demonstrating the flexibility of our semantics, we build generic, verified libraries that support various concurrency constructs, ranging from dynamically allocated, storable spin locks, to protocol-indexed channels. We conclude that our effectful semantics provides a simple yet expressive basis on which to layer domain-specific languages and logics for verified, concurrent programming.

Save Icon
Up Arrow
Open/Close
Notes

Save Important notes in documents

Highlight text to save as a note, or write notes directly

You can also access these Documents in Paperpal, our AI writing tool

Powered by our AI Writing Assistant