首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 20 毫秒
1.
Linguistic mechanisms for exception handling facilitate the production of reliable software and play an important role in fault tolerant computing. This paper describes the functional semantics of a Pascal-like language which supports exception handling and data abstraction. A program with exceptions is considered as having a standard semantics, as well as an exceptional semantics for each exception that may be signaled during its execution. Standard functional semantics methods provide rules to obtain the function representing the standard semantics. In this paper, we provide rules to determine the functions representing the exceptional semantics. We also describe a method for specifying and verifying the correctness of implementation of data types with exceptions.  相似文献   

2.
ContextIn software, there are the error cases that are anticipated at specification and design time, those encountered at development and testing time, and those that were never anticipated before happening in production. Is it possible to learn from the anticipated errors during design to analyze and improve the resilience against the unanticipated ones in production?ObjectiveIn this paper, we aim at analyzing and improving how software handles unanticipated exceptions. The first objective is to set up contracts about exception handling and a way to assess them automatically. The second one is to improve the resilience capabilities of software by transforming the source code.MethodWe devise an algorithm, called short-circuit testing, which injects exceptions during test suite execution so as to simulate unanticipated errors. It is a kind of fault-injection techniques dedicated to exception-handling. This algorithm collects data that is used for verifying two formal contracts that capture two resilience properties w.r.t. exceptions: the source-independence and pure-resilience contracts. Then we propose a code modification technique, called “catch-stretching” which allows error-recovery code (of the form of catch blocks) to be more resilient.ResultsOur evaluation is performed on 9 open-source software applications and consists in analyzing 241 catch blocks executed during test suite execution. Our results show that 101/214 of them (47%) expose resilience properties as defined by our exception contracts and that 84/214 of them (39%) can be transformed to be more resilient.ConclusionOur work shows that it is possible to reason on software resilience by injecting exceptions during test suite execution. The collected information allows us to apply one source code transformation that improves the resilience against unanticipated exceptions. This works best if the test suite exercises the exceptional programming language constructs in many different scenarios.  相似文献   

3.
This paper1 presents ways of implementing dependable distributed applications designed using the Coordinated Atomic Action (CAA) paradigm. CAAs provide a coherent set of concepts adapted to fault tolerant distributed system design that includes structured transactions, distribution, cooperation, competition, and forward and backward error recovery mechanisms triggered by exceptions. DRIP (Dependable Remote Interacting Processes) is an efficient Java implementation framework which provides support for implementing Dependable Multiparty Interactions (DMI). As DMIs have a softer exception handling semantics compared with the CAA semantics, a CAA design can be implemented using the DRIP framework. A new framework called CAA-DRIP allows programmers to exclusively implement the semantics of CAAs using the same terminology and concepts at the design and implementation levels. The new framework not only simplifies the implementation phase, but also reduces the final system size as it requires less number of instances for creating a CAA at runtime. The paper analyses both implementation frameworks in great detail, drawing a systematic comparison of the two. The CAAs behaviour is described in terms of Statecharts to better understand the differences between the two frameworks. Based on the results of the comparison, we use one of the frameworks to implement a case study belonging to the e-health domain.  相似文献   

4.
As aspects extend or replace existing functionality at specific join points in the code, their behavior may raise new exceptions, which can flow through the program execution in unexpected ways. Assuring the reliability of exception handling code in aspect-oriented (AO) systems is a challenging task. Testing the exception handling code is inherently difficult, since it is tricky to provoke all exceptions during tests, and the large number of different exceptions that can happen in a system may lead to the test-case explosion problem. Moreover, we have observed that some properties of AO programming (e.g., quantification, obliviousness) may conflict with characteristics of exception handling mechanisms, exacerbating existing problems (e.g., uncaught exceptions). The lack of verification approaches for exception handling code in AO systems stimulated the present work. This work presents a verification approach based on a static analysis tool, called SAFE, to check the reliability of exception handling code in AspectJ programs. We evaluated the effectiveness and feasibility of our approach in two complementary ways (i) by investigating if the SAFE tool is precise enough to uncover exception flow information and (ii) by applying the approach to three medium-sized ApectJ systems from different application domains.  相似文献   

5.
6.
本介绍我们研制的一个多机容错系统MPFTS的故障恢复技术。首先对MPFTS的结构和工作过程进行了概要介绍。在此基础上,分析了该系统不同类型故障恢复的可能性、恢复时机的选择、恢复所要达到的目标等问题。中详细讨论了利用异常中断返回技术实现系统故障恢复所涉及的数据结构及具体运行过程,并对上电升级重构这种特殊的故障恢复情况进行了分析。  相似文献   

7.
P. A. Lee 《Software》1983,13(5):389-405
This paper describes a software package which has been constructed to allow programs written in the C language to make use of exception handling facilities. The package is implemented as a set of macros and procedures and requires no modification to the C compiler or preprocessor. The operation of the package and its facilities are described, and practical experience of its use is presented. The code in the package is given in the appendix.  相似文献   

8.
异常处理是现代程序设计语言提供的用来提高软件健壮性的一种机制。由于在C^++的函数界面中并不要求声明该函数所能传播出的异常的类型,所以要想提高系统的健壮性,必须清楚在程序的执行过程中可能引发的异常、异常的传播路径等。然而在大型系统中,要想确定这些信息是非常困难的。本文针对C^++的异常处理机制,首先提出了一个描述C^++异常结构信息的模型,并把该模型应用于递归函数中。然后,描述了一个基于该模型的分析C^++程序异常结构信息的工具CETool。该工具能提供所有显式引发异常的有关信息,为系统中异常处理结构的改进和程序的结构测试提供有价值的信息。最后给出了该工具的实现方法和应用实例。  相似文献   

