Abstract
We present seven programming challenges in Racket, and an elegant, unified approach to solving them using constraint logic programming in miniKanren.
Supplemental Material
Available for Download
This is a reusable artifact for the paper: "A Unified Approach to Solving Seven Programming Problems (Functional Pearl)" The artifact contains a self-contained Docker image (though you need to install Docker) that can be used to run examples from the paper, as well as experiment with new formulations. Documentation is provided in the "ArtifactOverview.md" file.
- William E. Byrd and Daniel P. Friedman. 2006. From Variadic Functions to Variadic Relations: A miniKanren Perspective. In Proceedings of the 2006 Scheme and Functional Programming Workshop (University of Chicago Technical Report TR-2006-06), Robby Findler (Ed.). 105–117.Google Scholar
- William E. Byrd, Eric Holk, and Daniel P. Friedman. 2012. miniKanren, Live and Untagged: Quine Generation via Relational Interpreters (Programming Pearl). In Proceedings of the 2012 Annual Workshop on Scheme and Functional Programming (Scheme ’12). ACM, New York, NY, USA, 8–29. Google ScholarDigital Library
- Daniel P. Friedman, William E. Byrd, and Oleg Kiselyov. 2005. The Reasoned Schemer. The MIT Press, Cambridge, MA, USA.Google Scholar
- Douglas R. Hofstadter. 1979. Gödel, Escher, Bach : an Eternal Golden Braid. Basic, New York, NY, USA.Google Scholar
- J. Jaffar and J.-L. Lassez. 1987. Constraint Logic Programming. In Proceedings of the 14th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL ’87). ACM, New York, NY, USA, 111–119. Google ScholarDigital Library
- Oleg Kiselyov, Chung-chieh Shan, Daniel P. Friedman, and Amr Sabry. 2005. Backtracking, Interleaving, and Terminating Monad Transformers: (Functional Pearl). In Proceedings of the Tenth ACM SIGPLAN International Conference on Functional Programming (ICFP ’05). ACM, New York, NY, USA, 192–203. Google ScholarDigital Library
- Stephen Cole Kleene. 1952. Introduction to Metamathematics. North-Holland, Amsterdam.Google Scholar
- John McCarthy. 1978. A micro-manual for LISP – Not the whole truth. SIGPLAN Not. 13, 8 (Aug. 1978), 215–216. Google ScholarDigital Library
- Matt Might. 2013. 99 ways to say ’(I love you) in Racket. http://matt.might.net/articles/i- love- you- in- racket/ . (February 2013). Accessed: 2017-02-28.Google Scholar
Index Terms
- A unified approach to solving seven programming problems (functional pearl)
Recommendations
A small embedding of logic programming with a simple complete search
DLS 2016: Proceedings of the 12th Symposium on Dynamic LanguagesWe 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, ...
miniKanren, live and untagged: quine generation via relational interpreters (programming pearl)
Scheme '12: Proceedings of the 2012 Annual Workshop on Scheme and Functional ProgrammingWe present relational interpreters for several subsets of Scheme, written in the pure logic programming language miniKanren. We demonstrate these interpreters running "backwards"---that is, generating programs that evaluate to a specified value---and ...
A small embedding of logic programming with a simple complete search
DLS '16We 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, ...
Comments