home / skills / a5c-ai / babysitter / data-flow-analysis-framework
This skill guides designing and implementing data-flow analyses for compiler optimization, including lattice, transfer, fixpoint, and interprocedural
npx playbooks add skill a5c-ai/babysitter --skill data-flow-analysis-frameworkReview the files below or copy the command above to add this skill to your agents.
---
name: data-flow-analysis-framework
description: Design and implement data-flow analyses for compiler optimization
allowed-tools:
- Bash
- Read
- Write
- Edit
- Glob
- Grep
metadata:
specialization: computer-science
domain: science
category: compiler-optimization
phase: 6
---
# Data Flow Analysis Framework
## Purpose
Provides expert guidance on designing and implementing data-flow analyses for compiler optimization and program analysis.
## Capabilities
- Forward/backward analysis specification
- Lattice definition and verification
- Transfer function generation
- Fixpoint computation (worklist algorithm)
- Analysis soundness verification
- Interprocedural analysis
## Usage Guidelines
1. **Lattice Design**: Define abstract domain and lattice
2. **Transfer Functions**: Define transfer functions for statements
3. **Analysis Direction**: Specify forward or backward
4. **Fixpoint**: Implement worklist algorithm
5. **Verification**: Verify soundness of analysis
## Tools/Libraries
- LLVM
- GCC internals
- Soot
- WALA
This skill helps design and implement data-flow analyses for compiler optimization and program analysis. It provides patterns for lattice design, transfer function generation, and fixpoint computation. The goal is to produce sound, maintainable analyses that scale from intraprocedural to interprocedural settings.
You specify the abstract domain and lattice, then encode transfer functions for program statements or instructions. The framework drives a worklist-based fixpoint engine, supporting both forward and backward analyses and common widening/meet operations. It includes checks to verify lattice properties and offers guidance for proving or testing soundness.
Does this support both forward and backward analyses?
Yes — the framework models direction explicitly and reuses the same lattice and fixpoint machinery for either case.
How do I handle infinite domains?
Use widening, limit iteration counts, or design a finite abstraction to ensure termination; the framework documents common strategies.