# US 2021/0064510 A1 · Scalable incremental analysis using caller and callee summaries

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

- Number: US 2021/0064510 A1
- Document ID: US20210064510A1
- Status: Published application
- Kind: A1
- Application number: 17/037,285
- Filed: 2020-09-29
- Published: 2021-03-04
- Earliest claimed: 2019-01-22
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Padmanabhan Krishnan; Rebecca Jane O'Donoghue; Nicholas John Allen; Yi Lu
- Web page: https://patentgrep.com/patent/US20210064510A1

## CPC

- G06F 11/3604: Analysis of software for verifying properties of programs (testing of software G06F11/3668)
- G06F 11/3612: {by runtime analysis (performance monitoring G06F11/3466)}
- G06F 21/57: Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06F 21/577: {Assessing vulnerabilities and evaluating computer system security}
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method may include generating, by performing a full analysis of code and for each component of the code, summaries including: (i) a forward summary including a forward flow and (ii) a backward summary including a backward flow, obtaining a modification to a modified component, determining that one of the summaries for the modified component is invalid, and in response to determining that a summary for the modified component is invalid: obtaining the forward flow from the forward summary of the modified component, obtaining the backward flow from the backward summary of the modified component, generating a local flow by performing an incremental analysis of the modified component using the forward flow of the modified component and the backward flow of the modified component, and detecting a defect in the code using the forward flow of the modified component, the local flow, and the backward flow of the modified component.

## Claims

### Claim 1

A method, comprising:
generating, by performing a full analysis of code and for each of a plurality of components of the code, a plurality of summaries comprising: (i) a forward summary comprising a forward flow and (ii) a backward summary comprising a backward flow, wherein the backward flow of the backward summary comprises a backward local parameter and a backward external parameter, and wherein the backward local parameter flows, during execution of the code, to the backward external parameter;
obtaining a first modification to a modified component of the plurality of components;
determining that one of the plurality of summaries for the modified component is invalid; and
in response to determining that one of the plurality of summaries for the modified component is invalid:
obtaining the forward flow from the forward summary of the modified component;
obtaining the backward flow from the backward summary of the modified component;
generating a local flow by performing an incremental analysis of the modified component using the forward flow of the modified component and the backward flow of the modified component; and
detecting a defect in the code using the forward flow of the modified component, the local flow, and the backward flow of the modified component.

### Claim 2 (depends on 1)

The method of claim 1,
wherein the full analysis is performed using a target predicate,
wherein the forward flow of the forward summary comprises a forward external parameter and a forward local parameter, and
wherein the forward external parameter satisfies the target predicate.

### Claim 3 (depends on 2)

The method of claim 2, wherein determining that one of the plurality of summaries for the modified component is invalid comprises determining that the first modification modifies a statement that accesses a first parameter of the summary.

### Claim 4 (depends on 3)

The method of claim 3,
wherein the first parameter comprises a target predicate status indicating whether the first parameter satisfies the target predicate,
wherein the target predicate status indicates, after performing the full analysis, that the first parameter satisfies the target predicate, and
wherein the target predicate status indicates, after performing the incremental analysis, that the first parameter does not satisfy the target predicate.

### Claim 5 (depends on 2)

The method of claim 2, further comprising:
generating a target flow comprising the forward flow of the modified component, the local flow, and the backward flow of the modified component;
obtaining a second modification to the modified component; and
determining that the second modification corrects the defect by invalidating the target flow.

### Claim 6 (depends on 2)

The method of claim 2,
wherein the full analysis is a taint analysis,
wherein the forward external parameter flows, during execution of the code, to the forward local parameter, and
wherein the backward external parameter flows to a function that accesses a security-sensitive resource of a computer system.

### Claim 7 (depends on 2)

The method of claim 2,
wherein the full analysis is an escape analysis,
wherein the forward local parameter flows, during execution of the code, to the forward external parameter,
wherein the backward external parameter flows, during execution of the code, to the backward local parameter, and
wherein the backward external parameter receives sensitive data from a function with elevated access privileges.

### Claim 8

A system, comprising:
a memory coupled to a computer processor;
a repository configured to store code comprising a plurality of components each comprising a plurality of summaries comprising (i) a forward summary comprising a forward flow and (ii) a backward summary comprising a backward flow, wherein the backward flow of the backward summary comprises a backward local parameter and a backward external parameter, and wherein the backward local parameter flows, during execution of the code, to the backward external parameter; and
a code analyzer, executing on the computer processor and using the memory, configured to:
generate the plurality of summaries for each of the plurality of components by performing a full analysis of the code,
obtain a first modification to a modified component of the plurality of components,
determine that one of the plurality of summaries for the modified component is invalid, and
in response to determining that one of the plurality of summaries for the modified component is invalid:
obtain the forward flow from the forward summary of the modified component,
obtain the backward flow from the backward summary of the modified component,
generate a local flow by performing an incremental analysis of the modified component using the forward flow of the modified component and the backward flow of the modified component, and
detect a defect in the code using the forward flow of the modified component, the local flow, and the backward flow of the modified component.

