Re: Question about range constraint enforcement

Thomas Russ <[email protected]> Mon, 3 Nov 2008 15:07:30 -0800
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
On Nov 3, 2008, at 8:10 AM, Srini Ram wrote:

> Here is an excerpt of some code I have
>
> (deffunction numeric-constant (?name (?n number)) :closed TRUE)
> (assert (numeric-constant Max_time_slot 96))
>
> ;; Time slot is any number between 1 and 96, inclusive
> (defconcept Time_slot (?t number)
>     :<=> (AND (>= ?t 1) (=< ?t Max_time_slot))
>     :closed TRUE)

You have a problem here, in that "Max_time_slot" is a reference to a  
PowerLoom instance, and not a numeric value.  To use the functional  
value, you would need to write

(defconcept Time_slot (?t number)
     :<=> (AND (>= ?t 1) (=< ?t (numeric-constant Max_time_slot)))
     :closed TRUE)

instead.

I haven't had time to work through the rest of your message yet.