α Kanren A Fresh Name in Nominal Logic Programming

We present αKanren, an embedding of nominal logic programming in Scheme. αKanren is inspired by αProlog and MLSOS, and allows programmers to easily write interpreters, type inferencers, and other programs that must reason about scope and binding. αKanren subsumes the functionality, syntax, and implementation of miniKanren, itself an embedding of logic programming in Scheme. We present the complete implementation of αKanren, written in portable RRS Scheme. In addition to the implementation, we provide introductions to miniKanren and αKanren, and several example programs, including a type inferencer for the simply typed λ-calculus.

[1]  Joseph E. Stoy,et al.  Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory , 1981 .

[2]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[3]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[4]  P. Wadler How to Replace Failure by a List of Successes: A method for exception handling, backtracking, and pattern matching in lazy functional languages , 1985, FPCA.

[5]  Matthias Felleisen,et al.  Hygienic macro expansion , 1986, LFP '86.

[6]  R. Jakobson On Language , 1990 .

[7]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[8]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[9]  Walid Taha,et al.  How to add laziness to a strict language without even being odd , 1998 .

[10]  Daniel P. Friedman,et al.  Writing Macros in Continuation-Passing Style , 2000 .

[11]  Ralf Hinze,et al.  Deriving backtracking monad transformers , 2000, ICFP '00.

[12]  Andrew M. Pitts,et al.  Nominal Logic: A First Order Theory of Names and Binding , 2001, TACS.

[13]  Andrew M. Pitts,et al.  FreshML: programming with binders made simple , 2003, ICFP '03.

[14]  William E. Byrd,et al.  The reasoned schemer , 2005 .

[15]  D. Friedman,et al.  From Variadic Functions to Variadic Relations A miniKanren Perspective , 2006 .

[16]  Andrew M. Pitts,et al.  A Metalanguage for Structural Operational Semantics , 2007, Trends in Functional Programming.

[17]  Christian Urban,et al.  Nominal logic programming , 2006, TOPL.