基于CHR的类型推断的终止、合流和一致性
On Termination, Confluence and Consistent CHR-based Type Inference
摘要:
我们考虑应用约束处理规则(约束处理规则)规范的类型推断系统,如Haskell使用。confluence的保证类型推断提供的答案是正确的和一致的。建立汇流的标准方法依赖于一个假设,即并行程序正在终止。然而,在实践中的许多例子中,产生了非终止的递归程序,使这种方法不适用。尽管不能保证终止或汇合,Glasgow Haskell推理器(GHC)支持允许用户继续进行类型推断的选项,例如通过使用UndecidableProjectile标志。在本文中,我们正式确定并验证了一组宽松的标准,即范围限制,局部汇合,地面终止,以确保基于CHR的类型推断,映射到潜在的非终止的可编程逻辑程序的一致性。
英文摘要:
We consider the application of Constraint Handling Rules (CHR) for the specification of type inference systems, such as that used by Haskell. Confluence of CHR guarantees that the answer provided by type inference is correct and consistent. The standard method for establishing confluence relies on an assumption that the CHR program is terminating. However, many examples in practice give rise to non-terminating CHR programs, rendering this method inapplicable. Despite no guarantee of termination or confluence, the Glasgow Haskell Compiler (GHC) supports options that allow the user to proceed with type inference anyway, e.g. via the use of the UndecidableInstances flag. In this paper we formally identify and verify a set of relaxed criteria, namely range-restrictedness, local confluence, and ground termination, that ensure the consistency of CHR-based type inference that maps to potentially non-terminating CHR programs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。