Browse Prior Art Database

Automatic interference of exception specification

IP.com Disclosure Number: IPCOM000204499D
Original Publication Date: 2011-Feb-28
Included in the Prior Art Database: 2011-Feb-28
Document File: 7 page(s) / 482K

Publishing Venue

Siemens

Related People

Juergen Carstens: CONTACT

Abstract

In almost all modern programming languages, exception handling is provided as a programming abstraction for developing robust and reliable software. Some languages provide programming constructs to specify exception specification. For example, the programming language Java allows for writing exception specification in the method signature. To use exception specifications can help writing correct exception handlers and understanding the exception control flow. However, the use of exception specification can lead to issues such as version management, productivity and code quality or the difficulty of determining the correct exceptions for interfaces. Up to now, there are few techniques and tools which provide integrated support for specifying, understanding and evolving exception specifications. One example is a lightweight exception specification system that provides integrated support for specifying, understanding, and evolving exception policies. The exception specifications are computed based on which exception a method can throw as well as all the other used methods and their thrown exceptions. However, the currently used technique can only be applied to Java programs. Furthermore, contextual information of the source code is not taken into account. Another disadvantage of current techniques, languages or tools is that it is only specified which exceptions a method can throw, but not which exceptions a method cannot throw.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 8% of the total text.

Page 01 of 7

(This page contains 01 pictures or other non-text object)

(This page contains 00 pictures or other non-text object)

Automatic interference of exception specification

Idea: Shrinath Gupta, IN-Bangalore

In almost all modern programming languages, exception handling is provided as a p abstraction for developing robust and reliable software. Some languages provide p constructs to specify exception specification. For example, the programming langua writing exception specification in the method signature
writing correct exception handlers and understanding the exception control fl exception specification can lead to issues such as version management, pro
or the difficulty of determining the correct exceptions for interfaces.

Up to now, there are few techniques and tools which provide integrated support fo understanding and evolving exception specifications. One example is a lightwei specification system that provides integrated support for specifying, understanding, exception policies. The exception specifications are computed based on which ex
can throw as well as all the other used methods and their thrown exceptions. Ho
used technique can only be applied to Java programs. Furthermore, contextual in source code is not taken into account. Another disadvantage of current techniques
is that it is only specified which exceptions a method can throw, but not which exceptio cannot throw.

Therefore, a novel solution is proposed which allows for inferring exception specif
source code and provides a tool which infers lightweight minimal exception spe
contextual information of the
the method parameters. Methods of a particular type should always wrap an except
type U before throwing and methods of a particular type should never throw a
The context information knowledge base is created by collecting contextual inform
software. By query
consistency of the inferred exception specifications in regard to the source code and informati provided by the software developer.

In the following, new concepts essential to the prop
the proposed solution are based on the programming language C# and in part exception hierarchy. However, the proposed solution can be a programming language.

The contextual information is the information which depends on the context of the changes in case the source code evolves. As contextual information can be consid

• Number and type of the argumen

• List of all methods a particular method is calling. In this list, which meth framework

• The access modifier, e.g. public, private, of a method

• Information about overridden and overriding methods in an inheritan
example, the overriding method can throw an exception, but the overridden meth throw any exception.

• Method allows for file read/write operations.

methods and which are written by programmer

ce hierarchy. For
od does not

The following exception information is inferred from the source code. The exception can be both system and user defined.

MustNotThrowSet (MNT): The set cont...

Processing...
Loading...