This is tougher than it sounds because CLIPS -looks- like LISP, but
it's definitely not LISP. I have a hard time picturing how to
reconcile the way that Jess has to behave to maintain CLIPS
compatibility (flattening lists, interpreting all lists as function
calls) and the kinds of things that this thread is
discussing. Actually, I think having Jess do nested lists would be
-easier- than having it do what it does now.

Perhaps somebody who understands what I'm rambling about might like to
comment on the issues. Maybe we just need a quote operator - if we
could decide what the semantics should be. We'd have to decide how
pattern matching should work if slots are allowed to contain
arbitrarily nested lists of lists... that'd be a -huge- performance
hit right there, I think.

Maybe all we really need is a little bit of syntactic sugar:
'(foo bar baz) is automatically parsed as (create$ foo bar baz). Maybe
we need create-but-dont-flatten$ function, and this transformation
uses it.

But then how do we distinguish between

'(list-of-symbols (+ - = *))

where we don't want the sublist flattened, and 

'(result-of-calculation (+ 1 1))

where we do? Maybe you have to quote each individual sub-list too?

I think Bob Johnson wrote:
> 
> Gang,
> 
>     I also have a need for manipulating nested lists.  It would be a great help
> if this capability was added. Essentially our expert
> system writes programs in a Lisp like language for processing by an
> interpreter. As a Lisp programmer, I find it difficult to stop at one level.
> Such elegant language! I have been able to restrain myself to only
> asserting nested lists (statements in the target language) onto the fact list
> and (obviously) doing no subsequent pattern matching.
> I was able to make this work by writing a preprocessor
> that detects nested list on the RHS and quotes them (makes them into
> strings). These strings of nested lists are extracted by the (facts) command
> and sent to the our interpreter.
> 
>     We would greatly appreciate the adding of nested lists to Jess.
> It liberates the language. Not to mention that our system
> would be simplified and  more robust.
> I realize Ernest has plenty of work. Young child and all. Perhaps
> not for quite some time, but I would like to see it on the future
> feature list (which I suspect is also nested!)
> 
> 
>                                                 Regards,
> 
> 
>                                                 Bob
> 
> Eric Eslinger wrote:
> 
> > This is a message directed mostly at EF-H, but if anyone out there in jess
> > land has a workaround, let me know.
> >
> > In implementing some KQML processing routines in jess I have decided that a
> > lot of things would be a lot easier if I could do one of the following: make a
> > list within a list, or make a deftemplate within a deftemplate.  For example
> > if I could have a
> >
> > (deftemplate (slot foo))
> >
> > where somehow foo is anothe deftemplate with its own slots and multislots.
> > Or, if I could make a fact (list) of the form (a b (c d) e) without needing to
> > make it a deftemplate.  Making a multifield with (assert (create$ a b (create$
> > c d) e)) will "flatten" the list so the actual fact is (a b c d e) instead.
> >
> > Thanks for the help.
> >
> > Eric Eslinger
> > [EMAIL PROTECTED]
> >
> > PS, if anyone out there has worked with KQML messaging in JESS and has any
> > pointers, let me know.  I find correct implementation of the ask-all
> > performative to be particularly problematic (not to mention the basic tell
> > performative).  Thanks again.
> > ---------------------------------------------------------------------
> > To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> > in the BODY of a message to [EMAIL PROTECTED], NOT to the
> > list. 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. List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> 
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (510) 294-2154
Sandia National Labs                FAX:   (510) 294-2234
Org. 8920, MS 9214                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to