一句话:首个跨 GitHub 静态类型语言的大规模浮点使用实证研究,并发布千万级真实浮点函数数据集。
浮点算术的推理素来困难,现有静态/动态分析与程序修复技术虽进展显著,却仍需贴近真实代码;其前提是弄清真实世界的浮点代码长什么样。本文填补这一知识空白,对公开 GitHub 仓库中的浮点算术使用开展首个大规模实证研究。为扩展到数百万仓库,研究聚焦静态类型语言,并遵循先进的数据挖掘实践:随机采样、仅依据内在属性过滤以避免偏差,通过源码关键词识别浮点使用、通过解析代码识别循环等语言构造。评估结果支持了文献中常提的“浮点算术被广泛使用”这一论断;通过比较代码规模、特定构造与函数使用等统计量,发现文献中用于评测浮点自动推理技术的基准在某些方面能代表“真实世界”代码,但并非全部方面。作者发布了从研究中提取的一千万个真实浮点函数数据集,并以案例研究展示其可用于发现新基准,帮助未来浮点算术技术按真实用户预期进行设计与评估。
Reasoning about floating-point arithmetic is notoriously hard. While static and dynamic analysis techniques or program repair have made significant progress, more work is still needed to make them relevant to real-world code. On the critical path to that goal is understanding what real-world floating-point code looks like. To close that knowledge gap, this paper presents the first large-scale empirical study of floating-point arithmetic usage across public GitHub repositories. We focus on statically typed languages to allow our study to scale to millions of repositories. We follow state-of the art mining practices including random sampling and filtering based on only intrinsic properties to avoid bias, and identify floating-point usage by searching for keywords in the source code, and programming language constructs ( e.g ., loops) by parsing the code. Our evaluation supports the claim often made in papers that floating-point arithmetic is widely used. Comparing statistics such as size and usage of certain constructs and functions, we find that benchmarks used in literature to evaluate automated reasoning techniques for floating-point arithmetic are in certain aspects representative of ‘real-world’ code, but not in all. We publish a dataset of 10 million real-world floating-point functions extracted from our study. We demonstrate in a case study how it may be used to identify new floating-point benchmarks and help future techniques for floating-point arithmetic to be designed and evaluated to match actual users’ expectations.
@article{paperbot3846,
title = {Floating-Point Usage on GitHub: A Large-Scale Study of Statically Typed Languages},
author = {Andrea Gilot and Tobias Wrigstad and Eva Darulova},
journal = {Proceedings of the ACM on Programming Languages},
volume = {10},
number = {OOPSLA1},
year = {2026},
doi = {10.1145/3798203}
}