### Claim 9 (depends on 8)

The system of claim 8,
wherein the full analysis is performed using a target predicate,
wherein the forward flow of the forward summary comprises a forward external parameter and a forward local parameter, and
wherein the forward external parameter satisfies the target predicate.

### Claim 10 (depends on 9)

The system of claim 9, wherein the code analyzer is further configured to determine that one of the plurality of summaries for the modified component is invalid by:
determining that the first modification modifies a statement that accesses a first parameter of the summary.

### Claim 11 (depends on 10)

The system of claim 10,
wherein the first parameter comprises a target predicate status indicating whether the first parameter satisfies the target predicate,
wherein the target predicate status indicates, after performing the full analysis, that the first parameter satisfies the target predicate, and
wherein the target predicate status indicates, after performing the incremental analysis, that the first parameter does not satisfy the target predicate.

### Claim 12 (depends on 10)

The system of claim 10, wherein the code analyzer is further configured to:
generate a target flow comprising the forward flow of the modified component, the local flow, and the backward flow of the modified component;
obtain a second modification to the modified component; and
determine that the second modification corrects the defect by invalidating the target flow.

### Claim 13 (depends on 9)

The system of claim 9,
wherein the full analysis is a taint analysis,
wherein the forward external parameter flows, during execution of the code, to the forward local parameter, and
wherein the backward external parameter flows to a function that accesses a security-sensitive resource of a computer system.

### Claim 14 (depends on 9)

The system of claim 9,
wherein the full analysis is an escape analysis,
wherein the forward local parameter flows, during execution of the code, to the forward external parameter,
wherein the backward external parameter flows, during execution of the code, to the backward local parameter, and
wherein the backward external parameter receives sensitive data from a function with elevated access privileges.

### Claim 15

A non-transitory computer readable medium comprising instructions that, when executed by a computer processor, perform:
generating, by performing a full analysis of code and for each of a plurality of components of the code, a plurality of summaries comprising (i) a forward summary comprising a forward flow and (ii) a backward summary comprising a backward flow, wherein the backward flow of the backward summary comprises a backward local parameter and a backward external parameter, and wherein the backward local parameter flows, during execution of the code, to the backward external parameter;
obtaining a first modification to a modified component of the plurality of components;
determining that one of the plurality of summaries for the modified component is invalid; and
in response to determining that one of the plurality of summaries for the modified component is invalid:
obtaining the forward flow from the forward summary of the modified component;
obtaining the backward flow from the backward summary of the modified component;
generating a local flow by performing an incremental analysis of the modified component using the forward flow of the modified component and the backward flow of the modified component; and
detecting a defect in the code using the forward flow of the modified component, the local flow, and the backward flow of the modified component.

### Claim 16 (depends on 15)

The non-transitory computer readable medium of claim 15,
wherein the full analysis is performed using a target predicate,
wherein the forward flow of the forward summary comprises a forward external parameter and a forward local parameter, and
wherein the forward external parameter satisfies the target predicate.

### Claim 17 (depends on 16)

The non-transitory computer readable medium of claim 16, wherein determining that one of the plurality of summaries for the modified component is invalid comprises determining that the first modification modifies a statement that accesses a first parameter of the summary.

### Claim 18 (depends on 17)

The non-transitory computer readable medium of claim 17,
wherein the first parameter comprises a target predicate status indicating whether the first parameter satisfies the target predicate,
wherein the target predicate status indicates, after performing the full analysis, that the first parameter satisfies the target predicate, and
wherein the target predicate status indicates, after performing the incremental analysis, that the first parameter does not satisfy the target predicate.

### Claim 19 (depends on 16)

The non-transitory computer readable medium of claim 16, further comprising instructions that perform:
generating a target flow comprising the forward flow of the modified component, the local flow, and the backward flow of the modified component;
obtaining a second modification to the modified component; and
determining that the second modification corrects the defect by invalidating the target flow.

### Claim 20 (depends on 16)

The non-transitory computer readable medium of claim 16,
wherein the full analysis is a taint analysis,
wherein the forward external parameter flows, during execution of the code, to the forward local parameter, and
wherein the backward external parameter flows to a function that accesses a security-sensitive resource of a computer system.
