Recompiling with Generic to Specific Replacement
First Claim
1. A method comprising:
- receiving a set of executable code;
decompiling said set of executable code;
determining a first constant value for a first variable in said executable code;
for each occurrence of said first variable, replacing said first variable with said first constant value to create a first modified set of executable code; and
recompiling said first modified set of executable code to create a second set of executable code.
2 Assignments
0 Petitions
Accused Products
Abstract
Executable code may be recompiled so that generic portions of code may be replaced with specific portions of code. The recompilation may customize executable code for a specific use or configuration, making the code lightweight and executing faster. The replacement mechanism may replace variable names with fixed values, replace conditional branches with only those branches which are known to be executed, and may eliminate executable code portions that are not executed. The replacement mechanism may comprise identifying known values defined in the executable code for variables, and replacing those variables with the constant value. Once the constants are substituted, the code may be analyzed to identify branches that may be evaluated using the constant values. Those branches may be reformed using the constant value and the rest of the conditional code that may not be accessed may be removed.
-
Citations
20 Claims
-
1. A method comprising:
-
receiving a set of executable code; decompiling said set of executable code; determining a first constant value for a first variable in said executable code; for each occurrence of said first variable, replacing said first variable with said first constant value to create a first modified set of executable code; and recompiling said first modified set of executable code to create a second set of executable code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system comprising:
-
a processor; a code analyzer operating on said processor, said code analyzer that; receives a set of executable code and a set of semantic definitions for said executable code; examines said set of semantic definitions to determine a first constant value for a first variable in said executable code; for each occurrence of said first variable, replaces said first variable with said first constant value to create a first modified set of executable code; and recompiles said first modified set of executable code to create a second set of executable code. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A method comprising:
-
receiving a set of executable code, said executable code comprising application code; decompiling said set of executable code; identifying links from said application code to operating system code and incorporating said operating system code into said set of executable code; determining a first constant value for a first variable in said executable code; for each occurrence of said first variable, replacing said first variable with said first constant value to create a first modified set of executable code; and recompiling said first modified set of executable code to create a second set of executable code. - View Dependent Claims (19, 20)
-
Specification