Generic Stringly typed Graph DataType
Create graphs which have a list of strings as nodes and compute the diff between them.
Use match_graphs to get the mapping (isomorphism) between the nodes.
use gsgdt::*; let label1: String = "bb0__0_3".into(); let label2: String = "bb0__1_3".into(); let style: NodeStyle = Default::default(); let nodes = vec![ Node::from_list( vec!["_1 = const 1_i32".into(), "_2 = const 2_i32".into()], label1.clone(), "0".into(), style.clone(), ), Node::from_list( vec!["return".into()], label2.clone(), "1".into(), style.clone(), ), ]; let g = Graph::new( "Mir_0_3".into(), nodes, vec![Edge::new(label1, label2, "return".into())], );
A wrapper around Graph to assist diffing.
A directed graph edge
EdgeStyle defines some style of Edge
Graph represents a directed graph as a list of nodes and list of edges.
A Match from a node in the first graph to the second.
A collection of graphs.
A graph node
NodeStyle defines some style of Node
Enum describing the type of a match.
Matches both graphs and returns the mapping of nodes from g1 to g2.
Returns a MultiGraph containing the diff of the two graphs. To be visualized with dot.