AI 中文总结
该研究为自底向上的关系语言实现多态性提出新方法,先引入半环Kanren并扩展支持多态,再基于等式模式等描述编译方法,避免单态化,还考虑现有工作与未来研究方向。
AI 中文摘要
我们提出了一种新方法,用于为自底向上的关系语言实现多态性,避免单态化。首先引入半环Kanren,一种自底向上的加权关系编程语言,然后扩展该基础语言以支持多态性。接着基于等式模式和多态关系的足够大实例,描述了一种将多态半环Kanren程序编译为非多态程序的新方法,并解释了该方法的正确性。最后考虑现有工作并给出未来研究方向。
英文摘要
We present a new approach for implementing polymorphism for bottom-up relational languages that avoids monomorphization. We begin by introducing semiringKanren, a bottom-up weighted relational programming language. We extend this base language to support polymorphism. We describe a new method to compile polymorphic semiringKanren programs into non-polymorphic ones, based on equality patterns and large-enough instances of polymorphic relations. We explain the correctness of this method. Finally, we consider existing work and suggest directions for future research.
Comments18 pages, 4 figures, submitted to miniKanren and Relational Programming Workshop 2026, for associated repo see https://github.com/sporkl/semiringkanren