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

Function rs_compute_sccs

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

Source from the content-addressed store, hash-verified

104/// FFI function to compute SCCs from a Lean environment.
105#[unsafe(no_mangle)]
106pub extern "C" fn rs_compute_sccs(
107 env_consts_ptr: LeanList<LeanBorrowed<'_>>,
108) -> LeanIOResult<LeanOwned> {
109 let rust_env = decode_env(env_consts_ptr);
110 let rust_env = Arc::new(rust_env);
111 let ref_graph = build_ref_graph(&rust_env);
112 let condensed = compute_sccs(&ref_graph.out_refs);
113 let mut cache = LeanBuildCache::with_capacity(rust_env.len());
114 let result = LeanIxCondensedBlocks::build(&mut cache, &condensed);
115 LeanIOResult::ok(result)
116}

Callers

nothing calls this directly

Calls 4

decode_envFunction · 0.85
build_ref_graphFunction · 0.85
compute_sccsFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected