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

2.
异常处理机制是Java程序设计中的一个重要方面,正确使用异常处理的策略和方法,能够确保Java程序结构的清晰性、易读性和健壮性。分析了Java异常的体系结构,阐述了异常分类与处理机制,提出了异常处理的一般原则和一种异常处理框架,并结合实际应用对该框架进行了详细描述。  相似文献   

3.
异常处理是现代程序设计语言的一个重要特征,它为检测和恢复软件系统在运行时的错误、构建系统的容错处理提供了强有力的支持。本文分析了FORTRAN 2000的异常处理机制,并提出一种扩充方案,引入用户定义异常和异常处理区的概念,改进了异常的传播机制,从而使FORTRAN编程更好地实现普通代码和异常处理代码的分离,提高了程序的可读性和可维护性。  相似文献   

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

5.
Java异常处理策略研究   总被引:1,自引:0,他引:1  
异常处理机制是程序设计语言的重要标志之一,在程序设计过程中用来处理程序运行中的异常。传统的程序设计语言里异常处理较为繁杂。Java是一种面向对象的程序设计语言,且引入了异常处理机制。合理完备的异常处理可以增强程序运行的可靠性、提高软件的健壮性,可以较为快速地确定错误的位置。文章分析了Java异常处理的逻辑,阐述了异常类、异常处理机制以及异常处理方法,提出了异常处理的一些策略。综合运用这些策略可以使编程人员编写出更加简洁、高效的程序代码。  相似文献   

6.
异常处理是高级语言中一种强大的,也是容易被误用的机制。各种高级语言中的异常处理机制有着不同的规范,无论是面向过程的语言还是后来面向对象的语言都可以通过该机制发现大部分的运行错误。基于Web的智能大厦办公自动化系统是基于J2EE实现的,其健壮性和安全性是至关重要的因素,利用java实现必须考虑大量的异常处理操作。如何设计合理的异常处理是本文讨论的重点。  相似文献   

7.
Although many programming languages contain exception handling mechanisms, their formal treatment — necessary for rigorous development — can be complex. Nevertheless, this paper presents a simple incorporation ofexit commands and exception blocks into a rigorous program development method. The refinement calculus, chosen for the exercise, is a method of developing imperative programs. It is based on weakest preconditions, although they are not used explicitly during program construction; they merely justify the general method. In the style of the refinement calculus, program development laws are given that introduce and allow the manipulation ofexits. The soundness of the new laws is shown using weakest preconditions (as for the existing refinement calculus laws). The extension of weakest preconditions needed to handleexits is a variation on earlier work of Cristian; the variation is necessary to handle nondeterminism.  相似文献   

8.
异常处理机制是程序设计语言的重要特征之一,它为开发可靠性系统提供了强有力的支持。但异常处理代码必须仔细编写,否则可能破坏程序的一致性。提出了基于扩展的程序依赖图,通过静态分析来发现程序中异常非原子性代码的方法,同时给出了自动的部分屏蔽异常非原子性代码的方法。  相似文献   

9.
Java异常处理     
异常处理是Java程序设计中一个非常重要的机制,也是程序设计的一大难点,就异常和异常处理方式等方面进行介绍,并通过一个实例来验证异常。  相似文献   

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

11.
异常处理是一种用来检测异常并时其进行处理的技术。异常处理机制已作为现代程序设计语言的一个重要的特性被广泛地采纳,以增强系统运行的可靠性,提高软件的健壮性。对异常处理在程序语言的实现进行了一般性研究,分析比较几种异常处理机制及其实现方法,提出了一种新的异常处理机制的实现方法。  相似文献   

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

13.
数据一致性是主备用系统必须解决的问题。目前主备系统的一致性都采用手工编程来实现,导致代码结构繁杂,且效率不高。利用VxWorks的异常处理机制,结合RISCCPU的特性,设计实现了一个数据一致性功能组件。这个组件可使数据的一致性处理自动化。  相似文献   

14.
This paper examines various issues that pertain to the access-control mechanism of the program component manager. We examine such questions as what constitutes an access-right, what kind of information about managed resources does one need, how revocation keys, right-sets, and exception conditions are handled, etc. It is argued that most of these issues can be handled by the compiler with no explicit programming required. This simplifies the task of programming and enhances reliability. A possible method for handling these issues which was adopted in our implementation is also described.  相似文献   

15.
Exception handling is widely regarded as a necessity in programming languages today and almost every programming language currently used for professional software development supports some form of it. However, spreadsheet systems, which may be the most widely used type of “programming language” today in terms of number of users using it to create “programs” (spreadsheets), have traditionally had only extremely limited support for exception handling. Spreadsheet system users range from end users to professional programmers and this wide range suggests that an approach to exception handling for spreadsheet systems needs to be compatible with the equational reasoning model of spreadsheet formulas, yet feature expressive power comparable to that found in other programming languages. We present an approach to exception handling for spreadsheet system users that is aimed at this goal. Some of the features of the approach are new; others are not new, but their effects on the programming language properties of spreadsheet systems have not been discussed before in the literature. We explore these properties, offer our solutions to problems that arise with these properties, and compare the functionality of the approach with that of exception handling approaches in other languages  相似文献   

16.
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.  相似文献   

17.
Java异常处理机制研究   总被引:2,自引:0,他引:2  
异常处理机制是程序设计语言的主要特征,它为开发稳定的软件系统提供了有力的支持.文章对Java语言的异常处理机制以及异常类的层次进行了详细介绍,提出了Java异常处理策略.  相似文献   

18.
X-Base PL/SQL是一种过程式数据库编程语言,常用于数据库服务器端应用程序的开发。该文讨论了X-Base PL/SQL引擎中异常处理模块的设计思想和实现技术。鉴于Oracle数据库管理系统是数据库产品事实上的标准,还有其在全球的广泛应用,X-Base PL/SQL需要兼容Oracle PL/SQL 8i的异常处理机制。  相似文献   

19.
Scientific workflow systems often operate in highly unreliable, heterogeneous and dynamic environments, and have accordingly incorporated different fault tolerance techniques. We propose an exception‐handling mechanism, based on techniques adopted in programming languages, for modifying at run‐time the structure of a workflow. In contrast to other proposals that achieve the required flexibility by means of the infrastructure, our proposal expresses the exception‐handling mechanism within the workflow language—primarily as two exception‐handling patterns that are exclusively based on the Reference Nets‐within‐Nets formalism (a specific type of Petri nets). When an exception is detected, a workflow in our approach can be re‐written (replaced), based on the particular failure condition that has been detected. This enables workflow users to have better control and understanding of the behaviour of their workflow without having to be aware of the underlying infrastructure. Copyright © 2009 John Wiley & Sons, Ltd.  相似文献   

20.
A Foreign Function Interface (FFI) allows one host programming language to interoperate with another foreign language. It enables efficient software development by permitting developers to assemble components in different languages. One typical FFI is the Java Native Interface (JNI), through which Java programs can invoke native-code components developed in C, C++, or assembly code. Although FFIs bring convenience to software development, interface code developed in FFIs is often error prone because of the lack of safety and security enforcement. This paper introduces a static-analysis framework, TurboJet, which finds exception-related bugs in JNI applications. It finds bugs of inconsistent exception declarations and bugs of mishandling JNI exceptions. TurboJet is carefully engineered to achieve both high efficiency and accuracy. We have applied TurboJet on a set of benchmark programs and identified many errors. We have also implemented a practical Eclipse plug-in based on TurboJet that can be used by JNI programmers to find errors in their code.  相似文献   

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

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