;;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10 -*- ;;;; --------------------------------------------------------------------------- ;;;; File name: 344-utils.lsp ;;;; System: FIRE ;;;; Author: Ken Forbus ;;;; Created: February 3, 2003 17:19:48 ;;;; Purpose: Support for Northwestern's CS 344 course ;;;; --------------------------------------------------------------------------- ;;;; Modified: Saturday, February 21, 2004 at 13:23:54 by Kenneth Forbus ;;;; --------------------------------------------------------------------------- (in-package :common-lisp-user) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defvar *344-kb-path* (make-qrg-path "fire" "kbs" "qrg-general")) (defvar *344-kb-name* "qrg-general") (defun open-344-kb (&key (recompute-cache? nil)) (cond ((and (boundp 'fire::*kb*) (fire::kb? fire::*kb*) (string-equal (fire::path fire::*kb*) *344-kb-path*) (string-equal (fire::name fire::*kb*) *344-kb-name*)) (cond ((fire:open-kb? fire::*kb*) (fire::in-kb fire::*kb*)) (t (fire::in-kb fire::*kb*) (fire::open-kb)))) (t (fire::in-kb (fire::make-kb *344-kb-path* *344-kb-name* :recompute-cache? recompute-cache?)) (fire::open-kb)))) (defun make-344-reasoner (&optional (title "344 reasoner")) (fire::make-reasoner title)) (defun browse-kb () (funcall (find-symbol "browse-kb" :rbrowse) :kb fire:*kb*)) (defun explain-fact (fact) (funcall (find-symbol "browse-item" :rbrowse) fire:*reasoner* fact)) (defun browse-current-sme () (funcall (find-symbol "browse-sme" :rbrowse) sme::*sme*)) (defun summarize-current-analogy () (funcall (find-symbol "browse-analogy-summarization" :rbrowse) sme::*sme*)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; End of Code