Patent ID: 9411581
Filing Date: 2016-08-09
CPC Classification: G06F

Claim Text:
1. A method of converting a precompiled source code adapted to execute in a source environment to a target code adapted to execute in a target environment by a code migration process, comprising: receiving a precompiled source code of an application, wherein said precompiled source code is adapted to execute in a source environment; setting a target environment for converting said precompiled source code; providing a plurality of mapping expressions, wherein each mapping expression associates one of a plurality of abstract syntax tree (AST) segment patterns with one of a plurality of replacement code templates defining target code segments suitable for execution in said target environment; building an abstract syntax tree (AST) of said precompiled source code; generating a document object model (DOM) representing types and attributes of a plurality of objects of said application, wherein said plurality of objects are extracted using said AST and environment components of said source environment which are extracted from the source code; identifying a match between a first group of said plurality of AST segment patterns and a plurality of AST segments of said AST based on said types and attributes of said plurality of objects to identify a second group of said plurality of replacement code templates, wherein said plurality of AST segments are associated with a plurality of source code segments of said precompiled source code; and performing a code migration process of said precompiled source code to a precompiled migrated code in said target environment using said second group, wherein said precompiled migrated code is adapted to be compiled into said application.