期刊文献+

一种静态分析C^(++)异常处理的方法

An Approach to Static Analysis of Exception Handling in C^(++)
在线阅读 下载PDF
导出
摘要 异常处理是现代程序设计语言提供的用来提高软件健壮性的一种机制。由于在 C^(++)的函数界面中并不要求声明该函数所能传播出的异常的类型,所以要想提高系统的健壮性,必须清楚在程序的执行过程中可能引发的异常、异常的传播路径等。然而在大型系统中,要想确定这些信息是非常困难的。本文针对 C^(++)的异常处理机制,首先提出了一个描述 C^(++)异常结构信息的模型,并把该模型应用于递归函数中。然后,描述了一个基于该模型的分析C^(++)程序异常结构信息的工具 CETool。该工具能提供所有显式引发异常的有关信息,为系统中异常处理结构的改进和程序的结构测试提供有价值的信息。最后给出了该工具的实现方法和应用实例。 Exception handling in modem programming languages is a mechanism that can improve software robustness. Since the signature of an C^++ function may not specify the set of exceptions that the function can propagate, it is necessary to figure out the exceptions that may be raised during executing program, the origins of the exceptions and their exception propagation paths. Unfortunately, in large programs, this exceptional information can be difficult, if not impossible, to determinc. Firstly, the paper presents a model that can describe the exception handling information for C^++ exception handling mechanism, and applies the model to recursive functions. Then describes CETool, a static analysis tool we have developed to provide exception-flow information for C^++ systems based on this model. The CETool provides the information related to the explicit exceptions. The information is helpful to support the improvements to the exception handling structure of a system and structure testing of a program. It also presents the implementation of CETool and its application.
出处 《计算机科学》 CSCD 北大核心 2006年第4期288-291,F0004,共5页 Computer Science
基金 国家自然科学基金(60373066) 国家973重大基础研究(2002CB312000) 教育部跨世纪杰出人才基金 教育部博士基金(20020286004) 江苏省计算机信息处理技术重点实验室(苏州大学)基金资助
关键词 异常处理 静态分析 异常传播 结构测试 Exception handling, Static analysis, Exception propagation, Structure testing
  • 相关文献

参考文献23

  • 1Gareia A F, Rubira C M F,Romanovsky A, et al. A comparative study of exception handling mechanisms for building dependable object-oriented software. The Journal of Systems and Software,2001,59:197-222
  • 2Goodenough J B. Exception handling: issues and a proposed notation. Communications of the ACM, 1975,18(12) : 683-696
  • 3Claar J. Rethrowing function-try-blocks, Software Development China Machine press, 2003(in Chinese)
  • 4Stroustrup B. The C ++ Programming Language (Special Edition), Addison Wesley, 2000
  • 5Choi J D, Grove D, Hind M, et al. Efficient and precise modeling of exceptions for the analysis of Java programs. In: Proceedings of the ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (Sept). ACM, 1999. 21-31
  • 6姜淑娟,徐宝文.异常处理——一种提高软件健壮性的方法[J].计算机科学,2003,30(9):169-172. 被引量:13
  • 7Pessaux F,Leroy X. Type-based analysis of uncaught exceptions.In:Proceedings of the 26th Symposium on the Principles of Programming Languages (Jan). ACM, 1999, 276-290
  • 8Guzm'An J C, Su'Arez A. A type system for exceptions. In: Proceedings of the 1994 ACM SIGPLAN Workshop on ML and Its Applications (June). ACM, 1994. 127-135
  • 9Fahndrich M,Foster J, Cu J, et al. Tracking down exceptions in standard ML programs:[Tech Rep]. CSD-98-996. Berkeley: University of California,1998
  • 10Lang J, Stewart D B. A study of the applicability of existing exception-handling techniques to component-based real-time software technology. ACMTrans Program Lang Syst, 1998, 20 (2):274-301

二级参考文献35

  • 1徐宝文.一种逆向程序流依赖性分析方法及其应用[J].计算机学报,1993,16(5):385-392. 被引量:9
  • 2徐宝文 陈振强 等.基于信赖性分析的面向对象Ada95程序切片[J].软件学报,2001,12:208-213.
  • 3Maxion R A. Olszewski R T. Improving Software Robustness with Dependability Cases. In: 28^th Intl Symposium on Fault-Tolerant Computing. 1998. 346-355.
  • 4de Lemos R,Romanovsky A. Exception Handling in a Cooperative Object-Oriented Approach. In: Proc. of the 2^th IEEE Intl Symposium on Object-Oriented Real-Time Distributed Computing, France, May 1999.
  • 5Garcia A F, Beder D, Rubira C M F. An Exception Handling Software Architecture for Developing Fault-Tolerant Software. In:Proc of the 5^th IEEE HASE, LISA, 2000. 311-320.
  • 6Garcia A F, Rubira C M F. An Architectural-Based Reflective Approach to Incorporating Exception Handling into Dependable Software. In: A Romanovsky, et al. eds. Exception Handling, LNCS 2022, Springer-Verlag, Berlin, Heidelberg, 2001. 189- 206.
  • 7Alleman G B. Exception Handling in CORBA Environments. galhman@niwotridge. com 8 March 2000. Revised.Oct. 2000.
  • 8Sinha S,Harrold M-J. Analysis and Testing of Programs with Exception-Handling Constructs. IEEE Transactions on Software Engineering ,2000,26.
  • 9Choi J-D, Grove D. Hind M, Sarkar V. Efficient and Precise Modeling of Exceptions for the Analysis of Java Programs. In: Proe of'99 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, 1999.21-31.
  • 10Vo K-P, Wang Y-M,Chung P E,Huang Y. Xept: A Software Instrumentation Method for Exception Handling, Eighth International Symposium on Software Reliability Engineering, 1997. 60-69.

共引文献23

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部