The cl-kanren Reference Manual

This is the cl-kanren Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sat Dec 03 20:18:41 2022 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-kanren

A minikanren implementation

Author

cage

Bug Tracker

https://notabug.org/cage/cl-kanren/issues

License

BSD

Version

0.1.0

Dependency

alexandria (system).

Source

cl-kanren.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-kanren/cl-kanren.asd

Source

cl-kanren.asd.

Parent Component

cl-kanren (system).

ASDF Systems

cl-kanren.


3.1.2 cl-kanren/packages.lisp

Source

cl-kanren.asd.

Parent Component

cl-kanren (system).

Packages

3.1.3 cl-kanren/mu-kanren.lisp

Dependency

packages.lisp (file).

Source

cl-kanren.asd.

Parent Component

cl-kanren (system).

Public Interface
Internals

3.1.4 cl-kanren/interface.lisp

Dependency

mu-kanren.lisp (file).

Source

cl-kanren.asd.

Parent Component

cl-kanren (system).

Public Interface

3.1.5 cl-kanren/mu-kanren-goodies.lisp

Dependency

interface.lisp (file).

Source

cl-kanren.asd.

Parent Component

cl-kanren (system).

Public Interface
Internals

3.1.6 cl-kanren/mini-kanren.lisp

Dependency

mu-kanren-goodies.lisp (file).

Source

cl-kanren.asd.

Parent Component

