;;; -*- Mode: LISP; Syntax: Common-lisp -*- ;;;; Four containers example ;;;; File name: ex7.lsp ;;;; modified: Thursday, February 14, 2008 at 11:27:13 by Ken Forbus ;;; 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) (assertq (state liquid)) (assertq (substance water)) (assertq (container f)) (assertq (container g)) (assertq (container h)) (assertq (container i)) (assertq (fluid-path p1)) (assertq (fluid-path p2)) (assertq (fluid-path p3)) (assertq (fluid-connection p1 f g)) (assertq (fluid-connection p1 g f)) (assertq (fluid-connection p2 g h)) (assertq (fluid-connection p2 h g)) (assertq (fluid-connection p3 g i)) (assertq (fluid-connection p3 i g)) (assertq (equal-to (a (bottom-height f)) (a (max-height p1)))) (assertq (equal-to (a (bottom-height h)) (a (max-height p2)))) (assertq (equal-to (a (bottom-height i)) (a (max-height p3)))) (assertq (equal-to (a (bottom-height g)) (a (max-height p1)))) (assertq (equal-to (a (bottom-height g)) (a (max-height p2)))) (assertq (equal-to (a (bottom-height g)) (a (max-height p3))))