• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊
论文

基于Java内存模型的并发程序模型检测

  • 周志远 ,
  • 张大方 ,
  • 缪力
展开
  • (湖南大学软件学院,湖南 长沙 410082)
周志远(1984),男,湖南长沙人,硕士生,研究方向为程序分析和模型检测;张大方,博士,教授,博士生导师,研究方向为可信系统与网络、软件测试等;缪力,博士,研究方向为软件测试和软件工程等。

收稿日期: 2009-01-02

  修回日期: 2009-03-27

  网络出版日期: 2010-03-10

Model Checking the Concurrent Programs Based on the Java Memory Model

  • ZHOU Zhi-Yuan ,
  • ZHANG Da-Fang ,
  • JIU Li
Expand
  • (School of Software,Hunan University,Changsha 410082)

Received date: 2009-01-02

  Revised date: 2009-03-27

  Online published: 2010-03-10

摘要

为了提高性能,Java内存模型允许编译器在优化过程中改变代码的执行顺序,同时该技术也会造成共享数据的更新顺序与本来的执行顺序不同。在多线程Java并发程序中,这些代码乱序执行会引起很多难以发现的错误。现有的Java程序模型检测技术并没有考虑这些顺序改变的问题。因此,本文提出了一种建立包含多线程交互及线程内代码乱序执行的完整模型,并利用模型检测工具进行穷举检测的算法。该算法可以发现原有技术无法发现的新问题,更好地检测高可靠性要求的Java并发程序。

本文引用格式

周志远 , 张大方 , 缪力 . 基于Java内存模型的并发程序模型检测[J]. 计算机工程与科学, 2010 , 32(3) : 111 -114 . DOI: 10.3969/j.issn.1007130X.2010.

Abstract

In order to improve the performance, the Java Memory Model allows the compiler to change the execution order. A variety of caches will change the modification order of the shared data too. In multithreaded concurrent Java programs, this “out of order” will cause lots of problems which are hard to detect. The existing Java model checking techniques do not consider these order changes. Therefore, this paper proposes an approach which builds a complete model including thread interactions and “out of order” execution in a single thread. This algorithm can find problems which are omitted by the existing method, as well as check and verify the programs which require high reliability better.
文章导航

/