Towards formally specifying and verifying transactional memory

被引:37
|
作者
Doherty, Simon [1 ]
Groves, Lindsay [1 ]
Luchangco, Victor [2 ]
Moir, Mark [2 ]
机构
[1] Victoria Univ Wellington, Sch Engn & Comp Sci, Wellington, New Zealand
[2] Oracle Labs, Burlington, MA USA
关键词
Transactional memory; Formal specification; Verification; I/O automation; Simulation proof; Refinement; MODEL; VERIFICATION;
D O I
10.1007/s00165-012-0225-8
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Over the last decade, great progress has been made in developing practical transactional memory (TM) implementations, but relatively little attention has been paid to precisely specifying what it means for them to be correct, or formally proving that they are. In this paper, we present TMS1 (Transactional Memory Specification 1), a precise specification of correct behaviour of a TM runtime library. TMS1 targets TM runtimes used to implement transactional features in an unmanaged programming language such as C or C++. In such contexts, even transactions that ultimately abort must observe consistent states of memory; otherwise, unrecoverable errors such as divide-by-zero may occur before a transaction aborts, even in a correct program in which the error would not be possible if transactions were executed atomically. We specify TMS1 precisely using an I/O automaton (IOA). This approach enables us to also model TM implementations using IOAs and to construct fully formal and machine-checked correctness proofs for them using well established proof techniques and tools. We outline key requirements for a TM system. To avoid precluding any implementation that satisfies these requirements, we specify TMS1 to be as general as we can, consistent with these requirements. The cost of such generality is that the condition does not map closely to intuition about common TM implementation techniques, and thus it is difficult to prove that such implementations satisfy the condition. To address this concern, we present TMS2, a more restrictive condition that more closely reflects intuition about common TM implementation techniques. We present a simulation proof that TMS2 implements TMS1, thus showing that to prove that an implementation satisfies TMS1, it suffices to prove that it satisfies TMS2. We have formalised and verified this proof using the PVS specification and verification system.
引用
收藏
页码:769 / 799
页数:31
相关论文
共 50 条
  • [21] Formally verifying decompositions of stochastic specifications
    Anton Hampus
    Mattias Nyberg
    International Journal on Software Tools for Technology Transfer, 2024, 26 : 207 - 228
  • [22] Formally verifying decompositions of stochastic specifications
    Hampus, Anton
    Nyberg, Mattias
    INTERNATIONAL JOURNAL ON SOFTWARE TOOLS FOR TECHNOLOGY TRANSFER, 2024, 26 (02) : 207 - 228
  • [23] Formally Verifying Decompositions of Stochastic Specifications
    Hampus, Anton
    Nyberg, Mattias
    FORMAL METHODS FOR INDUSTRIAL CRITICAL SYSTEMS (FMICS 2022), 2022, 13487 : 193 - 210
  • [24] Towards Transactional Memory Semantics for C plus
    Shpeisman, Tatiana
    Adl-Tabatabai, Ali-Reza
    Geva, Robert
    Ni, Yang
    Welc, Adam
    SPAA'09: PROCEEDINGS OF THE TWENTY-FIRST ANNUAL SYMPOSIUM ON PARALLELISM IN ALGORITHMS AND ARCHITECTURES, 2009, : 49 - 58
  • [25] VeBPRu: A Toolchain for Formally Verifying Business Processes and Business Rules
    Tuan, Nguyen Thanh
    Nhan, Le Thanh
    Ha, Hoang Thi Thanh
    Thao, Ha Thi
    PROCEEDINGS OF 2023 8TH INTERNATIONAL CONFERENCE ON INTELLIGENT INFORMATION TECHNOLOGY, ICIIT 2023, 2023, : 15 - 19
  • [26] FreeSpec: Specifying, Verifying, and Executing Impure Computations in Coq
    Letan, Thomas
    Regis-Gianas, Yann
    CPP '20: PROCEEDINGS OF THE 9TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON CERTIFIED PROGRAMS AND PROOFS, 2020, : 32 - 46
  • [27] SPECIFYING AND VERIFYING REQUIREMENTS OF REAL-TIME SYSTEMS
    RAVN, AP
    RISCHEL, H
    HANSEN, KM
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1993, 19 (01) : 41 - 55
  • [28] The use of conditional grammars for specifying and verifying communication protocols
    Matousek, P
    MODELLING AND SIMULATION 2001, 2001, : 59 - 62
  • [29] An approach to specifying and verifying safety-critical systems with practical formal method SOFL
    Liu, SY
    Asuka, M
    Komaya, K
    Nakamura, Y
    FOURTH IEEE INTERNATIONAL CONFERENCE ON ENGINEERING OF COMPLEX COMPUTER SYSTEMS - PROCEEDINGS, 1998, : 100 - 114
  • [30] On the Correctness of Transactional Memory
    Guerraoui, Rachid
    Kapalka, Michal
    PPOPP'08: PROCEEDINGS OF THE 2008 ACM SIGPLAN SYMPOSIUM ON PRINCIPLES AND PRACTICE OF PARALLEL PROGRAMMING, 2008, : 175 - 184