System and method for enabling selective execution of...

Electrical computers and digital processing systems: processing – Processing control – Specialized instruction processing in support of testing,...

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C712S239000, C712S230000, C714S035000, C714S038110, C717S124000, C717S131000

Reexamination Certificate

active

06643769

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention generally relates to computer processing techniques and, in particular, to a system and method for enabling selective execution of certain code within a computer program without significantly affecting the execution performance of the program.
2. Related Art
In some computer applications, it is desirable to perform certain functionality only in a limited number of circumstances. For example, a computer program may include testing code that tests for certain conditions to ensure that the program is running correctly. As an example, the testing code may include one or more assertions, which are well known statements for testing computer programs. In this regard, assertions are inserted into a program being compiled, and when executed, an assertion tests for a certain condition. When the tested condition is true, the foregoing program is usually terminated, and an error message is displayed.
While it may be desirable to run this testing code during the debugging and/or testing phases, it may be less desirable to run this testing code in normal operation, since the testing code utilizes processor time. In this regard, execution of the testing code is not required for the computer program to operate correctly and is only useful if there is an error that can be detected by the testing code. Thus, executing the testing code when the computer program runs free of errors needlessly utilizes processor time.
As a result, most computer programs that include testing code are usually recompiled once the testing and debugging phases are complete. During recompilation, insertion of testing code into the recompiled programs is prevented such that the recompiled programs do not include the testing code. The recompiled programs run more efficiently since there is no testing code to execute, and it is these recompiled programs that are usually sold to and used by consumers.
However, even after the testing and debugging phases have been completed, there may still be some bugs in the computer program that could be detected by the removed testing code, and once the testing code has been removed, the computer program lacks the capability of detecting these bugs. Therefore, a tradeoff exists between leaving testing code in a computer program and removing the testing code from the computer program. In this regard, the testing code may be removed from the computer program to improve the performance of the program, or the testing code may be left in the program to test for certain errors, thereby adversely affecting the program's performance.
Thus, a heretofore unaddressed need exists in the industry for providing a system and method of enabling selective execution of certain code (e.g., testing code) within a computer program based on inputs at run time with minimal or no affect to the program's performance when execution of the foregoing code is not desired.
SUMMARY OF THE INVENTION
The present invention overcomes the inadequacies and deficiencies of the prior art as discussed hereinbefore. Generally, the present invention provides a system and method for selectively executing sets of code in computer programs.
The system of the present invention utilizes memory for storing a computer program and processing circuitry for executing instructions of the computer program. In particular, the computer program includes at least one branch instruction and a set of code that is to be selectively enabled or disabled. The branch instruction includes an address identifier identifying a memory address to which the processing circuitry may branch when executing the branch instruction. The processing circuitry, in executing the computer program, receives run time data indicative of whether the set of code is enabled or disabled, and based on the run time data, the processing circuitry sets a value of a mode indicator. While the program is running, the processing circuitry executes the branch instruction. In executing the branch instruction, the processing circuitry, depending on the value of the mode indicator, branches to the address identified by address identifier or branches to a different address. The set of code is located at one of the foregoing addresses. Thus, execution of the set of code is either enabled or disabled by controlling the value of the mode indicator.
The present invention can also be viewed as providing a method for selectively executing sets of code in computer programs. The method can be broadly conceptualized by the following steps: storing a computer program in memory, the computer program having a set of code and a branch instruction, the branch instruction including an address identifier identifying a first address in the memory; receiving, during a run of the program, run time data indicating whether the set of code is enabled; setting a value of a mode indicator based on the run time data; identifying a second address in the memory in response to the branch instruction; branching to the second address based on said identifying step and said value of said mode indicator; and executing an instruction at the second address in response to the branching step.


REFERENCES:
patent: 5758061 (1998-05-01), Plum
patent: 5956758 (1999-09-01), Henzinger et al.
patent: 5961636 (1999-10-01), Brooks et al.
patent: 6076158 (2000-06-01), Sites et al.
patent: 6108773 (2000-08-01), Col. et al.
patent: 6108777 (2000-08-01), Puziol et al.
patent: 6173440 (2001-01-01), Darty
U.S. patent application entitled “System and Method for Enabling Selective Execution of Computer Code,” by Jerome Huck and Carol L. Thompson, filed Aug. 23, 2000, having Attorney Docket No. 10001221-1.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

System and method for enabling selective execution of... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with System and method for enabling selective execution of..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and System and method for enabling selective execution of... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3144480

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.