# US 2008/0307397 A1 · Program Analysis by Partial Emulation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0307397 A1
- Document ID: US20080307397A1
- Status: Published application
- Kind: A1
- Application number: 11/760,664
- Filed: 2007-06-08
- Published: 2008-12-11
- Earliest claimed: 2007-06-08
- Inventors: Bill Angell
- Web page: https://patentgrep.com/patent/US20080307397A1

## CPC

- G06F 9/455: Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F 11/3604: Analysis of software for verifying properties of programs (testing of software G06F11/3668)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Program code is statically analyzed (without actually executing the code) by “virtually” executing the code with a virtual processor or emulator that steps through the code. The analysis includes locating entry and exit points, identifying branch points, analyzing one or more code paths from a branch, noting calls to external functions (e.g., libraries), etc. Programming logic errors can be located, such as calls that never return or isolated code that can never be reached. Analysis can include dynamic analysis of code when emulation is combined with a debugger, for example.

## Claims

### Claim 1

A method comprising:
statically analyzing code by emulating execution of the code; and
identifying programming logic errors discovered in the code during the analyzing.

### Claim 2 (depends on 1)

The method of claim 1, where analyzing further comprises:
locating entry and exit points in the code.

### Claim 3 (depends on 1)

The method of claim 1, where analyzing further comprises:
identifying branch or break points in the code.

### Claim 4 (depends on 1)

The method of claim 1, where analyzing further comprises:
tracing one or more code paths originating from a branch point.

### Claim 5 (depends on 1)

The method of claim 1, where analyzing further comprises:
identifying calls to external functions.

### Claim 6 (depends on 1)

The method of claim 1, where identifying programming logic errors further comprises:
identifying calls that are never returned.

### Claim 7 (depends on 1)

The method of claim 1, where identifying programming logic errors further comprises:
identifying isolated code that is never reached.

### Claim 8 (depends on 1)

The method of claim 1, where identifying programming logic errors further comprises:
dynamically or statically analyzing the code for programming logic errors.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
generating information describing programming logic errors discovered during the tracing.

### Claim 10 (depends on 9)

The method of claim 9, further comprising:
using the information to identify probe points for debugging the code during execution of the code.

### Claim 11

A system comprising:
an interface for receiving code; and
a virtual processor coupled to the interface and configured for statically analyzing the code by emulating execution of the code, and for identifying programming logic errors in the code discovered during the analyzing.

### Claim 12 (depends on 11)

The system of claim 11, where the virtual processor is configured to locate entry and exit points in the code.

### Claim 13 (depends on 11)

The system of claim 11, where the virtual processor is configured to identify a branch or break in the code.

### Claim 14 (depends on 11)

The system of claim 11, where the virtual processor is configured to analyze one or more code paths originating from a branch point.

### Claim 15 (depends on 11)

The system of claim 11, where the virtual processor is configured to identify calls to external functions.

### Claim 16 (depends on 11)

The system of claim 11, where the virtual processor is configured to identify calls to external functions that are never returned.

### Claim 17 (depends on 11)

The system of claim 11, where the virtual processor is configured to identify isolated code that is never reached.

### Claim 18 (depends on 11)

The system of claim 11, where the virtual processor is configured to dynamically analyze the code to identify programming logic errors.

### Claim 19 (depends on 11)

The system of claim 11, where the virtual processor is configured to generate information describing programming logic errors discovered during the tracing.

### Claim 20 (depends on 11)

The system of claim 11, where the virtual processor is configured to use the information to identify probe points for debugging the code during execution of the code.

### Claim 21

A computer-readable medium having instructions stored thereon, which, when executed by a processor, causes the processor to perform operations comprising:
statically analyzing code by emulating execution of the code; and
identifying programming logic errors discovered in the code during the analyzing.

### Claim 22 (depends on 21)

The computer-readable medium of claim 21, where analyzing further comprises:
locating entry and exit points in the code.

### Claim 23 (depends on 21)

The computer-readable medium of claim 21, where analyzing further comprises:
identifying branch or break points in the code.

### Claim 24 (depends on 21)

The computer-readable medium of claim 21, where analyzing further comprises:
analyzing one or more code paths originating from a branch point.

### Claim 25 (depends on 21)

The computer-readable medium of claim 21, where analyzing further comprises:
identifying calls to external functions.

### Claim 26 (depends on 21)

The computer-readable medium of claim 21, where identifying programming logic errors further comprises:
identifying calls that are never returned.

### Claim 27 (depends on 21)

The computer-readable medium of claim 21, where identifying programming logic errors further comprises:
identifying isolated code that is never reached.

### Claim 28 (depends on 21)

The computer-readable medium of claim 21, where identifying programming logic errors further comprises:
dynamically analyzing the code for programming logic errors.

### Claim 29 (depends on 21)

The computer-readable medium of claim 21, further comprising:
generating information describing programming logic errors discovered during the analyzing.

### Claim 30 (depends on 21)

The computer-readable medium of claim 21, further comprising:
using the information to identify probe points for debugging the code during execution of the code.

### Claim 31

A system comprising:
means for statically analyzing code by emulating execution of the code; and
means for identifying programming logic errors discovered in the code during the analyzing.