9.
Java是面向对象的程序语言,其异常处理机制是Java的一大特色。本文讨论了Java的异常处理机制,并指出异常处理机制中常见错误模式及注意事项,以便更好的利用Java解决实际问题。  相似文献   

10.
软件避错是提高软件可靠性的主要方法之一,它包含程序检验,测试,正确性证明等技术,然而,随  相似文献   

11.
快速开采意外的规则   总被引:4,自引:1,他引:3  
数据开采研究的主要任务就是发现数据集合中隐含的规则,发现的规则分为常规性规则和意外规则。由于意外规则的支持度很小,因而常常被人们忽略,然而意外规则代表了知识的另外一面,非常有用。文章提出一种快速有效发现意外规则的算法,该算法允许规则的结果为合取范式。  相似文献   

12.
C^++语言异常处理机制的研究   总被引:4,自引:0,他引:4  
裘宗燕 《计算机科学》2003,30(11):155-156
Here we make a detailed investigation on the exception handling mechanism of C^ ,have much discussion on many design and implementation problems ,and offer many suggestions on the use of it.  相似文献   

13.
异常处理——一种提高软件健壮性的方法   总被引:5,自引:3,他引:5  
Exception handling is a technique that tests and handles exception events. Unlike the traditional methods that usually deal with exceptions at later design and implementation phases and easily result in many problems, we emphasis that sufficient attention should be paid to software exception handling during the development of the soft-ware requirements definition. By enforcing this policy through all phases of software development, the level of ro-bustness can be improved considerably. In this paper, the concepts of exception handling are firstly introduced, then the methods of exception handling are discussed, all kinds of exception handling methods and tools are also compared.The current problems and future directions are analyzed at the end of the paper.  相似文献   

14.
A mechanism is proposed for binding exception handlers to exceptions. Hierarchical exception classes can be defined and changed during program execution. In addition, the action taken when an exception of a particular class is raised depends upon the type of the current exception handler for that class. The mechanism can be implemented in programming languages that allow runtime determination of an identifier's binding; most dynamically scoped programming languages meet this criterion.  相似文献   

15.
二进制代码的逆向工程是一个底层的技术,被应用于计算机安全、系统验证、加密解密等相关领域。在逆向工程中,C++的反编译技术是一个难点,尤其是其类型信息的恢复。该文提出了一种利用异常处理机制的类型恢复方法,该方法可以用来分析出每个函数的所有局部类变量,还能分析出这个类的构造函数和析构函数的地址。该方法在特定的环境下可以准确高效地解决C++反编译中的一个难点。  相似文献   

16.
异常的检测和处理是工作流系统执行过程中必须解决的关键性问题之一.给出了异常的分类,并给出了异常自身及其处理方法的形式化描述;实现了利用消息传递机制作为异常的检测方法,并结合异常适应库来提供异常处理的执行策略和处理措施;通过为相应的措施设计特定的操作原语,从而为其转变为实际的编码提供了可能.  相似文献   

17.
异常处理是一种有效提高软件健壮性的方法,处理不当将导致严重的软件失效。提出一种通过分析Java程序异常信息、由开发平台给出异常处理代码提示的方法,以提高开发效率,并提出一种包含异常结构的Java程序异常控制流图构造方法,用于程序分析和优化。基于Eclipse开发环境,设计了一个异常信息分析插件,用于分析Java程序异常信息,给出了代码提示,生成了异常控制流图,以帮助开发人员更快更好地书写异常处理代码。  相似文献   

18.
针对如何构建具有容错能力的面向服务软件体系结构的科学问题,提出了一种新型的支持异常处理的面向服务体系结构描述语言SOADL-EH。该语言不仅具备表示面向服务软件体系结构的建模能力,还提供了异常处理服务、异常连接件及异常配置等语言成分,清晰地将面向服务软件体系结构层的异常处理逻辑从正常业务逻辑中分离出来,弥补了已有的面向服务体系结构描述语言在建模异常处理能力方面的不足。  相似文献   

19.
实时异常处理技术的探讨   总被引:2,自引:0,他引:2  
在分析现有异常处理技术的基础上,比较了在程序语言及操作系统中实现异常处理的优缺点,然后讨论了实时系统中异常处理的本质需求、必要需求及性能目标。为设计出适合于实时系统的异常处理机制,从异常的表示、关键度的管理等几个方面进行了讨论,为实时异常处理的设计提供了指导原则。最后对实时异常设计进行了总结,同时展望了该领域内的相关工作及发展方向进行。  相似文献   

20.
Since the signature of an Ada subprogram does not specify the set of exceptions that the subprogram can propagate, computing the set of exceptions that a subprogram may encounter is not a trivial task. This is a source of error in large Ada systems: for example, a subprogram may not be prepared to handle an exception propagated from another subprogram several layers lower in the call-tree. In a large system, the number of paths in exceptional processing is so great that it is unlikely that testing will uncover all errors in inter-procedural exception handling. Nor are compilers or code inspections likely to locate all such errors. Exception handling is an area where static analysis has a high potential payoff for systems with high reliability requirements. We discuss fundamental notions in computing exception propagation and describe an analysis tool that has proved to be effective in detecting inconsistencies in the exception-handling code of Ada applications.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号