当前位置: X-MOL 学术J. Syst. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
On the diversity and frequency of code related to mathematical formulas in real-world Java projects
Journal of Systems and Software ( IF 3.7 ) Pub Date : 2021-02-01 , DOI: 10.1016/j.jss.2020.110863
Oliver Moseler , Felix Lemmer , Sebastian Baltes , Stephan Diehl

Abstract In this paper, the term formula code refers to fragments of source code that implement a mathematical formula. We present empirical studies that analyze the diversity and frequency of formula code in open-source-software projects. In an exploratory study, we investigated what kinds of formulas are implemented in real-world Java projects and derived syntactical patterns and constraints. We refined these patterns for sum and product formulas to automatically detect formula code in software archives and to reconstruct the implemented formula in mathematical notation. In a quantitative study of a large sample of engineered Java projects on GitHub we analyzed the frequency of formula code and estimated that one of 700 lines of code in this sample implements a sum or product formula. For a sample of scientific-computing projects, we found that one of 100 lines of code implements a sum or product formula. To assess the need for tool support, we investigated the helpfulness of comments for program understanding in a sample of formula-code fragments and performed an online survey. Our findings provide first insights into the characteristics of formula code, that can motivate further studies on the role of formula code in software projects and the design of formula-related tools.

中文翻译:

现实世界Java项目中数学公式相关代码的多样性和频率

摘要 在本文中,术语公式代码是指实现数学公式的源代码片段。我们提出了实证研究,分析了开源软件项目中公式代码的多样性和频率。在一项探索性研究中,我们调查了在实际 Java 项目中实现了哪些类型的公式以及派生的句法模式和约束。我们改进了求和和乘积公式的这些模式,以自动检测软件档案中的公式代码,并以数学符号重建实现的公式。在对 GitHub 上大量工程 Java 项目样本的定量研究中,我们分析了公式代码的频率,并估计该样本中的 700 行代码中的一行实现了求和或乘积公式。对于科学计算项目的样本,我们发现 100 行代码之一实现了求和或乘积公式。为了评估对工具支持的需求,我们在公式代码片段样本中调查了注释对程序理解的帮助,并进行了在线调查。我们的发现提供了对公式代码特征的初步见解,可以激发对公式代码在软件项目中的作用和公式相关工具设计的进一步研究。
更新日期:2021-02-01
down
wechat
bug