You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define and implement the artifact-lifecycle policy for CFG, ICFG, value-flow, and solver-summary data.
Bifrost already has the right two primitives: CompactRows / CompactDirectedGraph for hot immutable traversal, and generation-aware AnalyzerStore snapshots for stable, expensive, reusable products. Generalize those mechanics without forcing every relation into one graph type or persisting every intermediate.
Base semantic topology should normally be built or hydrated once, assigned dense snapshot-local IDs, and traversed through CSR or CSR+CSC. Query-specific exploded states, worklists, truncations, and witness paths should remain ephemeral. Per-callable semantic facts, CFG fragments, language-semantic summaries, and client summaries may earn SQLite persistence only through measured reuse.
Storage policy
CSR for forward-hot relations; CSR+CSC when both directions are hot.
Incoming edge IDs may reference outgoing payload rows to avoid duplicating payloads.
Functional reverse relations should use dense arrays rather than general CSC.
Durable keys include content/workspace identity, language adapter version, semantic-IR version, solver/summary version, configuration, dependency fingerprint, and protocol hash where applicable.
Stale, corrupt, incomplete, or budget-truncated entries are cache misses, not valid empty analysis.
Parent: #813
Depends on: #814
Builds on: #748, #754, PR #798, and PR #802
Description
Define and implement the artifact-lifecycle policy for CFG, ICFG, value-flow, and solver-summary data.
Bifrost already has the right two primitives:
CompactRows/CompactDirectedGraphfor hot immutable traversal, and generation-awareAnalyzerStoresnapshots for stable, expensive, reusable products. Generalize those mechanics without forcing every relation into one graph type or persisting every intermediate.Base semantic topology should normally be built or hydrated once, assigned dense snapshot-local IDs, and traversed through CSR or CSR+CSC. Query-specific exploded states, worklists, truncations, and witness paths should remain ephemeral. Per-callable semantic facts, CFG fragments, language-semantic summaries, and client summaries may earn SQLite persistence only through measured reuse.
Storage policy
Relevant code
src/compact_graph.rssrc/analyzer/structural/facts.rssrc/analyzer/structural/provider.rssrc/analyzer/store/mod.rssrc/analyzer/store/liveness.rssrc/cache_db.rsmigrations/cache/0007-structural-facts-snapshots.sqlsrc/relevance.rsSuggested work
Acceptance criteria
Non-goals