weirflow 0.1.0

GPU-first dataflow analysis primitives for Vyre and Santh compiler pipelines.
Documentation
//! DF-9  -  persistent procedure summaries.
//!
//! Bottom-up fixpoint: compute a summary for each function describing
//! its effect on caller state (inputs tainted → outputs tainted,
//! inputs ranged → outputs ranged, etc.). Persist to the pipeline
//! cache keyed by function AST hash so unchanged functions are not
//! reanalysed across scans.
//!
//! This is the performance gate for the whole dataflow stack  -  Linux
//! has ~450k functions; reanalysing per-rule is infeasible without
//! summaries.
//!
//! # Implementation
//!
//! Two-layer composition:
//!
//!   1. **Kernel:** a single-dispatch Program that reads the
//!      per-function input-bitset (`fn_ast_in`), unions callee
//!      summaries from the callgraph (`callgraph_in`), falls back
//!      to the previous iteration's cached summary
//!      (`cached_summary_in`), and writes the new summary.
//!
//!   2. **Host loop:** the caller drives this Program in a
//!      bottom-up order (callees before callers) using the topsort
//!      primitive; once a function's summary is unchanged across two
//!      consecutive passes it is written to the pipeline cache
//!      (G8's blake3-keyed content cache) keyed by AST hash +
//!      callee-summary hash.
//!
//! Soundness: inherited from the underlying primitives.

#[cfg(any(test, feature = "cpu-parity"))]
mod cpu_oracle;
mod dispatch;
mod program;
mod scratch;
mod soundness;

#[cfg(test)]
mod tests;

pub(crate) const OP_ID: &str = "weir::summary";

#[cfg(any(test, feature = "cpu-parity"))]
#[allow(deprecated)]
pub(crate) use cpu_oracle::summarize_function_cpu;
pub use dispatch::{
    summarize_function_borrowed_into_result_with_scratch_via, summarize_function_borrowed_into_via,
    summarize_function_borrowed_via, summarize_function_borrowed_with_scratch_via,
    summarize_function_evidence_via, summarize_function_via,
};
pub use program::{summarize_function, summarize_function_with_count};
pub use scratch::SummarizeFunctionScratch;
pub use soundness::Summary;