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 条
  • [41] A survey on temporal logics for specifying and verifying real-time systems
    Konur, Savas
    FRONTIERS OF COMPUTER SCIENCE, 2013, 7 (03) : 370 - 403
  • [42] The Semantics of Progress in Lock-Based Transactional Memory
    Guerraoui, Rachid
    Kapalka, Michal
    ACM SIGPLAN NOTICES, 2009, 44 (01) : 404 - 415
  • [43] A Correct-by-Construction Model for Verifying Transactional Composite Services Configuration
    Abbassi, Imed
    Mammar, Amel
    Graiet, Mohamed
    IEEE TRANSACTIONS ON SERVICES COMPUTING, 2022, 15 (05) : 2511 - 2525
  • [44] Towards Verifying Model Transformations
    Narayanan, Anantha
    Karsai, Gabor
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2008, 211 : 191 - 200
  • [45] Modeling and specifying formally compound MAPE pattern for self-adaptive IoT systems
    Hachicha, Marwa
    Ben Halima, Riadh
    Kacem, Ahmed Hadj
    INNOVATIONS IN SYSTEMS AND SOFTWARE ENGINEERING, 2022, 18 (04) : 505 - 521
  • [46] Towards a Formally Verified EVM in Production Environment
    Zhang, Xiyue
    Li, Yi
    Sun, Meng
    COORDINATION MODELS AND LANGUAGES, COORDINATION 2020, 2020, 12134 : 341 - 349
  • [47] A Formally Verified Buddy Memory Allocation Model
    Jiang, Ke
    Sanan, David
    Zhao, Yongwang
    Kan, Shuanglong
    Liu, Yang
    2019 24TH INTERNATIONAL CONFERENCE ON ENGINEERING OF COMPLEX COMPUTER SYSTEMS (ICECCS 2019), 2019, : 144 - 153
  • [48] Experience Report: seL4 Formally Verifying a High-Performance Microkernel
    Klein, Gerwin
    Derrin, Philip
    Elphinstone, Kevin
    ACM SIGPLAN NOTICES, 2009, 44 (8-9) : 91 - 95
  • [49] Modeling and specifying formally compound MAPE pattern for self-adaptive IoT systems
    Marwa Hachicha
    Riadh Ben Halima
    Ahmed Hadj Kacem
    Innovations in Systems and Software Engineering, 2022, 18 : 505 - 521
  • [50] A survey on optimizations towards best-effort hardware transactional memory
    Zhenwei Wu
    Kai Lu
    Ruibo Wang
    Wenzhe Zhang
    CCF Transactions on High Performance Computing, 2020, 2 : 401 - 414