The increase in size and complexity of current applications results in rising testing costs. When it comes to finding run-time errors, classical methods are inadequate. Today’s applications require a new generation testing solution that is capable of improving software quality while reducing the usual costs. To ensure that a program can never perform a run-time error, this article describes a purely automatic static analysis method to find sound approximation of run-time error. Run-time error discussed here is invalid arithmetic operation. This static detection method is developed which depends upon the existence of a “fault/failure model.” The method is defined formally based on program data-flow analysis algorithm, abstract interpretation theory and fault/failure model. This method is sufficiently general that besides invalid arithmetic operations, it can be extended immediately when the fault/failure models of other kinds of run-time errors have been defined. The method described in this article will always discover all bugs which have been modeled, however, may find false alarms.
展开▼