Code separation with semantic guarantees
First Claim
1. A method to perform a software application transformation comprising:
- receiving at least one input file of the software application in at least one programming language, wherein the at least one programming language is represented in at least one grammar;
receiving an architectural template of a target platform for executing code that results from transformation of the software application, wherein the architectural template specifies at least one component type;
generating a set of transformation rules based at least on the received architectural template for the target platform;
generating an annotated abstract syntax tree from the at least one input file, wherein the annotations in the annotated abstract syntax tree include the set of transformation rules generated from the received architectural template of the target platform and one or more additional transformational rules that are unrelated to not generated from the received architectural template of the target platform;
inferring a plurality of candidate components from the annotated abstract syntax tree based at least on the at least one component type of the received architectural template;
selecting multiple candidate components of the plurality of candidate components to be transformed; and
generating the code for the target platform by traversing the abstract syntax tree to restructure the multiple candidate components into separate component types.
4 Assignments
0 Petitions
Accused Products
Abstract
Techniques to perform code separation with semantic guarantees are described. When porting a software application to a different target architecture and potentially to a different set of platforms and programming languages, application functionality will change based at least to accommodate architectural differences. However, business logic should be guaranteed to be semantically preserved, efficiency optimized to the platform benefits and limitations. Code separation identifies candidate components, associates the candidate components with a component classification or type, and automates the determining of which of the candidate components are to be associated with various portions of the target architecture. Automated code separation may include various inference algorithms to determine which components are to be associated with a component type. Also described are various use cases for code separation.
-
Citations
28 Claims
-
1. A method to perform a software application transformation comprising:
-
receiving at least one input file of the software application in at least one programming language, wherein the at least one programming language is represented in at least one grammar; receiving an architectural template of a target platform for executing code that results from transformation of the software application, wherein the architectural template specifies at least one component type; generating a set of transformation rules based at least on the received architectural template for the target platform; generating an annotated abstract syntax tree from the at least one input file, wherein the annotations in the annotated abstract syntax tree include the set of transformation rules generated from the received architectural template of the target platform and one or more additional transformational rules that are unrelated to not generated from the received architectural template of the target platform; inferring a plurality of candidate components from the annotated abstract syntax tree based at least on the at least one component type of the received architectural template; selecting multiple candidate components of the plurality of candidate components to be transformed; and generating the code for the target platform by traversing the abstract syntax tree to restructure the multiple candidate components into separate component types. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
-
-
22. A method to perform a software application transformation comprising:
-
receiving at least one abstract syntax tree comprising semantic and syntactic elements of a source code of a software application, the semantic and syntactic elements representing an application framework that includes a set of user interface container classes; receiving an architectural template specifying a front-end component type and a back-end component type; identifying a plurality of components in an input file of a software application as that are user interface container class components by traversing the one or more abstract syntax trees and typing the plurality of components as having front-end component types; and for each identified user interface container class component; creating an empty respective back-end component set, identifying the identified user interface container class component as a particular user interface container class component and initially typing the identified user interface container class component as having a particular front-end component type, and adding the identified user interface container class component to the empty respective back-end component set, and changing the particular front-end component type to a back-end component type in response to determining that the identified user interface container class component has one or more indicia of being associated with the back-end component type. - View Dependent Claims (23)
-
-
24. A method to perform a software application transformation comprising:
-
receiving at least one input file of the software application in a programming language, the programming language being represented in at least one grammar; receiving an architectural template of a target platform, wherein the architectural template comprises at least one component type; generating a first set of transformational rules based on the at least one component type of the received architectural template, the first set of transformational rules including a transformational rule for converting a component of the software application into a transformed component; generating an annotated abstract syntax tree from the at least one input file and the first set of transformational rules that are generated based on the at least one component type of the received architectural template of the target platform; generating a second set of transformational rules; modifying the generated annotated abstract syntax tree based on the generated second set of transformational rules. - View Dependent Claims (25, 26)
-
-
27. A system to perform a software application transformation comprising:
-
a processor; memory, communicatively coupled to the processor, the memory storing elements executable by the one or more processors, the elements comprising; a software user interface resident to specify source code files of a software application, to specify one or more grammars, to specify a target architecture, and to request an input from a technician; a transformation rules generator to generate transformation rules based at least on the specified target architecture, wherein the specified target architecture comprises at least one component type; an abstract syntax tree generator to generate an annotated abstract syntax tree based on at least one specified source code file, at least one specified grammar, and at least one transformation rule that is generated based at least on the specified target architecture; a component recommendation engine to identify candidate components according to the at least one component type of the specified target architecture; and an abstract syntax tree transformer to generate at least one transformed component from one or more of the candidate components.
-
-
28. A computing system to perform a software application transformation, comprising:
-
a processor; memory, communicatively coupled to the processor containing computer readable instructions to perform acts comprising; receiving at least one source file of an software application in at least one programming language, wherein the at least one programming language is represented in at least one grammar; receiving an architectural template of a target platform, wherein the architectural template specifies at least one component type; generating a set of transformation rules for transforming components of the software application into code for the target platform based at least on the received architectural template of the target platform; generating an annotated abstract syntax tree from the at least one source file, wherein the annotations in the annotated abstract syntax tree include the set of generated transformation rules that are generated based at least one the received architectural template of the target platform and one or more additional transformational rules, the annotated abstract syntax tree for transforming components of the software application into code for the target platform, the one or more additional transformation rules being unrelated to the received architectural template; inferring a plurality of candidate components from the annotated abstract syntax tree based at least on the at least one component type of the received architectural template; selecting multiple candidate components to be transformed from the plurality of candidate components; and generating the code for the target platform by traversing the abstract syntax tree wherein, the multiple selected candidate components are separated into separate components, and wrapped with wrapper code for the target platform, and connected with at least one additional infrastructure element to optimize execution of the code.
-
Specification