Parsing tool for optimizing code for deployment on a serverless platform
AssigneeCdev, LLC
InventorDaniel Sanchez
Life of this patent
Estimating the term…
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.
Claims16
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.
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.
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.
Dependencies are inferred from the claim text.