Gradual typing of erlang programs: a wrangler experience

Konstantinos Sagonas, D. Luna
{"title":"Gradual typing of erlang programs: a wrangler experience","authors":"Konstantinos Sagonas, D. Luna","doi":"10.1145/1411273.1411284","DOIUrl":null,"url":null,"abstract":"Currently most Erlang programs contain no or very little type information. This sometimes makes them unreliable, hard to use, and difficult to understand and maintain. In this paper we describe our experiences from using static analysis tools to gradually add type information to a medium sized Erlang application that we did not write ourselves: the code base of Wrangler. We carefully document the approach we followed, the exact steps we took, and discuss possible difficulties that one is expected to deal with and the effort which is required in the process. We also show the type of software defects that are typically brought forward, the opportunities for code refactoring and improvement, and the expected benefits from embarking in such a project. We have chosen Wrangler for our experiment because the process is better explained on a code base which is small enough so that the interested reader can retrace its steps, yet large enough to make the experiment quite challenging and the experiences worth writing about. However, we have also done something similar on large parts of Erlang/OTP. The result can partly be seen in the source code of Erlang/OTP R12B-3.","PeriodicalId":140676,"journal":{"name":"Erlang Workshop","volume":"20 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-09-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"12","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Erlang Workshop","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1411273.1411284","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 12

Abstract

Currently most Erlang programs contain no or very little type information. This sometimes makes them unreliable, hard to use, and difficult to understand and maintain. In this paper we describe our experiences from using static analysis tools to gradually add type information to a medium sized Erlang application that we did not write ourselves: the code base of Wrangler. We carefully document the approach we followed, the exact steps we took, and discuss possible difficulties that one is expected to deal with and the effort which is required in the process. We also show the type of software defects that are typically brought forward, the opportunities for code refactoring and improvement, and the expected benefits from embarking in such a project. We have chosen Wrangler for our experiment because the process is better explained on a code base which is small enough so that the interested reader can retrace its steps, yet large enough to make the experiment quite challenging and the experiences worth writing about. However, we have also done something similar on large parts of Erlang/OTP. The result can partly be seen in the source code of Erlang/OTP R12B-3.
erlang程序的渐进式输入:一个牧马人的经验
目前,大多数Erlang程序不包含或只包含很少的类型信息。这有时会使它们不可靠、难以使用、难以理解和维护。在这篇文章中,我们描述了我们使用静态分析工具逐渐将类型信息添加到一个中等规模的Erlang应用程序中的经验,这个应用程序不是我们自己编写的:Wrangler的代码库。我们仔细地记录我们所遵循的方法,我们所采取的确切步骤,并讨论期望处理的可能困难以及过程中所需的努力。我们还展示了通常提出的软件缺陷的类型,代码重构和改进的机会,以及在这样一个项目中开始的预期收益。我们之所以选择Wrangler进行实验,是因为这个过程在一个代码库中得到了更好的解释,这个代码库足够小,有兴趣的读者可以追溯其步骤,但又足够大,使实验相当具有挑战性,并且值得一写。然而,我们也在Erlang/OTP的大部分上做了类似的事情。在Erlang/OTP R12B-3的源代码中可以看到部分结果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信