Affiliation:
1. Indiana University, USA
2. University of Utah, USA
Abstract
We present a straightforward, call-by-value embedding of a small logic programming language with a simple complete search. We construct the entire language in 54 lines of Racket---half of which implement unification. We then layer over it, in 43 lines, a reconstruction of an existing logic programming language, miniKanren, and attest to our implementation's pedagogical value. Evidence suggests our combination of expressiveness, concision, and elegance is compelling: since microKanren's release, it has spawned over 50 embeddings in over two dozen host languages, including Go, Haskell, Prolog and Smalltalk.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
6 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Embedding Functional Logic Programming in Haskell via a Compiler Plugin;Practical Aspects of Declarative Languages;2023
2. Certified Semantics for Relational Programming;Programming Languages and Systems;2020
3. Typed Embedding of a Relational Language in OCaml;Electronic Proceedings in Theoretical Computer Science;2018-12-31
4. Improving Refutational Completeness of Relational Search via Divergence Test;Proceedings of the 20th International Symposium on Principles and Practice of Declarative Programming;2018-09-03
5. Proof-relevant Horn Clauses for Dependent Type Inference and Term Synthesis;Theory and Practice of Logic Programming;2018-07