arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2111.09728cs.PLcs.SE
收藏

使用压缩跨程序设计语言测量source code简洁性

Measuring source code conciseness across programming languages using compression

Lodewijk Bergmans, Xander Schrijen, Edwin Ouwehand, Magiel Bruntink

摘要:

众所周知,某些程序设计语言的程序比其他语言的程序更简洁,这常常是一个激烈争论的话题。在比较或汇总以程序设计语言的组合编写的源代码上受卷影响的度量时,这是一个相关因素。在本文中,我们提出了一个模型来衡量程序设计语言的简洁性在一个一致的,客观的和基于证据的方式。我们提出的方法,解释它是如何建立在信息理论的原则,提出详细的分析步骤,并显示应用此模型的各种商业软件应用程序的大型基准的定量结果。我们证明了我们的语言简洁性度量与另一种分析方法和大规模开发人员调查密切相关,并展示了其结果如何应用于提高多语言应用程序的软件度量。

英文摘要:

It is well-known, and often a topic of heated debates, that programs in some programming languages are more concise than in others. This is a relevant factor when comparing or aggregating volume-impacted metrics on source code written in a combination of programming languages. In this paper, we present a model for measuring the conciseness of programming languages in a consistent, objective and evidence-based way. We present the approach, explain how it is founded on information theoretical principles, present detailed analysis steps and show the quantitative results of applying this model to a large benchmark of diverse commercial software applications. We demonstrate that our metric for language conciseness is strongly correlated with both an alternative analytical approach, and with a large scale developer survey, and show how its results can be applied to improve software metrics for multi-language applications.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