Generation of annotated call graphs
AssigneeAmazon Technologies, Inc.
InventorsIoannis Agadakos, Nicolas Leandro Rosner
Life of this patent
Estimating the term…
Abstract
Described are example systems and methods generally directed to processing program information associated with a computer program to generate an annotated call graph. The annotated call graph may include nodes that represent functions included in the program and edges that represent function calls, relationships, and/or other dependencies between the functions included in the computer program, as well as annotations associated with one or more edges and/or one or more nodes of the call graph. Each annotation may correspond to an edge or node of the call graph and may include a score that represents a strength and/or likelihood of certain features and/or characteristics of the associated edge and/or node.
Claims20
A computer-implemented method, comprising:
- generating a plurality of training datasets that include a first plurality of program information associated with a plurality of programs;
- accessing the plurality of training datasets to train a machine learning model to determine annotations for a call graph;
- subsequent to training of the machine learning model, receiving, by the trained machine learning model, a second plurality of program information associated with a program to be analyzed by the trained machine learning model, wherein the second plurality of program information includes a static call graph having a plurality of edges and a plurality of nodes that represents the program;
- processing, using the trained machine learning model, the second plurality of program information to determine a plurality of function embeddings that represent a plurality of functions included in the program and encode lexical information, static information, and dynamic information associated with the program and extracted from the second plurality of program information;
- processing, using the trained machine learning model, the plurality of function embeddings to generate a plurality of annotations for the static call graph, wherein the plurality of annotations includes a first annotation that indicates at least one of a location of a first data object, a source node associated with a second data object, or a sink node associated with a third data object;
- and
- associating the plurality of annotations with at least a portion of the plurality of edges and the plurality of nodes to generate an annotated call graph.
A computing system, comprising:
- one or more processors;
- and
- a memory storing program instructions that, when executed by the one or more processors, cause the one or more processors to at least:
- receive a plurality of program information associated with a program being analyzed by the computing system;
- and
- process, using a trained model, the plurality of program information to determine a plurality of annotations for a call graph representing the program, wherein:
- the plurality of annotations includes a first annotation that indicates at least one of a location of a first data object, a source node associated with a second data object, or a sink node associated with a third data object;
- and
- processing the plurality of program information to determine the plurality of annotations includes:
- processing the plurality of program information using a language model to generate a plurality of embeddings to represent the plurality of program information;
- processing the plurality of embeddings using a summarization model to generate a plurality of function embeddings that represent functions included in the program;
- and
- processing the plurality of function embeddings using a graphical neural network (GNN) to determine the plurality of annotations for the call graph.
A computer-implemented method, comprising:
- training a machine learning model to receive a first plurality of program information associated with a program being analyzed and generate an annotated call graph for the program, wherein the annotated call graph includes a plurality of annotations associated with edges of the call graph that represents a likelihood that each corresponding edge is performed;
- identifying an analysis task to be performed by the machine learning model in connection with program analysis, wherein the analysis task includes generating annotations that include an indication of at least one of a location of a first data object, a source node associated with a second data object, or a sink node associated with a third data object;
- generating, based at least in part on the analysis task, a plurality of training datasets to fine-tune the machine learning model to perform the analysis task;
- fine-tuning the machine learning model using the plurality of training datasets to configure the machine learning model to perform the analysis task;
- and
- deploying the fine-tuned machine learning model.
Dependencies are inferred from the claim text.