【24h】

Heuristics for Type Error Discovery and Recovery

机译:类型错误发现和恢复的启发式

获取原文
获取原文并翻译 | 示例

摘要

Type error messages that are reported for incorrect functional programs can be difficult to understand. The reason for this is that most type inference algorithms proceed in a mechanical, syntax-directed way, and are unaware of inference techniques used by experts to explain type inconsistencies. We formulate type inference as a constraint problem, and analyze the collected constraints to improve the error messages (and, as a result, programming efficiency). A special data structure, the type graph, is used to detect global properties of a program, and furthermore enables us to uniformly describe a large collection of heuristics which embed expert knowledge in explaining type errors. Some of these also suggest corrections to the programmer. Our work has been fully implemented and is used in practical situations, showing that it scales up well. We include a number of statistics from actual use of the compiler showing us the frequency with which heuristics are used, and the kind and number of suggested corrections.
机译:为错误的功能程序报告的类型错误消息可能很难理解。这样做的原因是,大多数类型推断算法都是以机械的,语法指导的方式进行的,并且没有意识到专家用来解释类型不一致的推断技术。我们将类型推断公式化为约束问题,并分析收集的约束以改善错误消息(从而提高编程效率)。特殊的数据结构(类型图)用于检测程序的全局属性,并且使我们能够统一描述大量启发式方法,这些方法将专家知识嵌入到解释类型错误中。其中一些还建议程序员进行更正。我们的工作已得到充分实施,并已在实际情况中使用,表明它可以很好地扩大规模。我们提供了一些来自编译器实际使用的统计信息,这些统计信息向我们展示了使用启发式方法的频率以及建议的更正的种类和数量。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号