# US 2020/0004513 A1 · Generating closures from abstract representation of source code

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

- Number: US 2020/0004513 A1
- Document ID: US20200004513A1
- Status: Published application
- Kind: A1
- Application number: 16/570,335
- Filed: 2019-09-13
- Published: 2020-01-02
- Earliest claimed: 2018-03-16
- Assignees: Capital One Services, LLC
- Applicants: Capital One Services, LLC
- Inventors: Behdad FORGHANI
- Web page: https://patentgrep.com/patent/US20200004513A1

## CPC

- G06F 8/427: {Parsing}
- G06F 8/4441: {Reducing the execution time required by the program code}
- G06F 8/41: Compilation
- G06F 8/37: {Compiler construction; Parser generation}
- G06F 8/42: {Syntactic analysis}
- G06F 8/425: {Lexical analysis}
- G06F 8/436: {Semantic checking}
- G06F 8/443: {Optimisation}
- G06F 40/154: Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A device may receive source code and identify, based on the source code, an abstract syntax tree representing an abstract syntactic structure of the source code. Based on the abstract syntax tree, the device may identify a closure, the closure implementing a function based on at least a portion of the abstract syntax tree. In addition, the device may perform an action based on the closure.

## Claims

### Claim 1

A method comprising:
identifying, by one or more devices, source code;
identifying, by the one or more devices, a programming language of the source code; and
generating, by one or more devices and based on the programming language of the source code, executable code that does not require compilation of the executable code into a separate intermediary or binary file.

### Claim 2 (depends on 1)

The method of claim 1, wherein the executable code is in the programming language of the source code.

### Claim 3 (depends on 1)

The method of claim 1,
wherein the programming language of the source code is a first programming language, and
wherein executable code is in a second programming language, and
wherein the second programming language is different from the first programming language.

### Claim 4 (depends on 1)

The method of claim 1, wherein the executable code is a precompiled closure.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
storing the executable code in a memory of a device, of the one or more devices, to execute one or more closures of the executable code.

### Claim 6 (depends on 1)

The method of claim 1, wherein the executable code is generated using a code generation platform that is implemented in multiple services across a cloud deployment.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
identifying an operand in the executable code; and
identifying a template closure based on the operand,
wherein generating the executable code comprises:
generating the executable code based on the template closure and the programming language of the source code.

### Claim 8

A system, comprising:
one or more memories; and
one or more processors communicatively coupled to the one or more memories, configured to:
identify, by one or more devices, source code;
identify a programming language of the source code; and
generate, by one or more devices and based on the programming language of the source code, executable code that does not require compilation of the executable code into a separate intermediary or binary file.

### Claim 9 (depends on 8)

The system of claim 8, wherein the executable code is in the programming language of the source code.

### Claim 10 (depends on 8)

The system of claim 8,
wherein the programming language of the source code is a first programming language, and
wherein executable code is in a second programming language, and
wherein the second programming language is different from the first programming language.

### Claim 11 (depends on 8)

The system of claim 8, wherein the executable code is a precompiled closure.

### Claim 12 (depends on 8)

The system of claim 8, wherein the one or more processors are further configured to:
store the executable code in a memory of a device, of the one or more devices, to execute one or more closures of the executable code.

### Claim 13 (depends on 8)

The system of claim 8, wherein the executable code is generated using a code generation platform that is implemented in multiple services across a cloud deployment.

### Claim 14 (depends on 8)

The system of claim 8, wherein the one or more processors are further configured to:
identify an operand in the executable code; and
identify a template closure based on the operand,
wherein, when generating the executable code, the one or more processors are configured to:
generate the executable code based on the template closure and the programming language of the source code.

### Claim 15

A non-transitory computer-readable medium storing instructions, the instructions comprising:
one or more instructions that, when executed by one or more processors, cause the one or more processors to:
identify, by one or more devices, source code;
identify a programming language of the source code; and
generate, by one or more devices and based on the programming language of the source code, executable code that does not require compilation of the executable code into a separate intermediary or binary file.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the executable code is in the programming language of the source code.

### Claim 17 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the executable code is a precompiled closure.

### Claim 18 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the one or more instructions, when executed by the one or more processors, further cause the one or more processors to:
store the executable code in a memory of a device, of the one or more devices, to execute one or more closures of the executable code.

### Claim 19 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the executable code is generated using a code generation platform that is implemented in multiple services across a cloud deployment.

### Claim 20 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the one or more instructions, when executed by the one or more processors, further cause the one or more processors to:
identify an operand in the executable code; and
identify a template closure based on the operand,
wherein the one or more instructions to generating the executable code, cause the one or more processors to:
generate the executable code based on the template closure and the programming language of the source code.
