Adapting C++ Exception Handling to an Extended COM Exception Model
|
|
|
- Avis Richards
- 9 years ago
- Views:
Transcription
1 Adapting C++ Exception Handling to an Extended COM Exception Model Bjørn Egil Hansen DNV AS, DT 990 Risk Management Software Palace House, 3 Cathedral Street, London SE1 9DE, UK [email protected] Henrik Fredholm Computas AS Vollsveien 9, P.O.Box 482, 1327 Lysaker, Norway [email protected] This paper describes how correctness and robustness of component-based systems can be improved by categorising exceptions by component state and cause, and handling them accordingly. Further, it is shown how this model is supported in C++ in a COM-based environment, also simplifying the code for exception detection, signalling, and handling. 1. INTRODUCTION The reliability of a software system is to a high degree determined by the reliability of the software components comprising the system [KriMat97]. For a software component to be reliable it must be able recover various exceptions or failures that may arise at run-time, i.e. it must be fault tolerant. Code for exception detection, handling, and signalling often amounts to a substantial portion of the code. This is especially the case in a multi-language environment, mixing different exception models, and requiring transformation between different exception representations. To allow flexible system configuration and system evolution, e.g. making changes to a component, replacing a component with another, or adding new components, each of the components should have minimum dependency on the other components. Loose coupling between components is also important with respect to exception handling and the mechanisms used. As argued in [Cri95], a termination mechanism mixes well with the information hiding principles underlying data abstraction, and consequently also component based systems. The focus should be on the local transition and consistent local state of the component and on exceptions that may arise during a state transition. It is the responsibility of the developer of the component to detect, handle, and signal exceptions based on the state of the component, the arguments of the call, and the results from lowerlevel components. In software development project there are always conflicts between different requirements, and the development team has to make trade-offs between time-to-market, functional requirements, and non-functional requirements, like reliability. The resources used on reliability are often scarce, hence it is important to concentrate the effort on those exception situations that contributes to the overall reliability of the system. Whenever reliability is sacrificed for other requirements, the failure situations should be clearly distinguishable from correct behaviour and easily traceable in the code. If the system reliability turns out to be unacceptable it should be possible to increase the overall reliability by improving individual components of the system, i.e. taking control over more of the failure situations. This paper is based on work done in the BRIX team in DNV IT Solutions. The main purpose of this group is to provide the various application development teams with common solutions to software technical needs. Most BRIX solutions are based on Microsoft's COM technology and C++ as implementation language. In section 2 the differences between C++ exception handling and COM exception handling are briefly outlined. Section 3 describes the BRIX language independent exception model, which is based on the COM exception model. In section four we present how the BRIX exception model is supported at C++ level. Finally, in section 4 we draw some conclusions. 2. COM EXCEPTION HANDLING IN C++ COM supports signalling of exceptions [Box98], but the mechanisms used are different from the throw and catch in C++ [ElStro90]. To signal an exception in COM, three different mechanisms are used in combination: By convention all interface methods on a COM objects should return a status (an HRESULT), indicating success or exception/failure of the method invocation. To pass extra information to the client, COM provides to API functions: SetErrorInfo: Used by the COM object (signaller) to pass an exception object containing the extra information to the client. GetErrorInfo: Used by the client to obtain the exception object.
2 In addition, the COM object must implement the ISupportErrorInfo interface to indicate which interfaces support exceptions. This interface should be used by the client to determine whether or not the result of the GetErrorInfo is reliable. This obviously increases the burden on a C++ programmer. When implementing a COM object in C++, the programmer must be careful to catch all C++ exceptions and convert them into HRESULTs, possibly augmented with extra information in an exception object. To detect and handle exceptions from a COM object in a C++ client, the result of each COM-call must be checked specifically by looking at the returned HRESULT. In a naïve implementation of a C++ client this will typically result in an unreadable mix of HRESULT checking of the COM calls and catching of C++ exceptions of internal C++ calls. There is also a mismatch in the exception models of COM and C++. While we in C++ may specialise exceptions in hierarchies, COM overloads the HRESULT. Thus, the meaning of an HRESULT code very likely will be different for different methods, and the code should not propagate unmodified up through the call stack. When programming in Visual Basic or Java (on Microsoft's Java VM), the conversion between native exceptions and the HRESULT and the COM exception information object is done automatically by the respective run-time systems. Thus, in these environments the COM exception representation and signalling mechanism are integrated with native exception mechanisms, giving a more transparent programming model. In section 4 we will see how the BRIX Exception System contributes to integration with the C++ exception mechanisms. 3. BRIX EXCEPTION MODEL A component-based system is comprised of components accessing each other through interfaces. An interface may be defined specifically for a concrete implementation, complete both with respect to standard and exceptional behaviour. However, in COM it is common to have general interfaces allowing a variety of implementations. For a specific implementation there may be resource constraints not anticipated on the specification level, resulting in exceptions outside the specified exceptions. One of the main goals of the BRIX Exception System is to provide the component developer with mechanisms of detection, handling, and signalling of specified exceptions, as well as mechanisms for detection and signalling of unspecified exceptions. To facilitate this, when focusing on the state transition within one component, we categorise exceptions/failures of lower-level components according to two orthogonal criteria: State of the lower-level component after the exception/failure has occurred: Controlled exception: The component is in the same consistent state as before the method call. Uncontrolled exception: The component is in an undefined and possibly inconsistent state. This corresponds to the notion of failure exceptions in [Cri95]. Cause of the exception: Operational exception: The cause of the exception is outside the control of the component, typically when allocating resources (e.g. memory, files, or network connections) or validating input. Implementation exception: The cause of the error is due to faults in program code. In the table below we assume having a higher-level component A calling a method on component B, being our focus, and B calls a method on lower-level component C. We discuss the four categories of possible exceptional situations, and propose a recommend action and an alternative action as a guide to where to concentrate the exception handling effort. Controlled Operational Controlled Operational Exception: The cause is an operational exception the lower level component C. C has recovered to the same state as before the call. Recommended action: If it is a specified exception, mask the exception if possible. Otherwise, recover state and signal a Controlled Operational Exception to higher level component A. Implementation Controlled Implementation Exception: The lowerlevel component C has rejected the call because of violation of precondition, i.e. the exception is caused either by improper use by component B, too strict implementation of the precondition validation, or incomplete interface specification. C has recovered to the same state as before the call. signals an Uncontrolled Implementation Exception to the higher-level component A. Fix bug at appropriate level.
3 Operational Alternative action: Use default mechanism that signals an Uncontrolled Operational Exception to the higher-level component A. Implementation Alternative action: If the cause is an incomplete specification or a too strict precondition implementation in C, and neither of these can be changed, component B should be rewritten to avoid the problem. Uncontrolled Uncontrolled Operational Failure: The failure is due to an operational exception in the lower-level component C which C was not prepared to handle, and C has not been able to recover to a consistent state. Uncontrolled Implementation Failure: The failure is due to an unanticipated exception occurrence in the lower-level component C, resulting in a possibly inconsistent state. Hence, invalidating the invariant or post-condition. signals an Uncontrolled Operational Exception to the higher-level component A. Make C more robust by taking control of the exception. Alternative action: If component C cannot be changed, component B or high-level component A should be rewritten to avoid the problem, or more run-time resources should be made available to avoid the problem Table 1: Exception categories in BRIX signals an Uncontrolled Implementation Exception to the higher-level component A. Fix fault in C. Alternative action: If component C cannot be changed, component B or high-level component A should be rewritten to avoid the problem. In the table we see that controlled operational exceptions are the only cases where explicit exception handling is recommended to increase the overall robustness of the system. Using the default BRIX exception mechanisms in this case will lower the robustness of the system, as the exception is transformed to an uncontrolled exception when propagated and most likely will cause the system to abort. For the other cases it is generally difficult and time-consuming to handle them in way that increases the robustness of the system. Instead it is recommended to use the default mechanisms to signal an uncontrolled exception to the higher-level component. The cause of the failure should be fixed off-line if required to achieve long term robustness. Our goal is not to write totally correct programs, but to write partially correct programs [Cri95], that is, programs that either produce the specified result (normal or exceptional) or a confined failure (unspecified exceptions) with respect to a complete specification. Partially correct programs are safe, in the sense that there are no unanticipated inputs (incomplete specification) and no unconfined failures (apparently correct results but actually erroneous with respect to specification). Thus, they will either produce the specified results or obvious failures. A component may contain implementation faults. The BRIX Exception System contributes to the fault tolerance of the system by distinguishing between uncontrolled and controlled failures. Uncontrolled failures should result in abortion, while controlled failures may be tolerated, because the system is still in a well-defined state. 4. BRIX SUPPORT FOR C++ EXCEPTION HANDLING IN COM The exception handling code itself may be a significant source of errors. It is difficult to test and should be kept as simple as possible. In the following we will see how the BRIX exception mechanisms supports detection, handling, and signalling of exceptions according to the categorisation of exceptions in the previous section, in a programming environment as described in section 2. The examples below are based on [Cri95]. Firstly, to prevent C++ exceptions from propagating out of the component, two macros are used to enclose the code establishing default try and catch blocks. The macros take care of converting from C++ exceptions to HRESULT. Any exceptions not detected in the program code will be caught and signalled as an uncontrolled implementation exception. Figure 1 shows an implementation for computing factorials. Assuming n is specified to be 0, this implementation may result in either a) HRESULT Calc::Fact(int n, int* pf) { BX_ENTER_COM(Calc,Fact) int k=0,m=1; while (k<n) { k++; m*=k; *pf = m; BX_RETURN_COM Figure 1: Computing factorial
4 an unconfined failure for values of n<0 by returning 1 (erroneous result), or b) a confined failure if n! is larger than the maximum int value returned as an uncontrolled implementation exception. We can increase the correctness of this program by HRESULT Calc::Fact(int n, int* pf) detecting and signalling a) properly. There is no support for { BX_ENTER_COM(Calc,Fact) automatic checking of preconditions like in Eiffel [Mey88]. BX_PRECOND(n>=0) However, this can be coded explicitly, as shown in figure 2. If a precondition fails this results in a controlled implementation Figure 2: No unconfined failures exception (E_BX_PRECONDITION), thus we have eliminated a) and made the program partially correct. Assume the specification states that E_OVERFLOW should be returned if n! is too large. To take control over this situation we must add explicit detection and handling of the overflow. Figure 3 illustrates this, where we have a try-catch block to detect the overflow. In the catch block we use bxhr which is defined by BX_ENTER_COM. This is an instance of BxHResult, which offers a range of functionality for detecting, signalling and handling exceptions. In this example RaiseError throws an exception containing the specified HRESULT value. This exception is caught by BX_RETURN_COM and the E_OVERFLOW is returned to the client. Thus, we have made the code more correct by handling this exception as specified. Also, we have contributed to the overall robustness of the system by eliminating an uncontrolled exception. In the examples above we have seen how exceptions are detected and signalled using different mechanisms, e.g. precondition checking, explicit raising of exception, and by use of default detection and signalling. All is resulting in a corresponding HRESULT being returned to the client. To detect, handle, and signal exceptions from a COM component, various mechanisms can be used resulting in different degrees of robustness. BxHResult redefines some of the assignment operators to provide short hand notation for detection and signalling of exceptions. In figure 4 we have a class to represent a vector of 10 ints and defining a method to compute the factorial of each of the values and store them in the same vector. Using the = operator we say that any exceptions returned from the method on the lower-level component will result in an uncontrolled exception in this component and a corresponding C++ will be thrown. If the Fact method in figure 4 returns an exception, we may have an intermediate state where some values have been changed to their factorials where as others are unchanged, i.e. the component will be left in an uncontrolled and erroneous state. To avoid the uncontrolled exception we must be able to recover the initial state in case of exceptions. Figure 5 shows how this can be done in this simple case by keeping the new values in a temporary array until all the calculations have been done successfully. Thus, if the Fact method signals an exception, our state is still consistent and we should just signal a controlled exception to our caller. This is done by using the &= operator instead of the = operator, which will transform any controlled exceptions to controlled implementation exceptions. However, if the Fact method signals an uncontrolled exception, as in figure 1 and 2, an uncontrolled implementation exception will be signalled from this component. By focusing on the local transition and on keeping a local consistent state, we reduce the number of uncontrolled exception propagating through the system and the likelihood of abortions. Further, assume that the Factorials specification also states that an E_OVERFLOW exception should be signalled in case of overflows. With respect to this specification, the implementation in figure 5 is partial correct and will result in a confined failure in case of overflow. In cases where the state is still consistent and the specified exceptions from the method on lower-level component is the same as for this method, we can use another operator %= to signal the same exception to the try { int k=0,m=1; while (k<n) { k++; m*=k; *pf = m; catch() { bxhr.raiseerror(e_overflow,); Figure 3:Controlled overflow as specified class Vector { int v[10]; HRESULT Factorials(); HRESULT Vector:: Factorials () { BX_ENTER_COM(Vector, Factorials) { bxhr =pcalc->fact(v[i],&v[i]); BX_RETURN_COM Figure 4: Uncontrolled exception int u[10]; { bxhr&=pcalc->fact(v[i],&u[i]); v = u; Figure 5: Controlled exception int u[10]; { bxhr%=pcalc->fact(v[i],&u[i]); v = u; Figure 6: Propagation of exception higher-level component, as illustrated in figure 6. Hence, the implementation will be correct with respect to the overflow exception.
5 The examples in figure 4 to 6 show compact detection and signalling of uncontrolled, controlled, and specified exceptions using the redefined operators =, &=, and %=, respectively, and how we gradually can increase the robustness and correctness of the system by making the local transitions more robust and correct. In other situations it might be required that the exceptions are masked or at least handled more specifically. Figure 7 shows one way this can be done using the redefined ^= operator. Instead of throwing an exception, the results from the call will be kept in bxhr for subsequent handling of the exception. In the case of a time-out, the exception is recovered and the call is retried once. If this fails the exception is propagated using the &= operator. If the first exception was not a time-out exception, the same exception is signalled to the caller. Exceptions can also be handled in the normal C++ way by enclosing a sequence of statements with a try and catch block. Other features of the BRIX exception system which have not been emphasised here include checking of intermediate and final states by use of assertions and post-conditions, possibly resulting in uncontrolled implementation failures. Also there is rich support for logging of exceptional events, which may serve various purposes: simplifies debugging of the system both during development and operation, supports operator/enduser in identifying possible lack of resources (causing operational exceptions). 5. CONCLUSION The BRIX Exception System contributes to correctness and robustness in several ways: By distinguishing controlled and uncontrolled exceptions, we believe to achieve fault-tolerance both with respect to specification and implementation faults. Also we avoid unconfined errors by having an explicit notion of and support for uncontrolled exceptions. Hence, it will be easier to achieve partial correctness [Cri95], assuming that the specification is complete. By taking control over more failure situations at the component level, we may increase the overall robustness of a system by upgrading or replacing individual components. By focusing on the local state and transition, providing a programmed exception handling style using pre/post-conditions and assertions for state validation and mechanisms for tight control of the results from lower-level components. Contrary to [Mey88] all pre/post condition validation has to be done explicitly. However, when handling complex states and transitions, expressing pre/post-condition may be difficult resulting in possible unconfined failures [Cir95], and intermediate checks may be preferable. By virtually forcing the developer to decide on the local implications of exceptions occurring for each line of code. Also the BRIX exceptions mechanisms make it simple to implement those decisions by providing default propagation mechanisms and overloaded operators for exception checking. 6. ACKNOWLEDGEMENT Many thanks to Are F. Tjønn and Johannes Hermanrud who supported both the development and the writing of this paper. Thanks also to Daniel Vatier and Egil P. Andersen for reviewing the paper and to rest of the BRIX team for providing an inspiring working environment. 7. REFERENCES [Box98] Box, Don, Essential COM, Addison Wesley, [Cri95] Cristian, Flaviu, Exception Handling and Tolerance of Software Faults, chapter 4, pages , in Software Fault Tolerance, Lyu, M. (ed.), Wiley, [ElStro90] bxhr ^= psrv->submit(data); if (bxhr==e_timeout) { // Retry once bxhr.errorrecovered(); bxhr &= psrv->submit(data); else if (bxhr!=s_ok) bxhr.raiseerror(); Figure 7: Masking/handling exceptions Ellis, Margaret A and Stroustrup Bjarne, The Annotated C++ Reference Manual, Addison Wesley, [KriMat97] Krishnamurthy, S and Mathur, A.P., "On the Estimation of Reliability of a Software System Using Reliabilities of its Components", Eighth International Symposium on Software Reliability Engineering (ISSRE '97), November 2-5, 1997 Albuquerque, US [Mey88] Meyer, Bertrand, Object-Oriented Software Construction, Prentice Hall, 1988.
On the Relation between Design Contracts and Errors: A Software Development Strategy
On the Relation between Design Contracts and Errors: A Software Development Strategy Eivind J. Nordby, Martin Blom, Anna Brunstrom Computer Science, Karlstad University SE-651 88 Karlstad, Sweden {Eivind.Nordby,
Design by Contract beyond class modelling
Design by Contract beyond class modelling Introduction Design by Contract (DbC) or Programming by Contract is an approach to designing software. It says that designers should define precise and verifiable
Quotes from Object-Oriented Software Construction
Quotes from Object-Oriented Software Construction Bertrand Meyer Prentice-Hall, 1988 Preface, p. xiv We study the object-oriented approach as a set of principles, methods and tools which can be instrumental
vector vec double # in # cl in ude <s ude tdexcept> tdexcept> // std::ou std t_of ::ou _range t_of class class V Vector { ector {
Software Design (C++) 3. Resource management and exception safety (idioms and technicalities) Juha Vihavainen University of Helsinki Preview More on error handling and exceptions checking array indices
Software Component Specification Using Design by Contract
Software Component Specification Using Design by Contract Yi Liu and H. Conrad Cunningham Department of Computer and Information Science University of Mississippi 237 Kinard Hall University, MS 38677 USA
PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON
PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London
Glossary of Object Oriented Terms
Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction
I. INTRODUCTION. International Journal of Computer Science Trends and Technology (IJCST) Volume 3 Issue 2, Mar-Apr 2015
RESEARCH ARTICLE An Exception Monitoring Using Java Jyoti Kumari, Sanjula Singh, Ankur Saxena Amity University Sector 125 Noida Uttar Pradesh India OPEN ACCESS ABSTRACT Many programmers do not check for
Systems Integration: Co C mp m onent- t bas a e s d s o s ftw ft a w r a e r e ngin i eeri r n i g
Systems Integration: Component-based software engineering Objectives To explain that CBSE is concerned with developing standardised components and composing these into applications To describe components
Programming by Contract. Programming by Contract: Motivation. Programming by Contract: Preconditions and Postconditions
COMP209 Object Oriented Programming Designing Classes 2 Mark Hall Programming by Contract (adapted from slides by Mark Utting) Preconditions Postconditions Class invariants Programming by Contract An agreement
Chapter 4: Design Principles I: Correctness and Robustness
Chapter 4: Design Principles I: Correctness and Robustness King Fahd University of Petroleum & Minerals SWE 316: Software Design & Architecture Semester: 072 Objectives To introduce two design principles
COMPARISON OF OBJECT-ORIENTED AND PROCEDURE-BASED COMPUTER LANGUAGES: CASE STUDY OF C++ PROGRAMMING
COMPARISON OF OBJECT-ORIENTED AND PROCEDURE-BASED COMPUTER LANGUAGES: CASE STUDY OF C++ PROGRAMMING Kuan C. Chen, Ph.D. Assistant Professor Management Information Systems School of Management Purdue University
EMBEDDED SOFTWARE DEVELOPMENT: COMPONENTS AND CONTRACTS
EMBEDDED SOFTWARE DEVELOPMENT: COMPONENTS AND CONTRACTS David URTING, Stefan VAN BAELEN, Tom HOLVOET and Yolande BERBERS {David.Urting, Stefan.VanBaelen, Tom.Holvoet, Yolande.Berbers}@cs.kuleuven.ac.be
Designing with Exceptions. CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219
Designing with Exceptions CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219 Testing vs. Debugging Testing Coding Does the code work properly YES NO 2 Debugging Testing
An Architecture for Autonomic Web Service Process Planning
An Architecture for Autonomic Web Service Process Planning Colm Moore and Ming Xue Wang and Claus Pahl Dublin City University, School of Computing, Dublin 9, Ireland [email protected], [mwang
THE WINDOWS AZURE PROGRAMMING MODEL
THE WINDOWS AZURE PROGRAMMING MODEL DAVID CHAPPELL OCTOBER 2010 SPONSORED BY MICROSOFT CORPORATION CONTENTS Why Create a New Programming Model?... 3 The Three Rules of the Windows Azure Programming Model...
Transactionality and Fault Handling in WebSphere Process Server Web Service Invocations. version 0.5 - Feb 2011
Transactionality and Fault Handling in WebSphere Process Server Web Service Invocations version 0.5 - Feb 2011 IBM Corporation, 2011 This edition applies to Version 6.2 of WebSphere Process Server 1 /
Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design
I. Automated Banking System Case studies: Outline Requirements Engineering: OO and incremental software development 1. case study: withdraw money a. use cases b. identifying class/object (class diagram)
Configuration Management
83 Chapter 6 Configuration Management Published as: Configuration Management in Component Based Product Populations, Rob van Ommering, 10th International Workshop on Software Configuration Management,
Software Engineering. Software Engineering. Component-Based. Based on Software Engineering, 7 th Edition by Ian Sommerville
Software Engineering Component-Based Software Engineering Based on Software Engineering, 7 th Edition by Ian Sommerville Objectives To explain that CBSE is concerned with developing standardised components
Computing Concepts with Java Essentials
2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Computing Concepts with Java Essentials 3rd Edition Cay Horstmann
Software Construction
Software Construction Debugging and Exceptions Jürg Luthiger University of Applied Sciences Northwestern Switzerland Institute for Mobile and Distributed Systems Learning Target You know the proper usage
PL/SQL Practicum #2: Assertions, Exceptions and Module Stability
PL/SQL Practicum #2: Assertions, Exceptions and Module Stability John Beresniewicz Technology Manager Precise Software Solutions Agenda Design by Contract Assertions Exceptions Modular Code DESIGN BY CONTRACT
CS 111 Classes I 1. Software Organization View to this point:
CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects
Integration of Application Business Logic and Business Rules with DSL and AOP
Integration of Application Business Logic and Business Rules with DSL and AOP Bogumiła Hnatkowska and Krzysztof Kasprzyk Wroclaw University of Technology, Wyb. Wyspianskiego 27 50-370 Wroclaw, Poland [email protected]
GenericServ, a Generic Server for Web Application Development
EurAsia-ICT 2002, Shiraz-Iran, 29-31 Oct. GenericServ, a Generic Server for Web Application Development Samar TAWBI PHD student [email protected] Bilal CHEBARO Assistant professor [email protected] Abstract
Component Based Software Engineering: A Broad Based Model is Needed
Component Based Software Engineering: A Broad Based Model is Needed Allen Parrish ([email protected]) Brandon Dixon ([email protected]) David Hale ([email protected]) Department of Computer Science
Traceability Patterns: An Approach to Requirement-Component Traceability in Agile Software Development
Traceability Patterns: An Approach to Requirement-Component Traceability in Agile Software Development ARBI GHAZARIAN University of Toronto Department of Computer Science 10 King s College Road, Toronto,
Logistics. Software Testing. Logistics. Logistics. Plan for this week. Before we begin. Project. Final exam. Questions?
Logistics Project Part 3 (block) due Sunday, Oct 30 Feedback by Monday Logistics Project Part 4 (clock variant) due Sunday, Nov 13 th Individual submission Recommended: Submit by Nov 6 th Scoring Functionality
Programming by Contract vs. Defensive Programming: A Comparison of Run-time Performance and Complexity
Department of Computer Science Roger Andersson Patrick Jungner Programming by Contract vs. Defensive Programming: A Comparison of Run-time Performance and Complexity Master s Thesis 2003:03 Programming
Evaluation of AgitarOne
Carnegie Mellon University, School of Computer Science Master of Software Engineering Evaluation of AgitarOne Analysis of Software Artifacts Final Project Report April 24, 2007 Edited for public release
A SYSTEMATIC APPROACH FOR COMPONENT-BASED SOFTWARE DEVELOPMENT
A SYSTEMATIC APPROACH FOR COMPONENT-BASED SOFTWARE DEVELOPMENT Cléver Ricardo Guareis de Farias, Marten van Sinderen and Luís Ferreira Pires Centre for Telematics and Information Technology (CTIT) PO Box
An Easier Way for Cross-Platform Data Acquisition Application Development
An Easier Way for Cross-Platform Data Acquisition Application Development For industrial automation and measurement system developers, software technology continues making rapid progress. Software engineers
The ConTract Model. Helmut Wächter, Andreas Reuter. November 9, 1999
The ConTract Model Helmut Wächter, Andreas Reuter November 9, 1999 Overview In Ahmed K. Elmagarmid: Database Transaction Models for Advanced Applications First in Andreas Reuter: ConTracts: A Means for
Software Engineering Techniques
Software Engineering Techniques Low level design issues for programming-in-the-large. Software Quality Design by contract Pre- and post conditions Class invariants Ten do Ten do nots Another type of summary
A Framework for the Semantics of Behavioral Contracts
A Framework for the Semantics of Behavioral Contracts Ashley McNeile Metamaxim Ltd, 48 Brunswick Gardens, London W8 4AN, UK [email protected] Abstract. Contracts have proved a powerful concept
A Meeting Room Scheduling Problem
A Scheduling Problem Objective Engineering, Inc. 699 Windsong Trail Austin, Texas 78746 512-328-9658 FAX: 512-328-9661 [email protected] http://www.oeng.com Objective Engineering, Inc., 1999-2007. Photocopying,
Software Process for QA
Software Process for QA Basic approaches & alternatives CIS 610, W98 / M Young 1/7/98 1 This introduction and overview is intended to provide some basic background on software process (sometimes called
BCS HIGHER EDUCATION QUALIFICATIONS Level 6 Professional Graduate Diploma in IT. March 2013 EXAMINERS REPORT. Software Engineering 2
BCS HIGHER EDUCATION QUALIFICATIONS Level 6 Professional Graduate Diploma in IT March 2013 EXAMINERS REPORT Software Engineering 2 General Comments The pass rate this year was significantly better than
1 The Java Virtual Machine
1 The Java Virtual Machine About the Spec Format This document describes the Java virtual machine and the instruction set. In this introduction, each component of the machine is briefly described. This
Testing automation of projects in telecommunication domain
Testing automation of projects in telecommunication domain Alexey Veselov, Vsevolod Kotlyarov Saint-Petersburg State Polytechnic University, Saint-Petersburg, Russia [email protected], [email protected]
EVALUATING METRICS AT CLASS AND METHOD LEVEL FOR JAVA PROGRAMS USING KNOWLEDGE BASED SYSTEMS
EVALUATING METRICS AT CLASS AND METHOD LEVEL FOR JAVA PROGRAMS USING KNOWLEDGE BASED SYSTEMS Umamaheswari E. 1, N. Bhalaji 2 and D. K. Ghosh 3 1 SCSE, VIT Chennai Campus, Chennai, India 2 SSN College of
How To Write A Test Engine For A Microsoft Microsoft Web Browser (Php) For A Web Browser For A Non-Procedural Reason)
Praspel: A Specification Language for Contract-Driven Testing in PHP Ivan Enderlin Frédéric Dadeau Alain Giorgetti Abdallah Ben Othman October 27th, 2011 Meetings: LTP MTVV Ivan Enderlin, Frédéric Dadeau,
Guideline for stresstest Page 1 of 6. Stress test
Guideline for stresstest Page 1 of 6 Stress test Objective: Show unacceptable problems with high parallel load. Crash, wrong processing, slow processing. Test Procedure: Run test cases with maximum number
Examples of Design by Contract in Java
Object World Berlin 99 Design & Components Berlin, May 17th-20th 1999 Examples of Design by Contract in Java using Contract, the Design by Contract tm Tool for Java tm Reto Kramer, [email protected] Java
.NET and J2EE Intro to Software Engineering
.NET and J2EE Intro to Software Engineering David Talby This Lecture.NET Platform The Framework CLR and C# J2EE Platform And Web Services Introduction to Software Engineering The Software Crisis Methodologies
DATABASE MANAGEMENT SYSTEM
REVIEW ARTICLE DATABASE MANAGEMENT SYSTEM Sweta Singh Assistant Professor, Faculty of Management Studies, BHU, Varanasi, India E-mail: [email protected] ABSTRACT Today, more than at any previous
No no-argument constructor. No default constructor found
Every software developer deals with bugs. The really tough bugs aren t detected by the compiler. Nasty bugs manifest themselves only when executed at runtime. Here is a list of the top ten difficult and
Sequence Diagrams. Massimo Felici. Massimo Felici Sequence Diagrams c 2004 2011
Sequence Diagrams Massimo Felici What are Sequence Diagrams? Sequence Diagrams are interaction diagrams that detail how operations are carried out Interaction diagrams model important runtime interactions
Dependable software development. Programming techniques for building dependable software systems.
Dependable software development Programming techniques for building dependable software systems. Ian Sommerville 2000 Dependable Software Development Slide 1 Software dependability In general, software
Rigorous Software Development CSCI-GA 3033-009
Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 5 Disclaimer. These notes are derived from notes originally developed by Joseph Kiniry, Gary Leavens, Erik Poll,
Chapter 8 Software Testing
Chapter 8 Software Testing Summary 1 Topics covered Development testing Test-driven development Release testing User testing 2 Program testing Testing is intended to show that a program does what it is
I Control Your Code Attack Vectors Through the Eyes of Software-based Fault Isolation. Mathias Payer, ETH Zurich
I Control Your Code Attack Vectors Through the Eyes of Software-based Fault Isolation Mathias Payer, ETH Zurich Motivation Applications often vulnerable to security exploits Solution: restrict application
Application Centric Infrastructure Object-Oriented Data Model: Gain Advanced Network Control and Programmability
White Paper Application Centric Infrastructure Object-Oriented Data Model: Gain Advanced Network Control and Programmability What You Will Learn This document discusses application centric infrastructure
Database Application Developer Tools Using Static Analysis and Dynamic Profiling
Database Application Developer Tools Using Static Analysis and Dynamic Profiling Surajit Chaudhuri, Vivek Narasayya, Manoj Syamala Microsoft Research {surajitc,viveknar,manojsy}@microsoft.com Abstract
Building Applications Using Micro Focus COBOL
Building Applications Using Micro Focus COBOL Abstract If you look through the Micro Focus COBOL documentation, you will see many different executable file types referenced: int, gnt, exe, dll and others.
Agile Specification-Driven Development
Agile Specification-Driven Development Jonathan S. Ostroff 1, David Makalsky 1, and Richard F. Paige 2 1 Department of Computer Science, York University, Canada. {jonathan, dm}@cs.yorku.ca 2 Department
Introduction to Programming System Design. CSCI 455x (4 Units)
Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,
VDM vs. Programming Language Extensions or their Integration
VDM vs. Programming Language Extensions or their Integration Alexander A. Koptelov and Alexander K. Petrenko Institute for System Programming of Russian Academy of Sciences (ISPRAS), B. Communisticheskaya,
Software Service Engineering Architect s Dream or Developer s Nightmare?
Software Service Engineering Architect s Dream or Developer s Nightmare? Gregor Hohpe Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043 [email protected] Abstract. Architectural principles such
Static Analysis of Exception Handling in Ada
SOFTWARE PRACTICE AND EXPERIENCE, VOL. 23(10), 1157 1174 (OCTOBER 1993) Static Analysis of Exception Handling in Ada carl f. schaefer and gary n. bundy The MITRE Corporation, 7525 Colshire Drive, McLean,
Safe Object-Oriented Software: The Verified Design-By-Contract Paradigm
Safe Object-Oriented Software: The Verified Design-By-Contract Paradigm David Crocker Escher Technologies Ltd. Aldershot, United Kingdom [email protected] Abstract. In recent years, large sectors
A standards-based approach to application integration
A standards-based approach to application integration An introduction to IBM s WebSphere ESB product Jim MacNair Senior Consulting IT Specialist [email protected] Copyright IBM Corporation 2005. All rights
Verification and Validation of Software Components and Component Based Software Systems
Chapter 5 29 Verification and Validation of Software Components and Component Based Christina Wallin Industrial Information Technology Software Engineering Processes ABB Corporate Research [email protected]
The programming language C. sws1 1
The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan
Software testing. Objectives
Software testing cmsc435-1 Objectives To discuss the distinctions between validation testing and defect testing To describe the principles of system and component testing To describe strategies for generating
ExSched: Solving Constraint Satisfaction Problems with the Spreadsheet Paradigm
ExSched: Solving Constraint Satisfaction Problems with the Spreadsheet Paradigm Siddharth Chitnis, Madhu Yennamani, Gopal Gupta Department of Computer Science The University of Texas at Dallas Richardson,
COMBINING PROCESS MODELLING AND CASE MODELLING
Page 1 COMBINING PROCESS MODELLING AND CASE MODELLING Knut Hinkelmann and Arianna Pierfranceschi FHNW University of Applied Sciences and Arts Northwestern Switzerland, School of Business Riggenbachstrasse
Error Handling for Business Information
Error Handling for Business Information Systems A Pattern Language Version 1.1 Klaus Renzel sd&m München 27/08/2003 sd&m software design & management GmbH & Co. KG Finanzinformationssysteme Thomas-Dehler-Straße
Chapter 17 Software Testing Strategies Slide Set to accompany Software Engineering: A Practitioner s Approach, 7/e by Roger S. Pressman Slides copyright 1996, 2001, 2005, 2009 by Roger S. Pressman For
COS 318: Operating Systems
COS 318: Operating Systems OS Structures and System Calls Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall10/cos318/ Outline Protection mechanisms
Interface Definition. Guidelines and Recommendations. Author: Radovan Semančík. Date: January 2010. Version: 1.0
Guidelines and Recommendations Author: Radovan Semančík Date: January 2010 Version: 1.0 Abstract: This document provides guidelines and recommendations for interface definitions. It describes how the interface
Verifying Semantic of System Composition for an Aspect-Oriented Approach
2012 International Conference on System Engineering and Modeling (ICSEM 2012) IPCSIT vol. 34 (2012) (2012) IACSIT Press, Singapore Verifying Semantic of System Composition for an Aspect-Oriented Approach
What is a programming language?
Overview Introduction Motivation Why study programming languages? Some key concepts What is a programming language? Artificial language" Computers" Programs" Syntax" Semantics" What is a programming language?...there
A deeper look at Inline functions
A deeper look at Inline functions I think it s safe to say that all Overload readers know what C++ inline functions are. When we declare a function or member function as inline we are trying to avoid the
Syntax Check of Embedded SQL in C++ with Proto
Proceedings of the 8 th International Conference on Applied Informatics Eger, Hungary, January 27 30, 2010. Vol. 2. pp. 383 390. Syntax Check of Embedded SQL in C++ with Proto Zalán Szűgyi, Zoltán Porkoláb
Material and some slide content from: - Software Architecture: Foundations, Theory, and Practice NFPs Reid Holmes Lecture 5 - Tuesday, Sept 27 2010.
Material and some slide content from: - Software Architecture: Foundations, Theory, and Practice NFPs Reid Holmes Lecture 5 - Tuesday, Sept 27 2010. NFPs NFPs are constraints on the manner in which the
Object-Oriented Databases db4o: Part 2
Object-Oriented Databases db4o: Part 2 Configuration and Tuning Distribution and Replication Callbacks and Translators 1 Summary: db4o Part 1 Managing databases with an object container Retrieving objects
Fundamentals of Java Programming
Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors
Chapter 11, Testing, Part 2: Integration and System Testing
Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 11, Testing, Part 2: Integration and System Testing Overview Integration testing Big bang Bottom up Top down Sandwich System testing
Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.
Objectives To describe the services an operating system provides to users, processes, and other systems To discuss the various ways of structuring an operating system Chapter 2: Operating-System Structures
Service Oriented Architecture
Service Oriented Architecture Version 9 2 SOA-2 Overview Ok, now we understand the Web Service technology, but how about Service Oriented Architectures? A guiding analogy Terminology excursion Service,
Chapter 12 Programming Concepts and Languages
Chapter 12 Programming Concepts and Languages Chapter 12 Programming Concepts and Languages Paradigm Publishing, Inc. 12-1 Presentation Overview Programming Concepts Problem-Solving Techniques The Evolution
Reuse Contracts: Managing the Evolution of Reusable Assets
Reuse Contracts: Managing the Evolution of Reusable Assets Patrick Steyaert, Carine Lucas, Kim Mens, Theo D Hondt Programming Technology Lab Vrije Universiteit Brussel Pleinlaan 2, 1050 Brussels, Belgium
Exception Handling. Overloaded methods Interfaces Inheritance hierarchies Constructors. OOP: Exception Handling 1
Exception Handling Error handling in general Java's exception handling mechanism The catch-or-specify priciple Checked and unchecked exceptions Exceptions impact/usage Overloaded methods Interfaces Inheritance
Case Study Solutions. This appendix contains the solutions to the Acme Mining Company Case Study.
Case Study Solutions This appendix contains the solutions to the Acme Mining Company Case Study. Sun Proprietary: Internal Use Only 1 The Acme Mining Company Rewritten Problem Statement Note The candidate
