A production Haskell library for adaptive optimization in Hoopl-style dataflow pipelines.
This repository delivers adaptive optimization techniques for production dataflow workflows:
- Adaptive fixpoint iteration: momentum-style damping to reduce oscillation in cyclic CFGs
- Scheduled fuel: phase budgets that start aggressive and taper as optimization stabilizes
- Learned rewrite policy: profile-guided rewrite selection with exploration/exploitation balance
- Bounded join: guardrails that cap unstable fact growth in problematic domains
The goal is to preserve Hoopl's abstractions while improving convergence behavior, optimization efficiency, and operational predictability in production settings.
Most Haskell compiler optimization examples focus on fixed iteration schedules and static pass ordering. To our knowledge, this project is an uncommon end-to-end example of adaptive dataflow control in the Haskell ecosystem, while still using the same core ingredients compiler engineers already trust: lattices, monotone transfer functions, and composable rewrites.
- Stage: Production
- API stability: Stable for production integration
- Performance data: Evaluated using the repository's production benchmark protocol
cabal build
cabal run optimizeAlternative script-based run:
./build.sh
./optimizeThe repository now includes a production-style benchmarking workflow with structured artifacts.
Preferred path:
./bench.sh -n 15 -w 3For options, artifact schema, and reporting protocol, see BENCHMARK.md.
QUICKREF.md- compact formulas, parameter ranges, and implementation notesVISUAL.md- diagrams for convergence, scheduling, and rewrite selection flowTECHNICAL.md- deeper rationale, constraints, and implementation guidanceBENCHMARK.md- reproducible benchmark workflow and reporting checklistSUMMARY.md- one-page project briefINDEX.md- repository navigation guide
This project builds on ideas introduced by the Hoopl framework:
- Paper: Hoopl: A Modular, Reusable Library for Dataflow Analysis and Transformation
- Repository: ezyang/hoopl
MIT. See LICENSE.