# US 2013/0159978 A1 · State capture after execution in dependent sequences

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

- Number: US 2013/0159978 A1
- Document ID: US20130159978A1
- Status: Published application
- Kind: A1
- Application number: 13/329,130
- Filed: 2011-12-16
- Published: 2013-06-20
- Earliest claimed: 2011-12-16
- Assignees: Microsoft Corporation
- Inventors: Charles P. Jazdzewski; Michael C. Fanning
- Web page: https://patentgrep.com/patent/US20130159978A1

## CPC

- G06F 11/3636: {by tracing the execution of the program}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The execution of a dynamic code segment sequence that includes at least two code segments in sequence. The first code segment is first executed and the corresponding state of the environment is captured. The second code segment is then executed. When the second code segment is later re-executed, the first code segment is not re-executed again. Rather, the environmental state is set to be the captured state that existed when the first code segment originally executed. Then, the second code segment may be executed without spending the resources required to re-run the first code segment. This may be employed at authoring time, or after deployment time.

## Claims

### Claim 1

A computer program product comprising one or more computer-readable media having thereon computer-executable instructions that are structured such that, when executed by the one or more processors of a computing system, causes the computing system to execute a dynamic code segment sequence in an environment, the code segment sequence including a first code segment followed by a second code segment, wherein the execution of the dynamic code segment sequence comprises:
an act of executing the first code segment;
an act of capturing a first environmental state representing a state of at least a portion of the environment after the first code segment executes;
an act of executing the second code segment a first time; and
an act of beginning execution of the second code segment a second time by setting the environment to have the captured first environmental state without re-executing the first code segment.

### Claim 2 (depends on 1)

The computer program product in accordance with claim 1, wherein the method further comprises:
an act of continuing execution of the second code segment a second time until the code segment encounters a halt point;
an act of evaluating a state of the second code segment at the halt point; and
an act of generating an available symbol set at the halt point as a result of the act of evaluating the state of the second code segment.

### Claim 3 (depends on 1)

The computer program product in accordance with claim 1, wherein the method further comprises:
an act of performing an analysis of the captured first environmental state.

### Claim 4 (depends on 1)

The computer program product in accordance with claim 1, wherein the method further comprising:
an act of beginning execution of the second code segment a plurality of additional times each time by setting the environment to have the captured first environmental state without re-executing the first code segment.

### Claim 5 (depends on 1)

The computer program product in accordance with claim 1, wherein the act of capturing a first environmental state comprises ceasing to write to a first instance of an execution context once the first code segment executes, and when continuing execution writing new execution state to a second instance of the execution context.

### Claim 6 (depends on 5)

The computer program product in accordance with claim 5, wherein the act of writing new execution state to a second instance of the execution context comprises the following for at least one context component represented in the first execution context after the first code segment executes:
detecting that a read is to be performed on the context component, and in response creating a proxy context component that references the instance of the context component in the first instance of the execution context;
detecting that a write is to be performed on the context component, and in response, copying values from the context component in the first instance of the execution context into the context component in the second instance of the execution context, declassifying the context component in the second instance of the execution state as a proxy, and performing the write on the copy of the values of the context component in the second instance of the execution context.

### Claim 7 (depends on 1)

The computer program product in accordance with claim 1, wherein the at least the portion of the captured state includes only a portion of the environmental state of the environment.

### Claim 8 (depends on 1)

The computer program product in accordance with claim 1, wherein the dynamic code segment also includes a previous code segment to be executed before the first code segment, method further comprising:
an act of executing the previous code segment; and
an act of capturing a previous environmental state representing a state of the at least the portion of the environment just before the first code segment executes.

### Claim 9 (depends on 8)

The computer program product in accordance with claim 8, wherein the previously environmental state is a full capture of the captured portion of environmental state, whereas the first environment state is an update capture of the captured portion of the environmental state.

### Claim 10 (depends on 9)

The computer program product in accordance with claim 9, wherein the setting of the environment to have the captured first environmental state comprises:
an act of combining the full capture with the update capture.

### Claim 11 (depends on 1)

The computer program product in accordance with claim 1, wherein the first code segment is a first dynamic language program, and the second code segment is a second dynamic language program.

### Claim 12 (depends on 1)

The computer program product in accordance with claim 1, wherein the first code segment is a first script file, and the second code segment is a second script file.

### Claim 13

A method for a computing system to execute a dynamic code segment sequence in an environment, the code segment sequence including at least a first code segment, a second code segment, and a third code segment in sequence, the method comprising:
an act of executing the first code segment;
an act of capturing a first environmental state representing a state of at least a portion of the environment after the first code segment executes;
an act of executing the second code segment;
an act of capturing a second environmental state representing a state of at least a portion of the environment after the second code segment executes;
an act of executing the third code segment a first time;
an act of beginning execution of the third code segment a second time by setting the environment to have the captured second environmental state without re-executing the first code segment.

### Claim 14 (depends on 13)

The method in accordance with claim 13, wherein the method is performed at authoring time.

### Claim 15 (depends on 14)

The method in accordance with claim 14, wherein the method further comprises:
an act of continuing execution of the third code segment the second time until the code segment encounters a halt point;
an act of evaluating a state of the third code segment at the halt point; and
an act of generating a completion list at the halt point as a result of the act of evaluating the state of the third code segment.

### Claim 16 (depends on 13)

The method in accordance with claim 13, wherein the method is performed at deployment time.

### Claim 17 (depends on 16)

The method in accordance with claim 16, wherein the method further comprises:
an act of performing a static analysis of the captured first and second environmental state.

### Claim 18 (depends on 13)

The method in accordance with claim 13, wherein the first environmental state is a full capture of the captured portion of environmental state, wherein the second environment state is also a full capture of the captured portion of the environment state.

### Claim 19 (depends on 13)

The method in accordance with claim 13, wherein the first environmental state is a full capture of the captured portion of environmental state, wherein the act of capturing a second environmental state comprises an act of performing an update capture of the at least the portion of the environmental state after the second code segment completes executing.

### Claim 20

A computer program product comprising one or more computer-readable media having thereon computer-executable instructions that are structured such that, when executed by the one or more processors of a computing system, causes the computing system to execute a dynamic language program sequence in an environment, the dynamic language program segment sequence including a first dynamic language program followed by a second dynamic language program, wherein the act of executing the dynamic language code sequence comprises:
an act of executing the first dynamic language program;
an act of capturing a first environmental state representing a state of at least a portion of the environment after the first dynamic language program executes;
an act of executing the second dynamic language program a first time; and
an act of beginning execution of the second dynamic language program a second time by setting the environment to have the captured first environmental state without re-executing the first dynamic language program;
an act of continuing execution of the second dynamic language program the second time until the second dynamic language program segment encounters a halt point;
an act of evaluating a state of the second dynamic language program at the halt point; and
an act of generating an available symbol set at the halt point as a result of the act of evaluating the state of the second dynamic language program.
