Browse Prior Art Database

Intelligent Validation of Trace Points in Software Source Code

IP.com Disclosure Number: IPCOM000131708D
Original Publication Date: 2005-Nov-16
Included in the Prior Art Database: 2005-Nov-16
Document File: 2 page(s) / 43K

Publishing Venue

IBM

Abstract

A method by which trace points included in software source code can be checked for correctness based on the context of the trace points using an automated, intelligent process.

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

Page 1 of 2

Intelligent Validation of Trace Points in Software Source Code

It is common practice in software development to include code for the purposes of recoverability, availability, and serviceability in the form of trace points. An example of the usage of trace points is to record entry into a method or function along with the parameters that were supplied and to record exit from a method or function along with the value that is being returned. The insertion of such trace points into software source code is prone to human error as, for example, it is down to the developer to correctly supply the name of the method or function along with the applicable parameters when the code is being written. Furthermore as code is refactored the necessary amendments to existing trace points are regularly overlooked. These problems have a detrimental effect on serviceability. Furthermore the inclusion of unnecessary trace points, such as entry and exit trace being added to a method that always returns a constant value hamper performance and add unnecessary bloat to compiled code.

    At present there is no mechanism available to developers, as they write the code, to validate that the trace points that exist in the code are well-formed, necessary and in the correct location.

    One solution to this problem is to remove the responsibility of inserting trace points into the code from the developer and instead utilize an automated mechanism for doing so such as AspectJ. However, the use of AspectJ to resolve this problem has two main problems. Firstly, it cannot be used to insert trace points that need some human input, for example outputting informational or warning messages to the user. Secondly if a project has already invested a large amount of development resource into hand-coding trace points it may be impractical to entirely replace the existing mechanism with an AspectJ based solution.

    Another existing solution is to incorporate a validation mechanism in the project's build process however validation at build time has drawbacks as, by this time, any errors that have been found have already been committed to the source code repository making correcting the errors a more long-winded process than if the problem had been identified as the code was being written. Furthermore the mechanisms available for indicating the precise location and cause of an error at build time are far less sophisticated than those provided by an Integrated Development Environment (IDE) at code writing time.

    Disclosed is a mechanism for intelligently validating trace points in software source code as it is being written. By performing this validation on the fly errors can be brought to the developer's attention as and when they are made. The various kinds of errors that can be brought to a developer's attention include: Incorrect method or function name being traced Incomplete list of entry parameters being traced Incorrect return value being traced
A non-existent key being used to ou...