KANREN is a declarative logic programming system with first-class relations, embedded in a pure functional subset of Scheme. The system has a set-theoretical semantics, true unions, fair scheduling, first-class relations, lexically-scoped logical variables, depth-first and iterative deepening strategies. The system achieves high performance and expressivity without cuts.
Applications of the system range from expert systems to polymorphic type inference and overloading resolution, to model checking and theorem proving. The system can be used as a meta-logic system.
KANREN works on any computer platform for which a Scheme implementation exists (from PalmPilot and iPAQ to Unix/Linux/Winxx/Mac workstations and servers to MindLego bricks). The system can be compiled or interpreted. Being essentially a Scheme library, KANREN can interact with the user through any graphical or command-line interface provided by the host Scheme implementation.
mini/type-inference.scm
mini/logic.scm
mini/leanTAP.scm
copy_term
) and an advanced evaluator that removes
the need for explicit iterative deepening.examples/zebra.scm
examples/mirror.scm
examples/mirror-equ.scm
(myeq a b) |- (myeq b a)
. Try to do that in Prolog!examples/typeclasses.scm
examples/deduction.scm
examples/pure-bin-arithm.scm
z
is instantiated but
x
and
y
are not,
(++o x y z)
delivers
all non-negative numbers that add to
z
and
(**o
x y z)
computes
all factorizations of
z
.benchmarks/
miniKANREN is a simplified KANREN without many bells, whistles, and optimizations of the full system. The goal of the simplifications was to make miniKANREN easier to explain. Many tutorials below are specifically miniKANREN tutorials. Incidentally, miniKANREN is quite efficient.
mini/mk.scm
mini/mkextraforms.scm
mini/mkprelude.scm
mini/mktests.scm
The Reasoned Schemer
Daniel P. Friedman, William E. Byrd and Oleg Kiselyov
MIT Press, Cambridge, MA, 2005.
The current version of KANREN is 4.50. KANREN is OpenSource, distributed under the MIT license.
KANREN has been tested on the following Scheme systems:
Petite Chez Scheme, Chez Scheme, SCM, Gauche.
mini-KANREN has been tested on the following Scheme systems:
Petite Chez Scheme, Chez Scheme, SCM, Gauche,
PLT Scheme/DrScheme v209 and v299.400.
KANREN download site at SourceForge:
<
http://sf.net/project/showfiles.php?group_id=99654>
The CVS Tree includes the complete KANREN and mini-KANREN code, extensive documentation, a tutorial, validation tests, as well as several sample applications.
You can browse the files in the CVS tree from any web browser.
Converted from SXML by SXML->HTML