how to bind a variable with multislots in the LHS?
[email protected] (Pedro Kröger) Mon, 17 Mar 2008 07:06:13 -0300
| Newsgroups | gmane.lisp.lisa.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, To learn more about lisa and rule-based systems I'm converting the zebra puzzle from clips to lisa. the original is here [1] and my in-progress transcription is in [2]. The question I have is, AFAICT in the original, the expression: (assert (value color red)) automatically creates a template "value" with a hidden multislot with color and red as values. In jess the multislot is __data. In my code I have: (assert (value (data '(color red)))) The original also has: ?f1 <- (solution nationality ?n1 1) How do I represent this in lisa? none of these work: (?f1 (solution (data '(nationality ?n1 1)))) (?f1 (solution (data (list nationality ?n1 1)))) (?f1 (solution (data (nationality ?n1 1)))) I appreciate any suggestions and criticisms to my code. Pedro [1] http://www.inf.u-szeged.hu/~jelasity/migyak/zebra.clp [2] http://paste.lisp.org/display/57484 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/