Prototyping a Functional Language using Higher-Order Logic Programming: A Functional Pearl on Learning the Ways of lambda Prolog/Makam

Proceedings of the ACM on Programming Languages(2018)

引用 3|浏览11
暂无评分
摘要
We demonstrate how the framework of higher-order logic programming, as exemplified in the lambda Prolog language design, is a prime vehicle for rapid prototyping of implementations for programming languages with sophisticated type systems. We present the literate development of a type checker for a language with a number of complicated features, culminating in a standard ML-style core with algebraic datatypes and type generalization, extended with staging constructs that are generic over a separately defined language of terms. We add each new feature in sequence, with little to no changes to existing code. Scaling the higher-order logic programming approach to this setting required us to develop approaches to challenges like complex variable binding patterns in object languages and performing generic structural traversals of code, making use of novel constructions in the setting of lambda Prolog, such as GADIs and generic programming. For our development, we make use of Makam, a new implementation of lambda Prolog, which we introduce in tutorial style as part of our (quasi-)literate development.
更多
查看译文
关键词
higher-order logic programming,metaprogramming,programming language prototyping
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要