OpenMP is a popular parallelization framework that lets users transform sequential code into parallel code with a few simple annotations. Unfortunately, it is also easy to inadvertently introduce errors by adding OpenMP pragmas into otherwise correct programs, including both logic errors and race conditions. We present a formal semantics for C code with OpenMP directives, building on the C semantics of the CompCert verified compiler and its extension to concurrency. Our semantics captures subtle interactions between OpenMP directives and variable state that have been obscured by previous OpenMP semantics, and provides a basis for detecting undesired behaviors introduced by incorrect annotations: in particular, any successful execution is guaranteed to be free of data races.


翻译:OpenMP是一种流行的并行化框架,它允许用户通过简单的注解将顺序代码转换为并行代码。然而,在原本正确的程序中添加OpenMP编译指示容易意外引入错误,包括逻辑错误和数据竞争。我们基于CompCert验证编译器的C语言语义及其并发扩展,提出了一种带有OpenMP指令的C语言代码的形式语义。该语义捕捉了OpenMP指令与变量状态之间微妙的交互作用——这些交互在以往的OpenMP语义中被模糊处理——并为检测因错误注解而引入的非期望行为提供了基础:特别地,任何成功的执行均可保证无数据竞争。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
【2023新书】并行算法,Parallel Algorithms ,400页pdf
专知会员服务
72+阅读 · 2023年8月6日
【2022新书】流畅C语言:原理,实践与模式,427页pdf
专知会员服务
76+阅读 · 2022年10月28日
专知会员服务
55+阅读 · 2021年7月21日
【经典书】《学习OpenCV 3》,1018页pdf
专知会员服务
133+阅读 · 2021年2月28日
【Manning新书】C++并行实战,592页pdf,C++ Concurrency in Action
【精通OpenCV 4】Mastering OpenCV 4 - Third Edition 随书代码
专知会员服务
40+阅读 · 2019年11月13日
OpenNRE 2.0:可一键运行的开源关系抽取工具包
PaperWeekly
22+阅读 · 2019年10月30日
OpenCV4系统化学习路线图与教程
计算机视觉战队
18+阅读 · 2019年3月29日
深度文本匹配开源工具(MatchZoo)
机器学习研究会
10+阅读 · 2017年12月5日
荐书丨OpenCV算法精解:基于Python与C++
程序人生
18+阅读 · 2017年11月18日
资源 | 清华大学开源OpenKE:知识表示学习平台
机器之心
10+阅读 · 2017年11月4日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
6+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关资讯
OpenNRE 2.0:可一键运行的开源关系抽取工具包
PaperWeekly
22+阅读 · 2019年10月30日
OpenCV4系统化学习路线图与教程
计算机视觉战队
18+阅读 · 2019年3月29日
深度文本匹配开源工具(MatchZoo)
机器学习研究会
10+阅读 · 2017年12月5日
荐书丨OpenCV算法精解:基于Python与C++
程序人生
18+阅读 · 2017年11月18日
资源 | 清华大学开源OpenKE:知识表示学习平台
机器之心
10+阅读 · 2017年11月4日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员