-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconstants.rs
More file actions
30 lines (20 loc) · 1.47 KB
/
constants.rs
File metadata and controls
30 lines (20 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/// Maximum recursion depth for AST traversal to prevent stack overflow
/// on deeply nested trees. Used by extractors, complexity, CFG, and dataflow.
pub const MAX_WALK_DEPTH: usize = 200;
// ─── Louvain community detection ────────────────────────────────────
/// Maximum number of coarsening levels in the Louvain algorithm.
pub const LOUVAIN_MAX_LEVELS: usize = 50;
/// Maximum number of local-move passes per level before stopping.
pub const LOUVAIN_MAX_PASSES: usize = 20;
/// Minimum modularity gain to accept a node move (avoids floating-point noise).
pub const LOUVAIN_MIN_GAIN: f64 = 1e-12;
/// Default random seed for deterministic community detection.
pub const DEFAULT_RANDOM_SEED: u32 = 42;
// ─── Dataflow analysis ──────────────────────────────────────────────
/// Maximum character length for truncated dataflow expressions.
pub const DATAFLOW_TRUNCATION_LIMIT: usize = 120;
// ─── Build pipeline ─────────────────────────────────────────────────
/// Maximum number of changed files eligible for the incremental fast path.
pub const FAST_PATH_MAX_CHANGED_FILES: usize = 5;
/// Minimum existing file count required before the fast path is considered.
pub const FAST_PATH_MIN_EXISTING_FILES: i64 = 20;