# US 12,008,353 B2 · Parsing tool for optimizing code for deployment on a serverless platform

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

- Number: US 12,008,353 B2
- Document ID: US12008353B2
- Status: Granted
- Kind: B2
- Application number: 17/823,585
- Filed: 2022-08-31
- Published: 2023-03-16
- Granted: 2024-06-11
- Earliest claimed: 2021-08-31
- Assignees: Cdev, LLC
- Applicants: Cdev, LLC
- Inventors: Daniel Sanchez
- Web page: https://patentgrep.com/patent/US12008353B2

## CPC

- G06F 8/60: Software deployment
- G06F 8/427: {Parsing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer-implemented method that automatically parses an input source code files containing multiple functions to create one or more files, each containing a single-purpose function, for deployment on a serverless computing platform, such as Function-as-a-Service (“FaaS”), is disclosed herein. The method includes receiving an input source code file and creating a mapping table from the input source code file. A first function from the input source code file is mapped and a single-function output file for the first function is generated. The single-function output file is then deployed, for example, on the serverless computing platform.

## Claims

### Claim 1

A computer-implemented method for optimizing a source code file containing a plurality of user-defined functions for deployment on a serverless platform as a plurality of single-function files, the method comprising:
receiving an input source code file;
creating a mapping table from the input source code file, wherein creating the mapping table from the input source code file comprises:
creating a list of symbols from the input source code file;
creating a list of statements from the input source code file;
performing a forward mapping of each symbol in the list of symbols; and
performing a dependency mapping of each statement in the list of statements;
mapping a first function from the input source code file, wherein mapping the first function from the input source code file comprises:
selecting a beginning symbol from the list of symbols;
following a forward path from the selected symbol to a corresponding statement,
wherein the forward path is based on the forward mapping; and
marking the corresponding statement for inclusion;
generating a single-function output file for the first function; and
deploying the single-function output file.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the list of symbols is created using a symbol table, or the list of statements is created using a syntax tree.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein each statement in the list of statements is associated with data stored in memory indicating whether an associated statement is marked for inclusion in the single-function output file.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein at least one of the forward mapping of each symbol and the dependency mapping of each statement is performed using a pointer stored in memory.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein the first symbol in the list of symbols is selected as the beginning symbol or is selected based on an included comment in the input source code file identifying a symbol for selection.

### Claim 6 (depends on 5)

The computer-implemented method of claim 5, wherein the included comment in the input source code file indicates that an associated statement imports external code from an external file.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein generating the single-function output file for the first function comprises:
writing each statement from the list of statements to the single-function output file that has been marked for inclusion,
wherein the statements are written to the single-function output file in the order in which they appear in the input source code file.

### Claim 8

A computing device for optimizing a source code file containing a plurality of user-defined functions for deployment on a serverless platform as a plurality of single-function files, the computing device comprising:
a memory; and
at least one processor configured for:
receiving an input source code file;
creating a mapping table from the input source code file, wherein creating the mapping table from the input source code file comprises:
creating a list of symbols from the input source code file;
creating a list of statements from the input source code file;
performing a forward mapping of each symbol in the list of symbols; and
performing a dependency mapping of each statement in the list of statements;
mapping a first function from the input source code file, wherein mapping the first function from the input source code file comprises:
selecting a beginning symbol from the list of symbols;
following a forward path from the selected symbol to a corresponding statement,
wherein the forward path is based on the forward mapping; and
marking the corresponding statement for inclusion;
generating a single-function output file for the first function; and
deploying the single-function output file.

### Claim 9 (depends on 8)

The computing device of claim 8, wherein the list of symbols is created using a symbol table, or the list of statements is created using a syntax tree.

### Claim 10 (depends on 8)

The computing device of claim 8, wherein each statement in the list of statements is associated with data stored in memory indicating whether an associated statement is marked for inclusion in the single-function output file.

### Claim 11 (depends on 8)

The computing device of claim 8, wherein at least one of the forward mapping of each symbol and the dependency mapping of each statement is performed using a pointer stored in memory.

### Claim 12 (depends on 8)

The computing device of claim 8, wherein the first symbol in the list of symbols is selected as the beginning symbol or is selected based on an included comment in the input source code file identifying a symbol for selection.

### Claim 13 (depends on 12)

The computing device of claim 12, wherein the included comment in the input source code file indicates that an associated statement imports external code from an external file.

### Claim 14 (depends on 13)

The computing device of claim 13, further comprising importing the external file, wherein the imported external file is stored in an archive file, and deploying the archive file to the serverless platform with the single-function output file.

### Claim 15 (depends on 8)

The computing device of claim 8, wherein generating the single-function output file for the first function comprises:
writing each statement from the list of statements to the single-function output file that has been marked for inclusion,
wherein the statements are written to the single-function output file in the order in which they appear in the input source code file.

### Claim 16

A system for optimizing source code for deployment on a function-as-a-service (FaaS) serverless platform, the system comprising:
a computer communicatively coupled to a network, at least one FaaS provider, and at least one FaaS user, wherein the computer is configured to:
receive an input source code file containing a plurality of user-defined functions;
create a mapping table from the input source code file, wherein creating the mapping table from the input source code file comprises:
creating a list of symbols from the input source code file;
creating a list of statements from the input source code file;
performing a forward mapping of each symbol in the list of symbols; and
performing a dependency mapping of each statement in the list of statements;
map a first function from the input source code file, wherein mapping the first function from the input source code file comprises:
selecting a beginning symbol from the list of symbols;
following a forward path from the selected symbol to a corresponding statement,
wherein the forward path is based on the forward mapping; and
marking the corresponding statement for inclusion;
generate a single-function output file for the first function; and
deploy the single-function output file.
