Automatically comparing memory consistency models

Author:

Wickerson John1,Batty Mark2,Sorensen Tyler1,Constantinides George A.1

Affiliation:

1. Imperial College London, UK

2. University of Kent, UK

Abstract

A memory consistency model (MCM) is the part of a programming language or computer architecture specification that defines which values can legally be read from shared memory locations. Because MCMs take into account various optimisations employed by architectures and compilers, they are often complex and counterintuitive, which makes them challenging to design and to understand. We identify four tasks involved in designing and understanding MCMs: generating conformance tests, distinguishing two MCMs, checking compiler optimisations, and checking compiler mappings. We show that all four tasks are instances of a general constraint-satisfaction problem to which the solution is either a program or a pair of programs. Although this problem is intractable for automatic solvers when phrased over programs directly, we show how to solve analogous constraints over program executions , and then construct programs that satisfy the original constraints. Our technique, which is implemented in the Alloy modelling framework, is illustrated on several software- and architecture-level MCMs, both axiomatically and operationally defined. We automatically recreate several known results, often in a simpler form, including: distinctions between variants of the C11 MCM; a failure of the "SC-DRF guarantee" in an early C11 draft; that x86 is "multi-copy atomic" and Power is not; bugs in common C11 compiler optimisations; and bugs in a compiler mapping from OpenCL to AMD-style GPUs. We also use our technique to develop and validate a new MCM for NVIDIA GPUs that supports a natural mapping from OpenCL.

Funder

Lloyd's Register Foundation

Royal Academy of Engineering

Intel Corporation

Engineering and Physical Sciences Research Council

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference80 articles.

1. Supplementary material for this paper is available in the ACM digital library and in the following GitHub repository. Supplementary material for this paper is available in the ACM digital library and in the following GitHub repository.

2. Rodin: an open toolset for modelling and reasoning in Event-B;Abrial Jean-Raymond;Int. J. Softw. Tools Technol. Transfer,2010

3. Shared memory consistency models: a tutorial

4. Weak ordering---a new definition

5. The power of processor consistency

Cited by 55 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Compiler Testing with Relaxed Memory Models;2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO);2024-03-02

2. How Hard Is Weak-Memory Testing?;Proceedings of the ACM on Programming Languages;2024-01-05

3. Simulating Operational Memory Models Using Off-the-Shelf Program Analysis Tools;IEEE Transactions on Software Engineering;2023-12

4. Static Analysis of Memory Models for SMT Encodings;Proceedings of the ACM on Programming Languages;2023-10-16

5. Crucible: Graphical Test Cases for Alloy Models;2023 IEEE 34th International Symposium on Software Reliability Engineering (ISSRE);2023-10-09

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3