MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / get_lib_call_graph

Function get_lib_call_graph

src/analysis/callgraph.rs:151–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149}
150
151pub fn get_lib_call_graph() -> &'static CallGraph {
152 static GRAPH: OnceCell<CallGraph> = OnceCell::new();
153 GRAPH.get_or_init(|| {
154 let deopt = Deopt::new(get_library_name()).unwrap();
155 let dot_path: PathBuf = [
156 deopt.get_library_build_dir().unwrap(),
157 "work".into(),
158 "callgraph.dot".into(),
159 ]
160 .iter()
161 .collect();
162 let (nodes, edges) = dot_parser(&dot_path).unwrap();
163 let mut call_graph = CallGraph::new();
164 call_graph.construct(nodes, edges);
165 call_graph
166 })
167}
168
169#[cfg(test)]
170mod test {

Callers 2

test_parse_call_graphFunction · 0.85

Calls 4

get_library_nameFunction · 0.85
dot_parserFunction · 0.85
get_library_build_dirMethod · 0.80
constructMethod · 0.80

Tested by 1

test_parse_call_graphFunction · 0.68