Matching program sections through feature extraction
First Claim
Patent Images
1. A method for matching program sections, comprising:
- organizing, via a processor, a program into blocks based on control flow;
calculating, via the processor, a plurality of block features for each block;
comparing, via the processor, the plurality of block features for each block with other blocks and creating a list of equivalent blocks, the equivalent blocks representing an inlined function; and
transforming, via the processor, the equivalent blocks representing the inlined function into an alternate program by replacing each of the equivalent blocks with a call to a new function created from the equivalent blocks.
3 Assignments
0 Petitions
Accused Products
Abstract
A method includes organizing a program into blocks based on control flow. The method also includes calculating a plurality of features for each block. The method further includes comparing the calculated features for each block with other blocks and creating a list of equivalent blocks. The method also further includes constructing a list of equivalent program sections utilizing the list of equivalent blocks.
18 Citations
18 Claims
-
1. A method for matching program sections, comprising:
-
organizing, via a processor, a program into blocks based on control flow; calculating, via the processor, a plurality of block features for each block; comparing, via the processor, the plurality of block features for each block with other blocks and creating a list of equivalent blocks, the equivalent blocks representing an inlined function; and transforming, via the processor, the equivalent blocks representing the inlined function into an alternate program by replacing each of the equivalent blocks with a call to a new function created from the equivalent blocks. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. One or more computer-readable hardware storage media that match program sections, comprising a plurality of instructions that, when executed by a hardware processor, cause the processor to:
-
transform a program to an intermediate language representation; organize the intermediate language representation into blocks based on control flow; calculate a plurality of block features for each block; compare the plurality of block features for each block with other blocks and create a list of equivalent blocks, the equivalent blocks representing an inlined function; and transform the equivalent blocks representing the inlined function into an alternate program by replacing each of the equivalent blocks with a call to a new function created from the equivalent blocks. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. A system for matching program sections, comprising:
-
a hardware processor to execute processor executable code; and a storage device that stores processor executable code, wherein the processor executable code, when executed by the processor, causes the processor to; organize a program into blocks based on control flow; calculate a plurality of block features for each block; compare the plurality of block features for each block with other blocks and create a list of equivalent blocks, the equivalent blocks representing an inlined function; and transform the equivalent blocks representing the inlined function into an alternate program by replacing each of the equivalent blocks with a call to a new function created from the equivalent blocks.
-
Specification