-
Notifications
You must be signed in to change notification settings - Fork 49
Description
There are many graph structures in static analysis which are useful to preserve in results. For example:
- A value flow graph
- Show multiple values contributing to a value
- A call graph
- Thanks to the graph structure, we can expand callsites to see more information about their side effects
Several of the existing properties of result could be abstracted and generalized in this manner:
- codeFlows property
- stacks property
- relatedLocations property
Note that all of these have properties in common: location, message, These would be the vertices in the graph. (in the case of stacks, the stackFrame objects are the vertices and the stacks object is providing some of the graph edges/structure).
This would also allow the format to support other information which generally fits into a graph.
Having codeflows and stacks properties show the desire for this generalization/extensibility. What other similar properties will be wanted in the future that are not currently specified?
Each vertex would need some tag to identify what it means (i.e. this vertex is a stackFrame, this vertex is a value flow at an addition) and how vertices are expected to fit together (a stackFrame cannot flow into an addition, these should not appear in the same graph).
Tools doing their own graphs (not specified in SARIF) could still have a graph of vertices with a location and a message and their own meaning.