摘要

Variable range analysis is essential for compiler optimization, static analysis and software testing. This paper extends the classical interval abstraction, and defines the new numeric interval-set algebra, Boolean interval algebra and reference interval algebra. Then it presents a unified method of variable range analysis based on abstract interpretation (RABAI). This method uses widening operator to compute variable range in loop, undefined value to describe procedure parameters, and applies function summary as a stand-in for the function. RABAI compresses variable value ranges, and can detect infeasible paths in program. Finally RABAI is applied in Java code analysis tool DTS, and DTS can reduce the false positive rate of bug checking result.

全文