;; -*- Mode: Lisp; -*- ;;; Tiny Rule Engine, Version 5 ;;; Copyright (c) 1993, Kenneth D. Forbus, Northwestern University, ;;; and Johan de Kleer, the Xerox Corporation. ;;; All rights reserved. ;;; See the file legal.txt for a paragraph stating scope of permission ;;; and disclaimer of warranty. The above copyright notice and that ;;; paragraph must be included in any separate copy of this file. (in-package :cl-user) ;; A very simple pattern-directed inference system. ;; This version is the simplest. (defvar *tre-path* (make-bps-path "tre") "Path for Tiny Rule Engine source files.") (defvar *tre-files* '("tinter" ;; User interface "data" ;; Assertions and database "rules" ;; Storing and retrieving rules "unify" ;; Pattern matching & variables "treex1" ;; Examples for tre ) "Tiny Rule Engine source files.") (defun load-tre (&key (action :compile-if-newer)) "Load the Tiny Rule Engine" (bps-load-files *tre-path* *tre-files* :action action)) (defun shakedown-tre () "Run examples to ensure that tre is working properly." (format t "~%Beginning shakedown...~%") (ex1) (ex2) (format t "~% ... shakedown completed.~%")) (defun help-tre (&optional (stream *standard-output*)) "Print out some helpful information about the Tiny Rule Engine." (dolist (statement '("~%Tiny Rule Engine:" "====================================================" " to load: (load-tre :action :load-source)" " to compile: (load-tre :action :compile)" " Examples to run (see treex1.lsp):" " (ex1 t) ;; Modus Ponens." " (ex2 t) ;; Parts inferences." " (ex3 t) ;; Inductive reasoning of worst sort (careful!)." "" )) (format stream statement) (terpri stream))) (help-tre)