# US 2021/0286600 A1 · Function summarization via type inference

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

- Number: US 2021/0286600 A1
- Document ID: US20210286600A1
- Status: Published application
- Kind: A1
- Application number: 16/817,550
- Filed: 2020-03-12
- Published: 2021-09-16
- Earliest claimed: 2020-03-12
- Assignees: Raytheon Company
- Applicants: Raytheon Company
- Inventors: Andrew Ralph Calvano; Timothy Bryant
- Web page: https://patentgrep.com/patent/US20210286600A1

## CPC

- G06F 8/437: {Type checking}
- G06F 8/75: Structural analysis for program understanding
- G06F 11/3604: Analysis of software for verifying properties of programs (testing of software G06F11/3668)
- G06F 16/24: Querying
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for function summarization. In some embodiments, the method includes: identifying a basic function called by a first function, the first function having a signature; determining a first type, the first type being a type of an argument of the basic function or a type of a return value of the basic function; and propagating the first type, to determine a first portion of the signature of the first function.

## Claims

### Claim 1

A method for function summarization, the method comprising:
Identifying, from object code, a basic function called by a first function, the first function having a signature;
determining a first type, the first type being a type of an argument of the basic function or a type of a return value of the basic function; and
propagating the first type, to determine a first portion of the signature of the first function.

### Claim 2 (depends on 1)

The method of claim 1, wherein the propagating of the first type comprises propagating the first type based on object code.

### Claim 3 (depends on 1)

The method of claim 1, further comprising determining, based on the portion of the signature of the first function, a summary of the first function.

### Claim 4 (depends on 1)

The method of claim 1, comprising determining the entire signature of the first function, the determining of the entire signature of the first function comprising the propagating of the first type, to determine the first portion of the signature of the first function.

### Claim 5 (depends on 4)

The method of claim 4, further comprising determining, based on the entire signature of the first function, a summary of the first function,
wherein the determining of the summary comprises looking up the entire signature in a summarization database.

### Claim 6 (depends on 1)

The method of claim 1, wherein the basic function is a library function.

### Claim 7 (depends on 1)

The method of claim 1, wherein the first type is a type of an argument of the basic function.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
determining a second type, the second type being a type of a return variable of the basic function; and
propagating the second type, to determine a second portion of the signature of the first function.

### Claim 9 (depends on 8)

The method of claim 8, wherein:
the propagating of the first type comprises propagating the first type backward, and
the first portion of the signature comprises a type of an argument of the first function.

### Claim 10 (depends on 8)

The method of claim 8, wherein:
the propagating of the second type comprises propagating the second type forward, and
the second portion of the signature comprises a type of a return value of the first function.

### Claim 11 (depends on 10)

The method of claim 10, wherein:
the propagating of the first type further comprises propagating the first type forward, and
the first portion of the signature further comprises a type of a return value of the first function.

### Claim 12 (depends on 11)

The method of claim 11, wherein:
the propagating of the second type further comprises propagating the first type backward, and
the second portion of the signature further comprises a type of an argument of the first function.

### Claim 13 (depends on 11)

The method of claim 11, wherein the combination of the first portion of the signature and the second portion of the signature is the entire signature.

### Claim 14 (depends on 1)

The method of claim 1, wherein the first portion of the signature is the entire signature.

### Claim 15 (depends on 1)

The method of claim 1, further comprising:
identifying the first function as a function called by a second function;
determining a second type, the second type being a type of an argument of the first function or a type of a return value of the first function; and
propagating the second type, to determine a first portion of the signature of the second function.

### Claim 16 (depends on 15)

The method of claim 15, further comprising determining, based on the portion of the signature of the second function, a summary of the second function.

### Claim 17 (depends on 15)

The method of claim 15, comprising determining the entire signature of the second function, the determining of the entire signature of the second function comprising the propagating of the second type, to determine the first portion of the signature of the second function.

### Claim 18

A system for function summarization, the system comprising a processing circuit and a memory, the memory storing instructions that, when executed by the processing circuit, cause the processing circuit to:
Identify, from object code, a basic function called by a first function, the first function having a signature;
determine a first type, the first type being a type of an argument of the basic function or a type of a return value of the basic function; and
propagate the first type, to determine a first portion of the signature of the first function.

### Claim 19 (depends on 18)

The system of claim 18, wherein the propagating of the first type comprises propagating the first type based on object code.

### Claim 20 (depends on 19)

The system of claim 19, comprising determining the entire signature of the first function; and further comprising determining the summary of the first function by looking up the entire signature in a summarization database,
the determining of the entire signature of the first function comprising the propagating of the first type, to determine the first portion of the signature of the first function.
