A contract-based interprocedural safety analysis method
Jian Liu · 2006
A contract-based method for C and C++ interprocedural safety analysis is proposed.With bottom-up analysis,the process of interprocedural analysis is made consistent with that of the intraprocedural analysis.By associating variables and functions with contracts to record pre-and post-conditions,and updating the contracts according to the rules constructed,safety checking can be done automatically during the program analysis.The method can be used to detect safety holes,such as illegal pointer references,memory leaks,and other resource leaks,at a low cost and with high flexibility.