This paper is dedicated to analysis of function dependence relationship and building of C++ exception safety patterns. Analysis of function dependable relationship is the basis of exception safety building. According to the representation of function calling in program, this paper presents a method of transferring function calling relationship graph to a sequence of function calling, and proves its validity by test results. Based on the sequence of function calling, the paper analyzes exception representation in C++ program and gives the classification of exception holes, in terms of which exception safety rules are constructed, and presents an approach of interprocedural bottom-up communicating of info and intraprocedural syntax-directed translation, which accomplished statically detecting of C++ exception safety. In the end, the paper gives a test for exception safety modeling, and proves its effectiveness of checking exception safety problems. However, there is still further work to make the checking perfect. |