期刊文献+

一种自动化模型检测ANSI-C程序的实用方法 被引量:4

A Practical Method for Automatically Model Checking the ANSI-C Programs
下载PDF
导出
摘要 模型检测是一种验证有限状态系统的时序逻辑属性的形式化方法。为了利用模型检测技术,通常的办法是手工构建一个抽象模型,然而这个方法存在一些不足,如成本过高、易引入建模错误等。本文提出了一种自动化模型检测ANSI-C程序的方法,并开发了模型提取工具C2Spin,它能够分析ANSI-C源代码,并生成对应的PROMELA验证模型,从而显著降低了建模的开销。利用C2Spin,模型检测工具SPIN可以自动地检测使用C语言编写的应用程序中的多种错误,如死锁等。在初步实验中,依靠C2Spin生成的模型,我们发现了SPIN4.3.0的一个语义错误,以及Holzmann对两个经典互斥算法的实现程序中的活锁错误。这些结果表明,C2Spin能够帮助人们更加快速有效地测试C程序。 Model checking is a formal method for verifying the temporal logic properties of finite state systems. To use the technique, an abstract model is usually constructed by hand, but this approach has some weaknesses, for instance, the cost of modeling is considerably high and the artificial models are error-prone. In this paper, we present a practical method for model cheeking the ANSI-C programs automatically. We built C2Spin, a model extractor which analyzes the C source code and extracts the PROMELA verification model from the source code, and thereby reduce the expense of modeling sig- nificantly. Then SPIN can detect various errors in the applications implemented in C mechanically using C2Spin, such as deadlock. In preliminary experiments, depending upon the models generated by C2Spin, we find a semantic bug in SPIN4. 3. 0 and similar livelocks in the implementation of two classic mutual exclusion algorithms written by Holzmann. The results show that C2Spin helps people test C programs more effectively and quickly.
出处 《计算机工程与科学》 CSCD 北大核心 2010年第4期79-82,共4页 Computer Engineering & Science
基金 国家自然科学基金资助项目(60673155) 国家“可信软件”重大研究计划资助项目(90718008)
关键词 形式化方法 模型检测 模型提取 ANSI-C PROMELA formal method model checking model extraction ANSI-C PROMELA
  • 相关文献

参考文献10

  • 1Chan W, Anderson R J, Beame P, et al. Model Checking Large Software Specifications[J]. IEEE Trans on Software Enginering, 1998,24(7) : 498-519.
  • 2Holzmann G J, Patti J. Validating SDL Specifications: An Experiment[C]//Proc of the 9th Int'l Workshop on Protocol Specification, Testing, and Verification, 1989: 317-326.
  • 3Corbett J C,Dwyer M B, Hatcliff J,et al. Bandera:Extracting Finite-State Models from Java Source Code[C]//Proc of the 22nd Int'l Conf on Software Engineering,2000t439-448.
  • 4Havelund K, Pressburger T. Model Checking Java Programs Using Java PathFinder[J]. International Journal on Software Tools for Technology Transfer, 2000, 2(4): 366-381.
  • 5Brat G, Havelund K, Park S, Visser W. Java PathFinder-Second Generation of A Java Model Checker[C]//Proc of the Workshop on Advances in Verification, 2000.
  • 6Demartini C, Iosif R, Sisto R. Modeling and Validation of Java Multithreading Applications Using SPIN[C]///Proc of the 4th SPIN Workshop, 1998: 5-19.
  • 7Holzmann G J ,Smith M H. A Practical Method for Verifying Event-Driven Software [C]//Proc of the 21st Int'l Conf on Software Engineering, 1999 : 597-607.
  • 8Holzmann G J. The SPIN Model Checker: Primer and Reference Manual[M]. Boston: Addison-Wesley, 2003.
  • 9Demartini C, Iosif R, Sisto R. A Concurrency Analysis Tool for Java Programs[D]. Politecnico di Torino, 1997.
  • 10Ben-Ari M. Development Environments for Spin and Erigone[EB/OL]. [2009-01-18]. http://stwww.weizmann. ac. il/ g-cs/benari/jspin/.

同被引文献27

  • 1肖美华,薛锦云.基于SPIN/Promela的并发系统验证[J].计算机科学,2004,31(8):201-203. 被引量:20
  • 2马军,马绍汉.并行程序的流程图分析法[J].软件学报,1995,6(A01):182-186. 被引量:2
  • 3易晓东,杨学军.一种C程序断言的全自动静态验证方法[J].计算机科学,2006,33(9):253-256. 被引量:1
  • 4MURATA T,SHENKER B,SHATS S M.Detection of adastatic deadlocks using petri net invariants[J].IEEE Trans.Softw,1989,15(3):314-326.
  • 5SOL M S,SHENGRU T,TADAO M,et al.An application ofpetri net reduction for ada tasking deadlock analysis[J].IEEE Transactions on Parallel and Distributed Systems,1996(10):1307-1322.
  • 6Shatz S M,CHENG W K.A petri net framework for automa-ted static analysis of ada tasking behavior[J].Systems andSoftware,1988(8):343-359.
  • 7CORBETT J C,DWYER M B,HATCLIFF J,et al.Bandera:extracting finite-state models from java source code[C].Hongkong:Proc of the 22nd Int'l Conf on Software Engineer-ing,2000:439-448.
  • 8HAVELUND K,PRESSBURGER T.Model checking java pro-grams using java pathfinder[J].International Journal on Soft-ware Tools for Technology Transfer,2000,2(4):366-381.
  • 9BRAT G,HAVELUND K,PARK S,et al.Java pathfinder-second generation of a java model checker[C].Shoul:Procof the Workshop on Advances in Verification,2000.
  • 10CLARKE E M,EMERSON E A.Design and synthesis of syn-chronization skeletons using branching-time temporal logic[J].Logic of Programs,1981,2(3):52-71.

引证文献4

二级引证文献10

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部