paperbot · PL 论文追踪

全部论文 待读 收藏

P0 Global Optimization of Numerical Programs Via Prioritized Stochastic Algebraic Transformations

基于优先随机代数变换的数值程序全局优化
ICSE 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)2019匹配度 8/10 · 论文聚焦数值/浮点程序的舍入误差、精度与效率权衡,属于用户关注的浮点程序分析核心方向,并涉及符号轨迹、程序分析与抽象解释等 PL 技术,且有工业代码验证;但未涉及 LLM/Agent 或贝叶斯程序分析,因此不是多方向交叉。引用 11 inbox
Xie Wang, Huaijin Wang, Zhendong Su, Enyi Tang, Xin Chen, Weijun Shen, Zhenyu Chen, Linzhang Wang, Xianpei Zhang, Xuandong Li
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出数值程序全局优化框架,用符号轨迹与优先随机代数变换兼顾精度与效率。

数值代码常用于安全攸关且资源受限场景,需同时保证正确与高效。无限精度算术虽准确但过慢,浮点运算则累积舍入误差。本文提出全局优化框架,开发者先按数学需求编写无限精度程序,框架再对全程序而非单表达式优化。其关键是用符号轨迹提取算法分析跨语句的数值值流,并通过有效规则选择引导的随机代数变换生成优化轨迹。评估显示,该方法在文献基准上最坏情况精度显著优于先进数值优化工具,也能处理复杂程序结构,并在真实代码中发现经开发者确认的数值缺陷。

问题
数值程序难以同时兼顾高精度、易维护和高效率;无限精度实现太慢,浮点实现易累积舍入误差。
方法
以无限精度程序为输入,通过符号轨迹提取分析全局数值值流,并用优先随机代数变换和规则选择生成优化后的程序。
评估
在数值基准和复杂程序结构上对比先进工具,并在真实代码中检测到开发者确认的数值缺陷。
原文摘要(Abstract)

Numerical code is often applied in the safety-critical, but resource-limited areas. Hence, it is crucial for it to be correct and efficient, both of which are difficult to ensure. On one hand, accumulated rounding errors in numerical programs can cause system failures. On the other hand, arbitrary/infinite-precision arithmetic, although accurate, is infeasible in practice and especially in resource-limited scenarios because it performs thousands of times slower than floating-point arithmetic. Thus, it has been a significant challenge to obtain high-precision, easy-to-maintain, and efficient numerical code. This paper introduces a novel global optimization framework to tackle this challenge. Using our framework, a developer simply writes the infinite-precision numerical program directly following the problem's mathematical requirement specification. The resulting code is correct and easy-to-maintain, but inefficient. Our framework then optimizes the program in a global fashion (i.e., considering the whole program, rather than individual expressions or statements as in prior work), the key technical difficulty this work solves. To this end, it analyzes the program's numerical value flows across different statements through a symbolic trace extraction algorithm, and generates optimized traces via stochastic algebraic transformations guided by effective rule selection. We first evaluate our technique on numerical benchmarks from the literature; results show that our global optimization achieves significantly higher worst-case accuracy than the state-of-the-art numerical optimization tool. Second, we show that our framework is also effective on benchmarks having complicated program structures, which are challenging for numerical optimization. Finally, we apply our framework on real-world code to successfully detect numerical bugs that have been confirmed by developers.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{WangWSTCS0WZL19,
  title = {Global Optimization of Numerical Programs Via Prioritized Stochastic Algebraic Transformations},
  author = {Xie Wang and Huaijin Wang and Zhendong Su and Enyi Tang and Xin Chen and Weijun Shen and Zhenyu Chen and Linzhang Wang and Xianpei Zhang and Xuandong Li},
  booktitle = {ICSE},
  year = {2019},
  doi = {10.1109/icse.2019.00116}
}