一句话:提出能量流图 EFG,以状态转移系统建模软件能耗,支持最优路径静态分析与优化组合级联预测。
现有软件能耗优化常将能耗视为聚合且确定的属性,忽视同一软件不同执行路径能耗差异巨大的路径依赖特性。本文提出能量流图(EFG),将计算过程形式化为带状态与转移能耗成本的状态转移系统,支持能耗最优执行路径的静态分析,并设计乘法级联模型预测多种优化组合的叠加效果,避免穷举测试。在经350万次执行验证的软件程序中,15.6%的解呈现高路径依赖方差(CV>0.1),结构优化最高实现705倍能耗降低;在AI流水线中,级联模型预测误差在5.1%以内,仅用22次测量即从420万种可能中筛选方案。EFG将能耗优化从试错转向系统化分析,为绿色软件工程提供基础。
The growing energy demands of computational systems necessitate a fundamental shift from performance-centric design to one that treats energy consumption as one of the primary design considerations. Current approaches treat energy consumption as an aggregate, deterministic property, overlooking the path-dependent nature of computation, where different execution paths through the same software consume dramatically different energy. We introduce the Energy Flow Graph (EFG), a formal model that represents computational processes as state-transition systems with energy costs for both states and transitions. EFG enables various applications in software engineering, including static analysis of energy-optimal execution paths and a multiplicative cascade model that predicts combined optimization effects without exhaustive testing. Our early experiments demonstrate EFG's versatility across domains: in software programs validated through 3.5 million executions, 15.6% of solutions exhibit high path-dependent variance (CV > 0.1), while structural optimization reveals up to 705× energy reduction. In AI pipelines, the cascade model predicts optimization combinations within 5.1% error, enabling selection from 4.2 million possibilities using only 22 measurements. The EFG transforms energy optimization from trial-and-error to systematic analysis, providing a foundation for green software engineering across computational domains.