Two pass test case generation using self-modifying instruction replacement
Abstract
A test code generation technique that replaces instructions having a machine state dependent result with special redirection instructions provides generation of test code in which state dependent execution choices are made without a state model. Redirection instructions cause execution of a handler than examines the machine state and replaces the redirection instruction with a replacement instruction having a desired result resolved in accordance with the current machine state. The instructions that are replaced may be conditional branch instructions and the result a desired execution path. The examination of the machine state permits determination of a branch condition for the replacement instruction so that the next pass of the test code executes along the desired path. Alternatively, the handler can execute a jump to the branch instruction, causing immediate execution of the desired branch path. The re-direction instructions may be illegal instructions, which cause execution of an interrupt handler that performs the replacement.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 36 · Forward citations: 2.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer performed method performed by a general-purpose computer system that generates an output set of program code for execution by a processor, the method comprising: generating the output set of program code by replacing a particular instruction in the output set of program code with a redirecting instruction for redirecting execution to a handling routine, wherein the particular instruction is an instruction having a result dependent on a machine state of the processor; executing the program code, wherein when the redirecting instruction is executed, the handling routine is entered; de
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (2 of 2 total)
References Cited — Backward Prior Art (36)
Non-Patent Literature (3)
- Bertolino, Antonia,"Automatic Generation of Path Covers Based on the Control Flow Analysis of Computer Programs", IEEE Transactions on Software Engineering, Dec. 1994, pp. 885-899, vol. 20, No. 12, IEEE Press, US.
- Wikipedia's article on 'Control Flow' from Dec. 18, 2008 discloses self-modifying code being used to affect control flow.
- Wikipedia's article on 'Self-modifying code' from Feb. 20, 2010 discloses self-modifying code being a way to alter a compare and branch to an unconditional branch.