基于约束类型推断的关系求解器
A Relational Solver for Constraint-based Type Inference
AI总结:
本文提出基于 miniKanren 的关系类型推断器,用于无类型教育语言,解决多态与递归类型带来的实现挑战,并报告相关技巧与优化。
摘要:
我们提出了一个基于 miniKanren 的类型推断器,面向一种具有一等函数、S-表达式和模式匹配的教育编程语言。该语言本身是无类型的,这为问题增加了特定的复杂性,并要求采用通常用于隐式/渐进类型设置中的技术。多态类型和递归类型的存在给在 miniKanren 中实现推断器带来了一定挑战,需要使用多种技巧、优化和扩展;我们对此也进行了报告。
英文摘要:
We present a miniKanren-based type inferencer for an educational programming language with first-class functions, S-expressions, and pattern-matching. The language itself is untyped which adds a certain specificity to the problem and requires the employment of techniques conventionally used in implicit/gradual typing settings. The presence of polymorphic and recursive types poses a certain challenge when implementing the inferencer in miniKanren and requires a number of tricks, optimizations, and extensions to be used; we report on those as well.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。