MCPcopy Create free account
hub / github.com/argumentcomputer/ix / rs_build_ref_graph

Function rs_build_ref_graph

crates/ffi/src/graph.rs:93–102  ·  view source on GitHub ↗
(
  env_consts_ptr: LeanList<LeanBorrowed<'_>>,
)

Source from the content-addressed store, hash-verified

91/// FFI function to build a reference graph from a Lean environment.
92#[unsafe(no_mangle)]
93pub extern "C" fn rs_build_ref_graph(
94 env_consts_ptr: LeanList<LeanBorrowed<'_>>,
95) -> LeanIOResult<LeanOwned> {
96 let rust_env = decode_env(env_consts_ptr);
97 let rust_env = Arc::new(rust_env);
98 let ref_graph = build_ref_graph(&rust_env);
99 let mut cache = LeanBuildCache::with_capacity(rust_env.len());
100 let result = build_ref_graph_array(&mut cache, &ref_graph.out_refs);
101 LeanIOResult::ok(result)
102}
103
104/// FFI function to compute SCCs from a Lean environment.
105#[unsafe(no_mangle)]

Callers

nothing calls this directly

Calls 4

decode_envFunction · 0.85
build_ref_graphFunction · 0.85
build_ref_graph_arrayFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected