IP Library Granted Patent US 9,465,608
Granted Patent B2
US 9,465,608 · App. 13/842,519 · Granted Oct 11, 2016

Code separation with semantic guarantees

Inventors: Carlos Araya (Saratoga, CA); Mauricio Rojas (Heredia, CR); Iván Sanabria (Cartago, CR)
Assignee: ArtinSoft Corporation
G06F8/76G06F8/427G06F8/447G06F8/456
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,465,608
App. No.
13/842,519
Granted
Oct 11, 2016
Kind
B2
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.

Claims (91)

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.

2. The method of claim 1 , wherein the multiple candidate selected components are transformed by at least one of the following:

wrapping with wrapper code for a target architecture; and

connecting with at least one additional infrastructure element to optimize execution.

3. The method of claim 1 , wherein the architectural template describes candidate components in terms of a software architecture.

4. The method of claim 3 , wherein the software architecture includes any one of the following:

model-view;

model-view-controller; and

model-view-viewmodel.

5. The method of claim 3 , wherein the architectural template describes a cloud infrastructure.

6. The method of claim 5 , wherein the cloud infrastructure includes any one of the following:

Platform as a Service;

Infrastructure as a Service; and

Software as a Service.

7. The method of claim 3 , wherein the architectural template describes either a business architecture or a service oriented architecture.

8. The method of claim 1 , wherein the transformational rules include any one of the following:

component specific rules;

rules specific to one or more candidate components positioned in a sub-tree of the abstract syntax tree;

rules specific to one or more candidate components satisfying a predetermined condition;

business specific rules;

service oriented architecture specific rules; and

rules global to the multiple candidate components.

9. The method of claim 1 , wherein the transformational rules comprise rules that define a plurality of transformations for one or more candidate components of a component type.

10. The method of claim 9 , wherein the plurality of transformations cover a plurality of platforms respectively.

11. The method of claim 1 , wherein the component types of the received architectural template characterize a candidate component according to an optimal placement of the candidate component in the architectural template, and wherein inferring a plurality of candidate components comprises:

marking at least two candidate components in the abstract syntax tree according to a plurality of component types from the architectural template;

defining a distance function between the plurality of component types with parameters comprising predetermined criteria;

performing a repositioning of the at least two candidate components based on a graph reaccomodation algorithm that uses a distance calculation from the distance function to determine a new positioning; and

inferring corresponding component types of the plurality of candidate components based at least on the repositioning of the at least two candidate components.

12. The method of claim 11 , wherein the parameters comprising predetermined criteria include any one of:

component similarity,

component affinity,

an relationship of component types in a target architecture, and

component performance based on component proximity.

13. The method of claim 11 , wherein the architectural template comprises advantages and disadvantages of a platform in a target architecture, and wherein the predetermined criteria include the advantages and disadvantages of a platform in the target architecture.

14. The method of claim 11 , wherein the graph reaccomodation algorithm is a simulated annealing algorithm.

15. The method of claim 11 , further comprising providing a status report for the generating of the code for the target platform.

16. The method of claim 15 , wherein the status report is updated substantively in real time.

17. The method of claim 11 , wherein the component types comprise client, business logic and persistence.

18. The method of claim 1 , wherein the selecting the multiple candidate components includes selecting based on a user input from a user.

19. The method of claim 18 , wherein the user input is received during a code generation in progress.

20. The method of claim 19 , wherein the user input includes a modification to a candidate component repositioned by a graph reaccommodation algorithm.

21. The method of claim 1 , further comprising:

receiving a user input that selects at least one new candidate component from the plurality of candidate components to be transformed;

regenerating a portion of the code based at least on a portion of the abstract syntax tree affected by the user input.

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.

23. The method of claim 22 , wherein the indicia of being associated with a back-end component type includes any one of the following:

component attributes of the identified user interface container class component are solely referenced by business logic;

the identified user interface container class component is in a framework type affirmatively known to be the back-end component type; and

the identified user interface container class component has a similarity to another component in the input file that is known to be the back-end component type.

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.

25. The method of claim 24 , wherein the generated abstract syntax tree is a shared tree.

26. The system of claim 25 , wherein the abstract syntax tree transformer is to generate the at least one transformed component based at least on the input requested from the technician by the software user interface.

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.

Assignments (4)
CONFIRMATORY ASSIGNMENT Recorded Jun 9, 2023
From: MOBILIZE.NET CORPORATION
To: SNOWFLAKE INC.
Reel/Frame 063955/0589 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 30, 2020
From: ARTINSOFT INCORPORATED (B.V.I.) S.A.
To: MOBILIZE.NET CORPORATION
Reel/Frame 053937/0878 →
CORRECTIVE ASSIGNMENT TO CORRECT THE NAME, ADDRESS, ANDCOUNTRY OF INCORPORATION FOR THE ASSIGNEE PREVIOUSLY RECORDED ON REEL 030022 FRAME 0672. ASSIGNOR(S) HEREBY CONFIRMS THE PATENT ASSIGNMENT. Recorded Jul 1, 2020
From: ARAYA, CARLOS; ROJAS, MAURICIO; SANABRIA, IVAN
To: ARTINSOFT INCORPORATED (B.V.I.) S.A.
Reel/Frame 053912/0741 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 15, 2013
From: ARAYA, CARLOS; ROJAS, MAURICIO; SANABRIA, IVAN
To: ARTINSOFT CORPORATION
Reel/Frame 030022/0672 →
Continuity (1)
Related Publication 20140282372A1 · Sep 18, 2014