rule duplication handling

22 views
Skip to first unread message

Jose Antonio Escribano Ayllon

unread,
Apr 23, 2024, 8:43:15 AMApr 23
to CLIPSESG
Hi, 

I noticed that there is no error when I have two rules with the same name, it just seems that the second one overrides the first one. 

Is there any way to force CLIPS to report an error if there are two rules with the same name within the same module?

Cheers,
Jose

CLIPS Support

unread,
Apr 23, 2024, 11:12:17 PMApr 23
to CLIPSESG
If you are watching compilations, you'll get a warning when you load a file that redefines a construct:

         CLIPS (6.4.1 4/8/23)
CLIPS> (watch compilations)
CLIPS> (load "redefine.clp")
Defining defrule: r1 +j+j

[CSTRCPSR1] redefine.clp, Line 2, WARNING: Redefining defrule: r1 +j+j
TRUE
CLIPS> 

Jose Antonio Escribano Ayllon

unread,
Apr 24, 2024, 6:03:41 AMApr 24
to CLIPSESG
Hi,

Interesting, for some reason I can't make it work, I will keep investigating, thanks!

Cheers,
Jose
Reply all
Reply to author
Forward
0 new messages