Patent Document ID: 9747087
Application ID: 14604973
Patent Flag: 1

Claim One:
1. A variable inference system for a software program, comprising: an input device, being configured to input the software program; a processor connected to the input device, being configured to divide the software program into a plurality of basic blocks comprising a plurality of first basic blocks and a second basic block, calculate a first variable type output corresponding to an unknown variable for each of the plurality of first basic blocks, calculate a second variable type input corresponding to the unknown variable for the second basic block according to the first variable type outputs, calculate a second variable type generation corresponding to the unknown variable for the second basic block when the second basic block comprises a primitive instruction corresponding to the unknown variable, calculate a second variable type kill corresponding to the unknown variable for the second basic block, and calculate a second variable type output corresponding to the unknown variable for the second basic block according to the second variable type input, the second variable type generation and the second variable type kill; and a storage device connected to the processor, being configured to store the first variable type output and the second variable type output.