pub fn compute_cfg_diff(
backend: &Backend,
function_id: i64,
before_snapshot: &str,
after_snapshot: &str,
) -> Result<CfgDiff>Expand description
Compute CFG diff between two snapshots
This function compares the CFG of a function at two different snapshots, detecting structural changes and computing a similarity score.
§Arguments
backend- Storage backend for querying CFG datafunction_id- Function entity ID to comparebefore_snapshot- Snapshot identifier for “before” state (transaction ID or “current”)after_snapshot- Snapshot identifier for “after” state (transaction ID or “current”)
§Returns
Ok(CfgDiff)- Diff result with all detected changesErr(...)- Error if query or computation fails
§Note
The current implementation queries the current state for both snapshots. Future versions will support true snapshot-based comparison using SnapshotId.