Constructing a control flow graph for a software program
AssigneeFujitsu Limited
InventorPraveen K. Murthy
Life of this patent
Estimating the term…
Abstract
A method includes constructing a lambda object-oriented scripting language (λJS) model for a software program written in JavaScript; converting the λJS model to a continuation-passing style (CPS) model for the software program; constructing a control flow graph (CFG) for the software program based on the CPS model; and optimizing the CPS model by merging a sequence of two or more “let” operations. The two or more “let” operations in the CPS model and are generated based on the λJS model, so that they are represented by a single node in the CFG.
Claims13
A method comprising:
- by one or more computing devices,
- constructing a lambda object-oriented scripting language (“λJS”) model for a software program written in object-oriented scripting language;
- converting the λJS model to a continuation-passing style (CPS) model for the software program;
- constructing a control flow graph (CFG) for the software program based on the CPS model;
- and
- optimizing the CPS model of the software program, comprising merging a sequence of two or more “let” operations, the two or more “let” operations in the CPS model and generated based on the λJS model, so that they are represented by a single node in the CFG.
A system comprising:
- a memory comprising instructions executable by one or more processors;
- and
- the one or more processors coupled to the memory and operable to execute the instructions, the one or more processors being operable when executing the instructions to:
- construct a lambda object-oriented scripting language (“λJS”) model for a software program written in object-oriented scripting language;
- convert the λJS model to a continuation-passing style (CPS) model for the software program;
- construct a control flow graph (CFG) for the software program based on the CPS model;
- and
- optimize the CPS model of the software program, comprising merging a sequence of two or more “let” operations so that they are represented by a single node in the CFG, the two or more “let” operations in the CPS model and generated based on the λJS model.
One or more computer-readable non-transitory storage media embodying software operable when executed by one or more computer systems to:
- construct a lambda object-oriented scripting language (“λJS”) model for a software program written in object-oriented scripting language;
- convert the λJS model to a continuation-passing style (CPS) model for the software program;
- construct a control flow graph (CFG) for the software program based on the CPS model;
- and optimize the CPS model of the software program, comprising merging a sequence of two or more “let” operations so that they are represented by a single node in the CFG, the two or more “let” operations in the CPS model and generated based on the λJS model.
A system comprising:
- means for constructing a lambda object-oriented scripting language (“λJS”) model for a software program written in object-oriented scripting language;
- means for converting the λJS model to a continuation-passing style (CPS) model for the software program;
- means for constructing a control flow graph (CFG) for the software program based on the CPS model;
- and
- means for optimizing the CPS model of the software program, comprising means for merging a sequence of two or more “let” operations so that they are represented by a single node in the CFG, the two or more “let” operations in the CPS model and generated based on the λJS model.
Dependencies are inferred from the claim text.