Automatic code reconfiguration based on function and subfunction analysis
AssigneeAurora Labs Ltd.
InventorCarmit Sahar
Life of this patent
Estimating the term…
Abstract
Disclosed herein are techniques for automatically reconfiguring code based on function and subfunction analysis. Techniques include determining, by parsing a code structure representing a plurality of functions, that at least one first function has a threshold degree of complexity; identifying, in response to the determination, a plurality of subfunctions based on the at least one first function, the plurality of subfunctions having a commonality with the at least one first function; and forming a second function by reconfiguring the first function to call at least one of the identified plurality of subfunctions.
Claims17
A non-transitory computer-readable medium including instructions that, when executed by at least one processor, cause the at least one processor to perform operations for automatically reconfiguring code based on function and subfunction analysis, the operations comprising:
- receiving an initial code file;
- determining, by parsing a code structure representing the initial code file and a plurality of functions, that at least one first function has a threshold degree of complexity determined at least in part by a machine learning model;
- identifying, in response to the determination that the at least one first function has the threshold degree of complexity, a plurality of subfunctions based on the at least one first function, the plurality of subfunctions having a commonality with the at least one first function;
- forming a second function by reconfiguring the first function to call at least one of the identified plurality of subfunctions;
- updating the initial code file to include the second function;
- comparing at least one of a size or complexity of a function associated with the initial code file to at least one of a size or complexity of a function associated with the updated initial code file;
- and
- based on the comparison, updating the machine learning model.
A computer-implemented method for automatically reconfiguring code based on function and subfunction analysis, comprising:
- receiving an initial code file;
- determining, by parsing a code structure representing the initial code file and a plurality of functions, that at least one first function has a threshold degree of complexity determined at least in part by a machine learning model;
- identifying, in response to the determination that the at least one first function has the threshold degree of complexity, a plurality of subfunctions based on the at least one first function, the plurality of subfunctions having a commonality with the at least one first function;
- forming a second function by reconfiguring the first function to call at least one of the identified plurality of subfunctions;
- updating the initial code file to include the second function;
- comparing at least one of a size or complexity of a function associated with the initial code file to at least one of a size or complexity of a function associated with the updated initial code file;
- and
- based on the comparison, updating the machine learning model.
Dependencies are inferred from the claim text.