Skip to main content

Module algorithm

Module algorithm 

Source
Expand description

Algorithm integration module for Magellan 2.0 graph algorithms.

This module provides integration with Magellan’s executable graph algorithms through a shell-out pattern. It supports:

  • Loading pre-computed SymbolSet files from JSON
  • Running Magellan algorithms (reachable, dead-code, slice, cycles) and extracting SymbolIds
  • Resolving simple symbol names to SymbolIds via magellan find

The SymbolSet type is the core abstraction for algorithm-based filtering. It represents a collection of SymbolIds (32-char BLAKE3 hashes) that can be used to filter search results.

Structs§

AlgorithmOptions
Algorithm-based filtering options for search
SymbolSet
SymbolSet - a collection of SymbolIds for filtering search results.

Enums§

SymbolSetStrategy
Strategy for filtering by SymbolSet

Functions§

apply_algorithm_filters
Apply algorithm filters and return SymbolSet for search filtering
check_magellan_available
Check if Magellan CLI is available and at the correct version.
create_symbol_set_temp_table
Create temporary table for large SymbolSet filtering
parse_condense_output
Parse magellan condense output and extract SCC membership.
parse_paths_output
Parse magellan paths output and extract execution path symbols.
parse_symbol_set_file
Parse a SymbolSet from a JSON file and validate its format.
resolve_fqn_to_symbol_id
Resolve a simple symbol name to its SymbolId using magellan find.
run_magellan_algorithm
Run a Magellan algorithm and extract SymbolIds from its JSON output.
symbol_set_filter_strategy
Get the appropriate filtering strategy for a SymbolSet

Type Aliases§

AlgorithmFilterResult
Result type for algorithm filtering operations.