The original source of confusion was that some variables do not begin with a 
question mark (?) in the "simple" patterns.  This might appear to allow a 
variable to have two representations within the same rule if both a simple and 
traditional pattern use a deftemplate.  All variables might have a leading 
marker, including those in simple patterns, which could have a different marker 
such as a sharp sign (#).  The helpful, question-mark convention for variables 
dates back to Micro-planner in the 70's.

Rule and query LHS syntax should not be easily to confuse with algorithmic 
language syntax.  Such obscurity makes learning Jess more difficult.  The 
suggested syntax below "?e.occup", which would be difficult to parse, hides the 
meaning.  This could lose a significant advantage of rule-based systems:  even 
an untrained observer, such as a manager or sponsor, can look at the code and 
become convinced that an approach is appropriate.

Bob Kirby

At 06:54 AM 6/19/2007, Ernest Friedman-Hill wrote:

>On Jun 19, 2007, at 2:07 AM, Wolfgang Laun wrote:
>
>>One other system I know of lets you write (adopting the Jess syntax)
>>
>>(defrule crossover
>>?e <- (side {?e.occup == FALSE}) ; or some way of saying "this"?
>>?w <- (side {?w.occup == TRUE})
>>?br <- (bridge {?br.occup == FALSE}
>>{?br.east == ?e}
>>{?br.west == ?w})
>>=>
>>(printout t ?br.name " " ?e.name " " ?w.name crlf)
>
>You have guessed (something very close to) the syntax that we're  
>using in Jess 7.1 . I think the leading "?" won't be needed, and  
>within a single pattern, you can leave off the fact reference and  
>that will refer to the slot from the fact matching that pattern.
>
>
>---------------------------------------------------------
>Ernest Friedman-Hill
>Advanced Software Research          Phone: (925) 294-2154
>Sandia National Labs                FAX:   (925) 294-2234
>PO Box 969, MS 9012                 [EMAIL PROTECTED]
>Livermore, CA 94550                 http://www.jessrules.com
>
>--------------------------------------------------------------------
>To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
>in the BODY of a message to [EMAIL PROTECTED], NOT to the list
>(use your own address!) List problems? Notify [EMAIL PROTECTED]
>--------------------------------------------------------------------

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to