摘要
由于多线程程序执行的复杂性和不确定性,Java程序中的并发错误难以被检测和修复.不变式检测方法作为目前最为有效的检测手段,采用提取正确程序行为的方式,能自动识别程序并发错误.但是,传统的不变式检测方法基于单个字段分析程序行为,不考虑程序中的关联变量间的依赖关系,所以无法检测多个关联变量引发的并发错误.针对这一问题,本文实现了一个对象粒度的不变式检测框架OBJ-D,基于对象操作分析程序行为.OBJ-D通过记录对象的读写依赖,能反映同一对象中多个变量间的依赖关系,为检测多变量并发错误创造了条件.测试表明,在不影响训练敏感度和性能开销的前提下,OBJ-D能同时有效检测单变量和多变量引发的并发错误,并只引入很少的假阳性.
Due to the complexity of concurrent programming and the non-determinism in multithreaded applications, concurrency bugs are easy to create but very hard to locate and fix. Invariant-based concurrency bug detection tools are proposed to address this prob- lem, which diagnose concurrency bugs by learning invariants in applications and detecting the violations to invariants when concurren- cy bugs occur. However, start-of-the-art detectors can't capture multi-variable bugs because they record interleavings upon single vari- able. This paper proposes an object-level invariant-based concurrency bug detector, OBJ-D, for Java applications. By recording the interleavings upon objects, OBJ-D can analyze the data dependencies of correlated variables together. Our results show that OBJ-D can detect both single- and multi-variable concurrency bugs in Java applications, while introducing little false positives.
出处
《小型微型计算机系统》
CSCD
北大核心
2013年第6期1295-1300,共6页
Journal of Chinese Computer Systems
基金
国家核高基重大专项项目(2009ZX01036-001-003)资助
关键词
对象粒度
JAVA
多变量
不变式检测
程序并发错误
object granularity
Java
multi-variable
invariant-based detection
concurrency bugs