Patent ID: 11900250
Assignee: VISA INTERNATIONAL SERVICE ASSOCIATION
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A method comprising:
receiving a plurality of execution traces of a program, each execution trace comprising a plurality of variable values, and wherein each execution trace of the program includes a semantic label describing a processing function of the program;
encoding, by a first recurrent neural network, the plurality of variable values to generate a plurality of program states for each execution trace;
determining, by a bi-directional recurrent neural network, a reduced set of program states for each execution trace from the plurality of program states,
wherein determining the reduced set of program states for each execution trace from the plurality of program states comprises:
computing a forward sequence from the plurality of program states;
computing a backward sequence from the plurality of program states;
for each program state in the plurality of program states:
determining a forward context vector from the forward sequence;
determining a backward context vector from the backward sequence;
applying a multi-layer perceptron to predict a necessity of each program state;
and
determining, based on a result of the multi-layer perceptron,

whether to include the program state in the reduced set of program states;
encoding, by a second recurrent neural network, the reduced set of program states to generate a plurality of executions for the program;
pooling the plurality of executions to generate a program embedding;
predicting semantics of the program using the program embedding in order to classify the program, wherein the predicted semantics include one or more semantic labels; and
using the predicted semantics of the program to perform a compiler optimization task, wherein the method is optimized to minimize a cross-entropy loss and minimize a number of program states in the reduced set of program states.