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)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
《软件定义网络元素与机器代码的形式化验证》
专知会员服务
14+阅读 · 2025年11月18日
大型语言模型的高效提示方法综述
专知会员服务
75+阅读 · 2024年4月2日
【2023新书】并行算法,Parallel Algorithms ,400页pdf
专知会员服务
72+阅读 · 2023年8月6日
【2023新书】Objective-C:终极指南, 341页pdf
专知会员服务
25+阅读 · 2023年7月21日
【2022新书】流畅C语言:原理,实践与模式,427页pdf
专知会员服务
76+阅读 · 2022年10月28日
专知会员服务
55+阅读 · 2021年7月21日
【Manning新书】C++并行实战,592页pdf,C++ Concurrency in Action
OpenNRE 2.0:可一键运行的开源关系抽取工具包
PaperWeekly
22+阅读 · 2019年10月30日
OpenCV4系统化学习路线图与教程
计算机视觉战队
18+阅读 · 2019年3月29日
OpenCV 4 系统化学习路线图与教程
计算机视觉life
21+阅读 · 2019年3月24日
OpenAI官方发布:强化学习中的关键论文
专知
14+阅读 · 2018年12月12日
荐书丨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+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
6+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关VIP内容
《软件定义网络元素与机器代码的形式化验证》
专知会员服务
14+阅读 · 2025年11月18日
大型语言模型的高效提示方法综述
专知会员服务
75+阅读 · 2024年4月2日
【2023新书】并行算法,Parallel Algorithms ,400页pdf
专知会员服务
72+阅读 · 2023年8月6日
【2023新书】Objective-C:终极指南, 341页pdf
专知会员服务
25+阅读 · 2023年7月21日
【2022新书】流畅C语言:原理,实践与模式,427页pdf
专知会员服务
76+阅读 · 2022年10月28日
专知会员服务
55+阅读 · 2021年7月21日
【Manning新书】C++并行实战,592页pdf,C++ Concurrency in Action
相关资讯
OpenNRE 2.0:可一键运行的开源关系抽取工具包
PaperWeekly
22+阅读 · 2019年10月30日
OpenCV4系统化学习路线图与教程
计算机视觉战队
18+阅读 · 2019年3月29日
OpenCV 4 系统化学习路线图与教程
计算机视觉life
21+阅读 · 2019年3月24日
OpenAI官方发布:强化学习中的关键论文
专知
14+阅读 · 2018年12月12日
荐书丨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+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员