;;; -*- Mode: LISP; Package: GTRE-EXAMPLE; Syntax: Common-lisp; -*-
;;;
;;; *******************************************************
;;;
;;; PORTABLE AI LAB - EPFL
;;;
;;; *******************************************************
;;;
;;; Filename:   raining-ex.cl
;;; Short Desc: Simple example to show non-monotonicity
;;; Version:    1.0
;;; Status:     experimental
;;; Last Mod:   19.12.91 - Fatma FEKIH-AHMED
;;; Author:    Fatma FEKIH-AHMED
;;;
;;; Copyright (c) 1992 Istituto Dalle Molle (IDSIA), University of
;;; Zurich, Swiss Federal Institute of Technology Lausanne.
;;;
;;; Permission is granted to any individual or institution to use, copy,
;;; modify, and distribute this software, provided that this complete
;;; copyright and permission notice is maintained, intact, in all
;;; copies and supporting documentation.
;;;
;;; IDSIA provides this software "as is" without express or implied
;;; warranty.  
;;;

;;; =======================================================================
;;; PACKAGE DECLARATIONS
;;; =======================================================================

(in-package :gtre-example)

(import '(pail-lib::tre-example
	  gtre::rule
	  gtre::assert!
	  gtre::rassert!
	  gtre::retract!
	  gtre::rretract!
	  gtre::contradiction
	  gtre::GOD
	  gtre::USER
	  ))

;;; =======================================================================
;;; TMS Example
;;; =======================================================================

(let ((raining (make-instance 'tre-example


		 ;;rules in JTRE syntax
		 :rule-set '((rule ((:in '(week-end) :var ?V1)
				    (:out '(raining) :var ?V2))
				   (rassert! (go outdoors) 
					     (just ?V1 ?V2))))
		 
		 ;; assertions in JTRE syntax
		 :assertions '((assert! '(raining))
			       (assert! '(week-end)))

		 :contradiction '())))
  
  (pail-lib::put-pool pail-lib:*pail-pool* raining :name "RAINING"))



;;; =======================================================================
;;; END OF FILE
;;; =======================================================================
