arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2303.09791cs.HCcs.PL
收藏

ChameleonIDE:通过交互式可视化和探索解决类型错误

ChameleonIDE: Untangling Type Errors Through Interactive Visualization and Exploration

Shuai Fu, Tim Dwyer, Peter J. Stuckey, Jackson Wain, Jesse Linossier

摘要:

动态类型程序设计语言在教育和软件行业中很流行。虽然进入门槛很低,但它们存在运行时类型错误以及代码质量和可维护性方面的长期问题。静态类型语言虽然在这些方面表现出优势,但缺乏易学性和易用性。特别是,修复类型错误给新手用户和专家都带来了挑战。此外,编译器类型的错误消息以偏向于程序代码中第一次出现错误的静态方式呈现。为了帮助用户解决此类类型错误,我们引入了ChameleonIDE,这是一种类型调试工具,它以公正的方式向用户呈现类型错误,允许他们探索错误可能发生的完整上下文。程序员可以交互式地验证推理的步骤是否与他们的意图相反。通过三项涉及真正程序员的研究,我们表明ChameleonIDE在修复类型错误方面比传统的基于文本的错误消息更有效。这种差异在更困难的任务中更显着。此外,程序员积极使用ChameleonIDE的交互式功能被证明在修复类型错误方面比被动读取类型错误输出更有效。

英文摘要:

Dynamically typed programming languages are popular in education and the software industry. While presenting a low barrier to entry, they suffer from run-time type errors and longer-term problems in code quality and maintainability. Statically typed languages, while showing strength in these aspects, lack in learnability and ease of use. In particular, fixing type errors poses challenges to both novice users and experts. Further, compiler-type error messages are presented in a static way that is biased toward the first occurrence of the error in the program code. To help users resolve such type errors, we introduce ChameleonIDE, a type debugging tool that presents type errors to the user in an unbiased way, allowing them to explore the full context of where the errors could occur. Programmers can interactively verify the steps of reasoning against their intention. Through three studies involving real programmers, we showed that ChameleonIDE is more effective in fixing type errors than traditional text-based error messages. This difference is more significant in harder tasks. Further, programmers actively using ChameleonIDE's interactive features are shown to be more efficient in fixing type errors than passively reading the type error output.

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

↑