×

Machine-based normalization of machine instructions

  • US 10,521,209 B2
  • Filed: 05/11/2016
  • Issued: 12/31/2019
  • Est. Priority Date: 05/12/2015
  • Status: Active Grant
First Claim
Patent Images

1. A method, comprising:

  • accessing, by a processor, a first source code comprising functions;

    mapping, by the processor, ones of the functions to a corresponding dependency-ordered behavior representation generated from a control-flow graph representation by rearranging graph edges from control flow dependencies to data state dependencies comprising a set of nodes, the mapping further comprising, for ones of the nodes;

    mapping an input of the function to an input variable of the node;

    mapping an output of the function to an output variable of the node, and mapping an operation of the function to a transformation of the node and wherein the operation of the function transforms the input, of the function to the output of the function; and

    identifying, by the processor, a path comprising a number of path nodes, the path nodes comprise nodes having an input common with the output of another node;

    wherein at least one path node is a terminal node having the output variable mapped to at least one of the functions providing an output of the first source code;

    wherein at least one path node is an intermediate node having the input variable in common with the output variable of at least one of the number of nodes;

    transforming, by the processor, the path nodes into a normalized language-agnostic representation that preserves data flow encoded within the program and provides assurances that the data flow are correct and complete comprising a plurality of components; and

    regenerating, from the plurality of components, the normalized language-agnostic representation into a programming language alternative to that of the first source code or into an enhanced version of the first source code, wherein the mapping further comprises;

    identifying a first variable name in the first source code having a first semantic meaning and mapped to a first path node;

    identifying a second variable name in the first source code having a second semantic meaning and mapped to a second path node;

    upon determining, by the processor, that the output of the first path node is common with the input of the second path node, determining a new semantic meaning between the first semantic meaning and the second semantic meaning, andwherein the mapping further comprises renaming one of the first variable name or the second variable name that is associated with the first or second semantic meaning to the other of the first variable name or the second variable name that is associated with the determined new semantic meaning.

View all claims
  • 0 Assignments
Timeline View
Assignment View
    ×
    ×