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

J4 ›› 2011, Vol. 33 ›› Issue (3): 94-102.doi: 10.3969/j.issn.1007130X.2011.

• 论文 • Previous Articles     Next Articles

A Static Analyzer for Numerical Programs in C and Fortran

HOU Suning,CHEN Liqian,WANG Zhaofei,WANG Ji   

  1. (National Laboratory for Parallel and Distributed Processing,Changsha 410073,China)
  • Received:2009-10-17 Revised:2009-12-15 Online:2011-03-25 Published:2011-03-25

Abstract:

The validation of program correctness is a challenge problem in computer science. The theory of abstract interpretation provides a general framework for static analysis which can deduce programs’ dynamic property automatically. A value range analysis based on abstract interpretation can give the invariant relationship of variables at every program point, which is very important to compilation optimization and error examination. We propose an interprocedural framework that analyses the value range information of numerical programs, which can process C and Fortran programs. The C or Fortran source program is first preprocessed to an uniform representation, and then we draw the semantic equation which is equivalent to the source semantics. Finally, the iterative computation is done on this syntax equation to get the program invariant. Besides, we model some complex syntax structures such as array. The experiment indicates that our framework is very extensive and precise, and can process most problems brought by the usage of array.

Key words: static analysis;abstract interpretation;value range analysis;numeric abstract domain;array abstraction