System and method for selectively executing computer code

Electrical computers and digital processing systems: processing – Processing control – Mode switch or change

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C712S227000, C712S236000, C717S128000, C717S130000, C717S141000

Reexamination Certificate

active

06654877

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 sets of 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 (e.g., assertions) that test for certain conditions to ensure that the program is running correctly. 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 any 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.
When the testing code is included in the program, there are steps that can be taken to mitigate the adverse effect of the code en the program's performance. For example, conditional branches (e.g., “IF” instructions) based on user inputs, or other types of inputs, can be inserted into the program to branch around portions of the testing code when execution of the testing code is not desired. However, the number of these conditional branches can be relatively large when the testing code is spread throughout the program. Therefore, although the adverse impact of testing code in a computer program can be mitigated, there still exists at least some impact to the program's performance, whether or not the testing code is executed, and this impact can be significant.
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.
In architecture, the system of the present invention utilizes memory for storing a computer program and processing circuitry for processing and executing instructions of the computer program. In particular, the computer program includes a set of code and an unconditional 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 receives and processes the unconditional branch instruction. When the set of code is disabled, the processing circuitry executes the unconditional branch instruction based on the mode indicator, thereby preventing execution of the set of code. However, when the set of code is enabled, the processing circuitry refrains from executing the unconditional branch instruction based on the mode indicator and executes the set of code. Thus, execution of the set of code is selectively enabled based on the status 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, the computer program having a set of code and an unconditional branch instruction; receiving run time data, during a run of the program, indicating whether the set of code is enabled; setting a value of a mode indicator based on the run time data; determining whether to execute the unconditional branch instruction based on the value of the mode indicator; processing the unconditional branch instruction based on the determining step; and executing the set of code if a determination is made in the determining step to refrain from executing the first unconditional branch instruction.
Other features and advantages of the present invention will become apparent to one skilled in the art upon examination of the following detailed description, when read in conjunction with the accompanying drawings. It is intended that all such features and advantages be included herein within the scope of the present invention and protected by the claims.


REFERENCES:
patent: 5754861 (1998-05-01), Kumar
patent: 5784552 (1998-07-01), Bishop et al.
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.

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 selectively executing computer code 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 selectively executing computer code, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and System and method for selectively executing computer code will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3152222

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