Search
Thursday, 1st of June 2023, 10:12:51 UTC
11:49:43
prokhor
I have a question concerning 'common prolog' from the LispWorks KnowledgeWorks package: If I have sth like: (defrel clolor ((color green))(color blue))((color red))) how can i add additional relations later? ((color yellow)) does not work standalone and another defrel overrides the old one.... Thx for help (this is a repost as in ##prolog nobody knew an answer)
11:50:15
prokhor
http://www.lispworks.com/documentation/lwl42/KW-U/html/kwprolog-u-157.htm#pgfId-866035
11:57:05
ogamita
(clolor 1 1 1) (clolor 0 0 1) (clolor 0 1 0) etc, I'd say.
11:58:18
ogamita
prokhor: are you sure it's ((color green) …) ie ((<class> <parameter>) …) and not ((<parameter> <class>) …) ?
12:00:23
prokhor
ogamita: http://www.lispworks.com/documentation/lw80/kw-u/kw-prolog-2.htm
12:00:59
prokhor
afair your proposal did not work, which is why i am asking in the first place...
12:01:33
ogamita
Oh, I see. defrel should include all the relationships. I thought it was just like defgeneric.
12:02:30
prokhor
yup and this is very unpractical as I would either not be able to add statements later or to translate from .pl files
12:02:42
prokhor
thus i cannot imagine there is no way...
12:02:58
prokhor
unfortuantely google gives me nothing in this case...
12:03:50
ogamita
prokhor: IIRC, the source of common prolog is available. Have a look at it to see what operators are available.
12:04:08
ogamita
You may also try a macroexpand on a defrel form.
12:06:29
prokhor
thx, i will do as last resort...
12:09:27
prokhor
i am also not sure whether the source is available as LW is a commercial implementation...
Thursday, 1st of June 2023, 22:12:51 UTC