Strange behavior of CLIPS

51 views
Skip to first unread message

Maha Laxmi

unread,
May 23, 2012, 7:13:52 AM5/23/12
to clipsesg
Dear Sir/Madam,

I cannot understand the reason for following strange behavior.
This behavior occurs only if the following procedure is followed strictly.

On the CLIPS prompt ::
----------------------------------------------------------------
CLIPS> (load-facts pada_facts)                                                                            
TRUE
CLIPS> (load pada.clp)
Defining deftemplate: pada_info
Defining defrule: get_NP +j+j+j+j
Defining defrule: get_PP_pada +j+j+j+j+j+j+j+j+j
Defining defrule: reverse_NP_daut =j+j+j+j+j+j
TRUE
CLIPS> (agenda)
11     get_NP: f-6,f-3,f-11
For a total of 1 activation.
CLIPS> (run 1)
CLIPS> (agenda)
10     get_PP_pada: f-5,f-4,f-9,f-3,f-11,f-8,f-6,f-13
10     get_PP_pada: f-5,f-4,f-9,f-3,f-11,f-8,f-6,f-13
For a total of 2 activations.

-------------------------------------------------------------------
I have also attached the rule file pada.clp , and facts file pada_facts and a screen shot for a clearer picture.
--
Mahalaxmi.
Open source English-Hindi MT system
http://anusaaraka.iiit.ac.in/

pada.clp
pada_facts
Screenshot-1.png

vc99...@gmail.com

unread,
Jun 10, 2012, 3:04:15 AM6/10/12
to clip...@googlegroups.com, clipsesg
 In Clips 6.24 the behaviour is normal, that is, the rule "get_PP_pada" does not fire twice on the same set of facts.

So it seems that there is some bug in the 6.30 version of the clips!

Vineet Chaitanya

CLIPS Support

unread,
Jun 11, 2012, 10:57:22 AM6/11/12
to CLIPSESG
Looks like a bug in incremental reset (the code that handles pattern
matching when rules are added and there are preexisting facts). The
workaround for this issue would be to load the facts after the rules
have been loaded rather than before.
>  pada.clp
> 3KViewDownload
>
>  pada_facts
> < 1KViewDownload
>
>  Screenshot-1.png
> 158KViewDownload

CLIPS Support

unread,
Nov 15, 2012, 2:46:57 PM11/15/12
to clip...@googlegroups.com
A fix for this has been posted to the SourceForge repository, http://clipsrules.svn.sourceforge.net/viewvc/clipsrules/core/factmch.c
Reply all
Reply to author
Forward
0 new messages