当前位置: X-MOL 学术Sci. Comput. Program. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Efficient Counter-factual Type Error Debugging
Science of Computer Programming ( IF 1.3 ) Pub Date : 2020-09-10 , DOI: 10.1016/j.scico.2020.102544
Sheng Chen , Baijun Wu

Providing effective error messages in response to type errors continues to be a challenge in functional programming. Type error messages often point to bogus error locations or lack sufficient information for removing the type error, making error debugging ineffective. Counter-factual typing (CFT) addressed this problem by generating comprehensive error messages with each message includes a rich set of information. However, this comes with a cost of huge computations, making it too slow for interactive use. In particular, our recent study shows that programmers usually have to go through multiple iterations of updating and recompiling programs to remove a type error. Interestingly, our study also finds that program updates are minor in each iteration during type error debugging. We exploit this fact and develop eCFT, an efficient version of CFT, which doesn't recompute all error fixes from scratch for each updated program but only recomputes error fixes that are changed in response to the update. Our key observation is that minor program changes lead to minor error suggestion changes. eCFT is based on principal typing, a typing scheme more amenable to reuse previous typing results. We have evaluated our approach and found it is about 12.4× faster than CFT in updating error fixes.



中文翻译:

高效的反事实类型错误调试

提供有效的错误消息以响应类型错误仍然是功能编程中的一个挑战。类型错误消息通常指向虚假的错误位置或缺少足够的信息来消除类型错误,从而使错误调试无效。反事实打字(CFT)通过生成全面的错误消息来解决此问题,每个消息都包含一组丰富的信息。但是,这要付出巨大的计算成本,因此对于交互式使用而言太慢了。特别是,我们最近的研究表明,程序员通常必须经历多次更新和重新编译程序的迭代才能消除类型错误。有趣的是,我们的研究还发现,在类型错误调试期间,每次迭代中的程序更新都是次要的。我们利用这一事实,并制定ËCFT是CFT的有效版本,它不会从头开始为每个更新的程序重新计算所有错误修复,而仅重新计算响应于更新而更改的错误修复。我们的主要观察结果是,较小的程序更改导致较小的错误建议更改。e CFT基于主体类型,这是一种更适合重用以前的类型结果的类型方案。我们评估了我们的方法,发现它在更新错误修复程序方面比CFT快约12.4倍。

更新日期:2020-09-11
down
wechat
bug