Browse Prior Art Database

Automated Inclusion of Program Tracing Statements

IP.com Disclosure Number: IPCOM000013234D
Original Publication Date: 1999-Dec-01
Included in the Prior Art Database: 2003-Jun-18
Document File: 4 page(s) / 51K

Publishing Venue

IBM

Related People

Christine Knight: AUTHOR [+2]

Abstract

Disclosed is a mechanism to facilitate adding trace statements in a routine function method (herein generically called traceable unit) into a programming language source document, through the language parser attached to the edit system. The context-sensitive mechanism is customizable, its implementation is similar for various programming languages, and it goes beyond the simple keyword-expansion found in editors. Some features are: adds tracing statements in the entire document, or in a particular traceable unit; choice of a begin and or an end tracing statement(s); flexible, user-customizable format for the trace statements; tracing statements are automatically positioned inside the traceable unit in the correct position; traceable unit's name, its parameters' names, and their run-time values are imbedded in the generated tracing statements. EDIT SYSTEM core edit system edit control

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

Page 1 of 4

Automated Inclusion of Program Tracing Statements

Disclosed is a mechanism to facilitate adding trace statements in a routine / function / method (herein generically called traceable unit) into a programming language source document, through the language parser attached to the edit system. The context-sensitive mechanism is customizable, its implementation is similar for various programming languages, and it goes beyond the simple keyword-expansion found in editors. Some features are: - adds tracing statements in the entire document, or in a particular traceable unit;
- choice of a begin and / or an end tracing statement(s); - flexible, user-customizable format for the trace statements; - tracing statements are automatically positioned inside the traceable unit in the correct position;
- traceable unit's name, its parameters' names, and their run-time values are imbedded in the generated tracing statements.

=================

| EDIT SYSTEM | core edit system / edit control
=================

^

|

-----------------

| PARSER | language-specific parsers
-----------------|

-----------------|

-----------------

^

|

------------------

| PARSER PROFILE | parser properties and settings
------------------|

------------------|

------------------

Language-specific parser classes are attached to the edit system via file-type associations. A parser first gets control after the file has been loaded in the edit system (to perform an initial total parse), and subsequently it is called following changes made to the document (incremental parse). The parser analyzes the document, and marks structural elements in it at various levels of detail. For example, text elements which contain comments are marked with CLASS_COMMENT, method signature elements with CLASS_METHOD, etc. This parser-set information is used by the edit system to display the document in a view (colorized, filtered sections of the source, etc.), by other tools attached to the edit system to get detailed information about the structure of the document for carrying out context-sensitive actions, and by the parser itself as reference points for incremental parsing and other context-sensitive commands that extend the Edit System, such as the automated inclusion of tracing statements.

Each parser has a Profile (properties) file, with various settings such as the state of automatic indentation, and a library of keyword expansions. These settings can be modified by the user via appropriate preferences dialogs, actions, and menus.

1

Page 2 of 4

The disclosed mechanism necessitates: - defining two new commands in the language parser: trace to insert tracing statements in a traceable unit, and traceAll to handle the traceable units in the entire document;
- defining a new command traceRemove in the edit system, to undo the insertion of tracing statements; - adding default trace statements in the parser profile: traceBegin for the statement inserted at the beginning of the traceable unit, traceEnd for the...