Extend Bao to compose MILP solutions across function calls

Develop and implement the proposed compositional extension that solves the mixed-integer linear program for boundary-capable functions separately and composes each callee's summary energy costs with the MILP solutions of its callers.

Background

Bao's global formulation currently assumes that functions are inlined into a single procedure. The paper outlines a compositional approach for functions whose worst-case energy exceeds the device budget: solve each callee independently, summarize entry-to-boundary, boundary-to-return, and boundary-free path costs, and use those summaries in callers. The implementation of this extension remains unresolved, and the authors note that compositional solving would preserve safety but not global optimality.

References

We outline this extension here and leave its implementation to future work.

— Bao: Automatic Region Placement and Memory Allocation for Intermittent Computing  (2610.02624 - Kang et al., 2 Oct 2026) in Section 4.5, “Handling Function Calls”