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

A Practical Method for Automatically Model Checking the ANSIC Programs

Expand
  • (1.School of Computer and Communications,Hunan University,Changsha 410082;2.School of Software,Hunan University,Changsha 410082,China)

Received date: 2009-03-12

  Revised date: 2009-07-05

  Online published: 2010-03-28

Abstract

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 checking 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 significantly. 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.

Cite this article

WANG Dawei,ZHANG Dafang,MIAO Li . A Practical Method for Automatically Model Checking the ANSIC Programs[J]. Computer Engineering & Science, 2010 , 32(4) : 79 -82 . DOI: 10.3969/j.issn.1007130X.2010.

Outlines

/