;;; -*- Mode: LISP; Syntax: Rhet; Base: 10; Vsp: 1; Package: RPRS -*-
(in-package rprs)
;; also define some basic times
(add-UTYPE 'T-TIME [HOUR-1] [HOUR-2] [HOUR-3] [HOUR-4] [HOUR-5] [HOUR-6] [HOUR-7] [HOUR-8] [HOUR-9] [HOUR-10] [HOUR-11] [HOUR-12])
(rASSERT [TIME-DURN HOUR-1 1 HOUR-2]
         [TIME-DURN HOUR-2 1 HOUR-3]
         [TIME-DURN HOUR-3 1 HOUR-4]
         [TIME-DURN HOUR-4 1 HOUR-5]
         [TIME-DURN HOUR-5 1 HOUR-6]
         [TIME-DURN HOUR-6 1 HOUR-7]
         [TIME-DURN HOUR-7 1 HOUR-8]
         [TIME-DURN HOUR-8 1 HOUR-9]
         [TIME-DURN HOUR-9 1 HOUR-10]
         [TIME-DURN HOUR-10 1 HOUR-11]
         [TIME-DURN HOUR-11 1 HOUR-12]
         [TIME-MEETS HOUR-1 HOUR-2]
         [TIME-MEETS HOUR-2 HOUR-3]
         [TIME-MEETS HOUR-3 HOUR-4]
         [TIME-MEETS HOUR-4 HOUR-5]
         [TIME-MEETS HOUR-5 HOUR-6]
         [TIME-MEETS HOUR-6 HOUR-7]
         [TIME-MEETS HOUR-7 HOUR-8]
         [TIME-MEETS HOUR-8 HOUR-9]
         [TIME-MEETS HOUR-9 HOUR-10]
         [TIME-MEETS HOUR-10 HOUR-11]
         [TIME-MEETS HOUR-11 HOUR-12])


(add-UTYPE 'T-TIME [THE-WHOLE-DAY]
               [TIME-STARTS-BETWEEN-4-5-ENDS-BETWEEN-6-7]
	       [HOURS-4-5] [HOURS-6-7] [HOURS-7-8]
	       [TIME-STARTS-BETWEEN-6-8-ENDS-BETWEEN-7-9]
	       [TIME-STARTS-BETWEEN-9-10-ENDS-BETWEEN-11-12]
	       [SOMETIME-IN-HOUR-4] [SOMETIME-IN-HOUR-5]
	       [SOMETIME-IN-HOURS-4-5])
(rASSERT [TIME-OVERLAPPED-BY TIME-STARTS-BETWEEN-4-5-ENDS-BETWEEN-6-7 HOUR-4]
	       [TIME-OVERLAPS TIME-STARTS-BETWEEN-4-5-ENDS-BETWEEN-6-7 HOUR-6]
	       [TIME-DURN HOUR-6 2 HOURS-6-7]
	       [TIME-DURN HOURS-6-7 1 HOURS-7-8]
	       [TIME-DURN HOUR-4 2 HOURS-4-5]
	       [TIME-STARTED-BY HOURS-6-7 HOUR-6]
	       [TIME-FINISHED-BY HOURS-6-7 HOUR-7]
	       [TIME-STARTED-BY HOURS-7-8 HOUR-7]
	       [TIME-FINISHED-BY HOURS-7-8 HOUR-8]
	       [TIME-STARTED-BY HOURS-4-5 HOUR-4]
	       [TIME-FINISHED-BY HOURS-4-5 HOUR-5]
	       [TIME-OVERLAPPED-BY TIME-STARTS-BETWEEN-6-8-ENDS-BETWEEN-7-9 HOURS-6-7]
	       [TIME-OVERLAPS TIME-STARTS-BETWEEN-6-8-ENDS-BETWEEN-7-9 HOURS-7-8]
	       [TIME-OVERLAPPED-BY TIME-STARTS-BETWEEN-9-10-ENDS-BETWEEN-11-12 HOUR-9]
	       [TIME-OVERLAPS TIME-STARTS-BETWEEN-9-10-ENDS-BETWEEN-11-12 HOUR-11]
	       [TIME-CONTAINS HOURS-4-5 SOMETIME-IN-HOURS-4-5]
	       [TIME-CONTAINS HOUR-4 SOMETIME-IN-HOUR-4]
	       [TIME-CONTAINS HOUR-5 SOMETIME-IN-HOUR-5]
	       [TIME-CONTAINS THE-WHOLE-DAY HOUR-1]
	       [TIME-CONTAINS THE-WHOLE-DAY HOUR-12])