cl-kanren (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-kanren

Source

packages.lisp.

Use List

4.2 mu-kanren-goodies

Source

packages.lisp.

Use List
Used By List

mini-kanren.

Public Interface
Internals

4.3 interface

Source

packages.lisp.

Use List
Used By List
Public Interface

4.4 mu-kanren

Source

packages.lisp.

Use List
  • alexandria.
  • common-lisp.
Used By List
Public Interface
Internals

4.5 mini-kanren

Source

packages.lisp.

Use List
Used By List

cl-kanren.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Constants

Constant: +empty-state+

The empty state

Package

mu-kanren.

Source

mu-kanren.lisp.

Constant: +fail+
Package

mu-kanren.

Source

mu-kanren-goodies.lisp.

Constant: +mzero+

The empty stream

Package

mu-kanren.

Source

mu-kanren.lisp.

Constant: +succeed+
Package

mu-kanren.

Source

mu-kanren-goodies.lisp.


5.1.2 Special variables

Special Variable: +failed-unification+
Package

mu-kanren.

Source

mu-kanren.lisp.


5.1.3 Macros

Macro: all (&rest goals)
Package

mini-kanren.

Source

mini-kanren.lisp.

Macro: alli (&rest goals)
Package

mini-kanren.

Source

mini-kanren.lisp.

Macro: choice-case (key-term &body cases)
Package

mini-kanren.

Source

mini-kanren.lisp.

Macro: conda ((&rest gs) (&rest hs) &body body)
Package

mini-kanren.

Source

mini-kanren.lisp.

Macro: conde (&rest clauses)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Macro: condi (&rest clauses)
Package

mini-kanren.

Source

mini-kanren.lisp.

Macro: condu ((&rest gs) (&rest hs) &body body)
Package

mini-kanren.

Source

mini-kanren.lisp.

Macro: conj-plus (g &rest rest)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Macro: disj-plus (g &rest rest)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Macro: fresh ((&rest vars) &body body)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Macro: lambda-$ ((&rest parameters) &body body)
Package

mu-kanren.

Source

mu-kanren.lisp.

Macro: lambda-g ((&rest parameters) &body body)
Package

mu-kanren.

Source

mu-kanren.lisp.

Macro: project ((&rest vars) &body goals)
Package

mini-kanren.

Source

mini-kanren.lisp.

Macro: run (n (&rest vars) &body body)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Macro: run* ((&rest vars) &body body)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Macro: zzz (fn)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.


5.1.4 Ordinary functions

Function: == (u v)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: ==-check (v w)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: appendo (list rest out)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: bind ($ g)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: brancho (x tree)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: call/fresh (f)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: caro (cons car)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: cdro (cons cdr)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: conj (g1 g2)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: conso (car cdr cons)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: disj (g1 g2)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: eq-caro (list x)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: extend-subst (rhs lhs subst)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: failed-unification-p (s)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: flatteno (list? out)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: ifte (g0 g1 g2)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Function: listo (list)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: make-binary-relation (mapping)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: make-nary-relation (n mapping)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: make-ternary-relation (mapping)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: map-choice (fun &rest bindings)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: membero (x list)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: mplus ($1 $2)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: mu-var (&optional a)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: mu-var-p (a)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: mu-var= (a b)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: nullo (object)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: once (g)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Function: pairo (pair?)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: permute-binary-relation (relation)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: permute-ternary-relation (relation)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: reify-subst (id? subst)
Package

interface.

Source

interface.lisp.

Function: secondo (cons-cell out)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: thirdo (cons-cell out)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: unify (u v subst)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: unit (s/c)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: var-exists-in-subst-p (v subst)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: walk (u subst)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: walk* (id? subst)
Package

interface.

Source

interface.lisp.


5.1.5 Generic functions

Generic Function: equivp (lhs rhs)
Package

mu-kanren.

Source

mu-kanren.lisp.

Methods
Method: equivp ((lhs list) (rhs list))
Source

interface.lisp.

Method: equivp ((lhs vector) (rhs vector))
Source

interface.lisp.

Method: equivp ((lhs string) (rhs string))
Source

interface.lisp.

Method: equivp ((lhs mu-var) (rhs mu-var))
Source

interface.lisp.

Method: equivp (lhs rhs)
Source

interface.lisp.

Generic Reader: id (object)
Package

mu-kanren.

Methods
Reader Method: id ((mu-var mu-var))

automatically generated reader method

Source

mu-kanren.lisp.

Target Slot

id.

Generic Writer: (setf id) (object)
Package

mu-kanren.

Methods
Writer Method: (setf id) ((mu-var mu-var))

automatically generated writer method

Source

mu-kanren.lisp.

Target Slot

id.

Generic Function: reify-name (n)
Package

interface.

Source

interface.lisp.

Methods
Method: reify-name ((n number))
Generic Function: reify-subst-impl (val subst)
Package

interface.

Source

interface.lisp.

Methods
Method: reify-subst-impl (val subst)
Method: reify-subst-impl ((val string) subst)
Method: reify-subst-impl ((val mu-var) subst)
Method: reify-subst-impl ((val cons) subst)
Method: reify-subst-impl ((val vector) subst)
Generic Function: unify-impl (v w subst)
Package

mu-kanren.

Source

mu-kanren.lisp.

Methods
Method: unify-impl ((u vector) (v vector) subst)
Source

interface.lisp.

Method: unify-impl ((u cons) (v cons) subst)
Source

interface.lisp.

Method: unify-impl (u (v mu-var) subst)
Source

interface.lisp.

Method: unify-impl ((u mu-var) v subst)
Source

interface.lisp.

Method: unify-impl ((u mu-var) (v mu-var) subst)
Source

interface.lisp.

Method: unify-impl (u v subst)
Source

interface.lisp.

Generic Function: walk-impl (val subst)
Package

interface.

Source

interface.lisp.

Methods
Method: walk-impl (val subst)
Method: walk-impl ((val string) subst)
Method: walk-impl ((val cons) subst)
Method: walk-impl ((val vector) subst)

5.1.6 Standalone methods

Method: print-object ((object mu-var) stream)
Source

mu-kanren.lisp.


5.1.7 Classes

Class: mu-var
Package

mu-kanren.

Source

mu-kanren.lisp.

Direct methods
Direct slots
Slot: id
Type

number

Initform

0

Initargs

:id

Readers

id.

Writers

(setf id).


5.2 Internals


5.2.1 Special variables

Special Variable: *print-mu-var-reference-p*
Package

mu-kanren.

Source

mu-kanren.lisp.

Special Variable: *print-mu-var-type-p*
Package

mu-kanren.

Source

mu-kanren.lisp.


5.2.2 Macros

Macro: %if-aux (name (&rest if-null) (&rest if-fn) (&rest if-t) &body body)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Macro: all-aux (bnd &rest goals)
Package

mini-kanren.

Source

mini-kanren.lisp.

Macro: bind-plus (binding g &rest rest)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Macro: ifte* (gs &optional hs &body body)
Package

mini-kanren.

Source

mini-kanren.lisp.


5.2.3 Ordinary functions

Function: %extend-subst (x v s)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: bindi ($ g)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: call/empty-state (g)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Function: dummy-test (a b)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Function: mk-reify (s/c*)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Function: mplusi ($1 $2)
Package

mini-kanren.

Source

mini-kanren.lisp.

Function: mu-var-id (a)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: occurs-check (x v subst)
Package

mu-kanren.

Source

mu-kanren.lisp.

Function: pull ($)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Function: reify-state/1st-var (s/c)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Function: take (n $)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Function: take-all ($)
Package

mu-kanren-goodies.

Source

mu-kanren-goodies.lisp.

Function: var-exists-in-subst-fn ()
Package

mu-kanren.

Source

mu-kanren.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (   =  
A   B   C   D   E   F   G   I   L   M   N   O   P   R   S   T   U   V   W   Z  
Index Entry  Section

%
%extend-subst: Private ordinary functions
%if-aux: Private macros

(
(setf id): Public generic functions
(setf id): Public generic functions

=
==: Public ordinary functions
==-check: Public ordinary functions

A
all: Public macros
all-aux: Private macros
alli: Public macros
appendo: Public ordinary functions

B
bind: Public ordinary functions
bind-plus: Private macros
bindi: Private ordinary functions
brancho: Public ordinary functions

C
call/empty-state: Private ordinary functions
call/fresh: Public ordinary functions
caro: Public ordinary functions
cdro: Public ordinary functions
choice-case: Public macros
conda: Public macros
conde: Public macros
condi: Public macros
condu: Public macros
conj: Public ordinary functions
conj-plus: Public macros
conso: Public ordinary functions

D
disj: Public ordinary functions
disj-plus: Public macros
dummy-test: Private ordinary functions

E
eq-caro: Public ordinary functions
equivp: Public generic functions
equivp: Public generic functions
equivp: Public generic functions
equivp: Public generic functions
equivp: Public generic functions
equivp: Public generic functions
extend-subst: Public ordinary functions

F
failed-unification-p: Public ordinary functions
flatteno: Public ordinary functions
fresh: Public macros
Function, %extend-subst: Private ordinary functions
Function, ==: Public ordinary functions
Function, ==-check: Public ordinary functions
Function, appendo: Public ordinary functions
Function, bind: Public ordinary functions
Function, bindi: Private ordinary functions
Function, brancho: Public ordinary functions
Function, call/empty-state: Private ordinary functions
Function, call/fresh: Public ordinary functions
Function, caro: Public ordinary functions
Function, cdro: Public ordinary functions
Function, conj: Public ordinary functions
Function, conso: Public ordinary functions
Function, disj: Public ordinary functions
Function, dummy-test: Private ordinary functions
Function, eq-caro: Public ordinary functions
Function, extend-subst: Public ordinary functions
Function, failed-unification-p: Public ordinary functions
Function, flatteno: Public ordinary functions
Function, ifte: Public ordinary functions
Function, listo: Public ordinary functions
Function, make-binary-relation: Public ordinary functions
Function, make-nary-relation: Public ordinary functions
Function, make-ternary-relation: Public ordinary functions
Function, map-choice: Public ordinary functions
Function, membero: Public ordinary functions
Function, mk-reify: Private ordinary functions
Function, mplus: Public ordinary functions
Function, mplusi: Private ordinary functions
Function, mu-var: Public ordinary functions
Function, mu-var-id: Private ordinary functions
Function, mu-var-p: Public ordinary functions
Function, mu-var=: Public ordinary functions
Function, nullo: Public ordinary functions
Function, occurs-check: Private ordinary functions
Function, once: Public ordinary functions
Function, pairo: Public ordinary functions
Function, permute-binary-relation: Public ordinary functions
Function, permute-ternary-relation: Public ordinary functions
Function, pull: Private ordinary functions
Function, reify-state/1st-var: Private ordinary functions
Function, reify-subst: Public ordinary functions
Function, secondo: Public ordinary functions
Function, take: Private ordinary functions
Function, take-all: Private ordinary functions
Function, thirdo: Public ordinary functions
Function, unify: Public ordinary functions
Function, unit: Public ordinary functions
Function, var-exists-in-subst-fn: Private ordinary functions
Function, var-exists-in-subst-p: Public ordinary functions
Function, walk: Public ordinary functions
Function, walk*: Public ordinary functions

G
Generic Function, (setf id): Public generic functions
Generic Function, equivp: Public generic functions
Generic Function, id: Public generic functions
Generic Function, reify-name: Public generic functions
Generic Function, reify-subst-impl: Public generic functions
Generic Function, unify-impl: Public generic functions
Generic Function, walk-impl: Public generic functions

I
id: Public generic functions
id: Public generic functions
ifte: Public ordinary functions
ifte*: Private macros

L
lambda-$: Public macros
lambda-g: Public macros
listo: Public ordinary functions

M
Macro, %if-aux: Private macros
Macro, all: Public macros
Macro, all-aux: Private macros
Macro, alli: Public macros
Macro, bind-plus: Private macros
Macro, choice-case: Public macros
Macro, conda: Public macros
Macro, conde: Public macros
Macro, condi: Public macros
Macro, condu: Public macros
Macro, conj-plus: Public macros
Macro, disj-plus: Public macros
Macro, fresh: Public macros
Macro, ifte*: Private macros
Macro, lambda-$: Public macros
Macro, lambda-g: Public macros
Macro, project: Public macros
Macro, run: Public macros
Macro, run*: Public macros
Macro, zzz: Public macros
make-binary-relation: Public ordinary functions
make-nary-relation: Public ordinary functions
make-ternary-relation: Public ordinary functions
map-choice: Public ordinary functions
membero: Public ordinary functions
Method, (setf id): Public generic functions
Method, equivp: Public generic functions
Method, equivp: Public generic functions
Method, equivp: Public generic functions
Method, equivp: Public generic functions
Method, equivp: Public generic functions
Method, id: Public generic functions
Method, print-object: Public standalone methods
Method, reify-name: Public generic functions
Method, reify-subst-impl: Public generic functions
Method, reify-subst-impl: Public generic functions
Method, reify-subst-impl: Public generic functions
Method, reify-subst-impl: Public generic functions
Method, reify-subst-impl: Public generic functions
Method, unify-impl: Public generic functions
Method, unify-impl: Public generic functions
Method, unify-impl: Public generic functions
Method, unify-impl: Public generic functions
Method, unify-impl: Public generic functions
Method, unify-impl: Public generic functions
Method, walk-impl: Public generic functions
Method, walk-impl: Public generic functions
Method, walk-impl: Public generic functions
Method, walk-impl: Public generic functions
mk-reify: Private ordinary functions
mplus: Public ordinary functions
mplusi: Private ordinary functions
mu-var: Public ordinary functions
mu-var-id: Private ordinary functions
mu-var-p: Public ordinary functions
mu-var=: Public ordinary functions

N
nullo: Public ordinary functions

O
occurs-check: Private ordinary functions
once: Public ordinary functions

P
pairo: Public ordinary functions
permute-binary-relation: Public ordinary functions
permute-ternary-relation: Public ordinary functions
print-object: Public standalone methods
project: Public macros
pull: Private ordinary functions

R
reify-name: Public generic functions
reify-name: Public generic functions
reify-state/1st-var: Private ordinary functions
reify-subst: Public ordinary functions
reify-subst-impl: Public generic functions
reify-subst-impl: Public generic functions
reify-subst-impl: Public generic functions
reify-subst-impl: Public generic functions
reify-subst-impl: Public generic functions
reify-subst-impl: Public generic functions
run: Public macros
run*: Public macros

S
secondo: Public ordinary functions

T
take: Private ordinary functions
take-all: Private ordinary functions
thirdo: Public ordinary functions

U
unify: Public ordinary functions
unify-impl: Public generic functions
unify-impl: Public generic functions
unify-impl: Public generic functions
unify-impl: Public generic functions
unify-impl: Public generic functions
unify-impl: Public generic functions
unify-impl: Public generic functions
unit: Public ordinary functions

V
var-exists-in-subst-fn: Private ordinary functions
var-exists-in-subst-p: Public ordinary functions

W
walk: Public ordinary functions
walk*: Public ordinary functions
walk-impl: Public generic functions
walk-impl: Public generic functions
walk-impl: Public generic functions
walk-impl: Public generic functions
walk-impl: Public generic functions

Z
zzz: Public macros