Stack overflow in ReturnLHSParseNodes

Help
vranoch
2009-06-05
2012-11-23
  • vranoch

    vranoch - 2009-06-05

    Hello, I experienced a problem when parsing more complex rules (as the following fragment - no matter that it does not make any sense now - it is just a fragment of even more complex rule). When parsing this rule (load ), stack overflow occurs. Occurence of a stack overflow is very sensitive to commenting/uncommenting single rows of the condition (commented-out lines). Is there any way how to solve this without dramatically rewriting the rule?

    Thaks  Vranoch

    (defrule XY ""
    (and 
          (exists
             (VAR G ?V10482_II127 G11 ?V10482_TV134)
             (VAR G ?V10482_II127 GX10 ?V10482_TV138)
             (VAR G ?V10482_II127 G02N ?V10482_TV142)
             (VAR G ?V10482_II127 GX03 ?V10482_TV153)
             (VAR G ?V10482_II127 GX04 ?V10482_TV156)
             (VAR G ?V10482_II127 GX05 ?V10482_TV159)
             (VAR G ?V10482_II127 GX06 ?V10482_TV162)
             (VAR G ?V10482_II127 GX07 ?V10482_TV165)
             (VAR G ?V10482_II127 GX03 ?V10482_TV172)
             (VAR G ?V10482_II127 GX04 ?V10482_TV175)
             (VAR G ?V10482_II127 GX05 ?V10482_TV178)
             (VAR G ?V10482_II127 GX06 ?V10482_TV181)
             (VAR G ?V10482_II127 GX07 ?V10482_TV184)
             (VAR G ?V10482_II127 GX03 ?V10482_TV191)
             (VAR G ?V10482_II127 GX04 ?V10482_TV194)
             (VAR G ?V10482_II127 GX05 ?V10482_TV197)
             (VAR G ?V10482_II127 GX06 ?V10482_TV200)
             (VAR G ?V10482_II127 GX07 ?V10482_TV203)

    ;         (VAR G ?V10482_II127 GX03 ?V10482_TV210)
    ;         (VAR G ?V10482_II127 GX04 ?V10482_TV213)
    ;         (VAR G ?V10482_II127 GX05 ?V10482_TV216)
             (VAR G ?V10482_II127 GX06 ?V10482_TV219)
             (VAR G ?V10482_II127 GX07 ?V10482_TV222)
             (VAR G ?V10482_II127 GX03 ?V10482_TV229)
             (VAR G ?V10482_II127 GX04 ?V10482_TV232)
             (VAR G ?V10482_II127 GX05 ?V10482_TV235)
             (VAR G ?V10482_II127 GX06 ?V10482_TV238)
             (VAR G ?V10482_II127 GX07 ?V10482_TV241)
             (VAR G ?V10482_II127 GX01 ?V10482_TV246)
             (VAR G ?V10482_II127 G11R ?V10482_TV249)
             (VAR G ?V10482_II127 GX09 ?V10482_TV252)
             (VAR G ?V10482_II127 GX11 ?V10482_TV260)
             (VAR G ?V10482_II127 GX11 ?V10482_TV263)
             (VAR G ?V10482_II127 GX14 ?V10482_TV267)
             (VAR G ?V10482_II127 GX14 ?V10482_TV270)
             (VAR G ?V10482_II127 GX17 ?V10482_TV275)
             (VAR G ?V10482_II127 GX17 ?V10482_TV278)
             (VAR G ?V10482_II127 GX17 ?V10482_TV283)
             (VAR G ?V10482_II127 GX11 ?V10482_TV284)
             (VAR G ?V10482_II127 GX17 ?V10482_TV288)
             (VAR G ?V10482_II127 GX11 ?V10482_TV289)
             (VAR G ?V10482_II127 GX17 ?V10482_TV296)
             (VAR G ?V10482_II127 GX14 ?V10482_TV297)
             (VAR G ?V10482_II127 GX17 ?V10482_TV301)
             (VAR G ?V10482_II127 GX14 ?V10482_TV302)
             (VAR G ?V10482_II127 GX11 ?V10482_TV307)
             (VAR G ?V10482_II127 GX14 ?V10482_TV308)
             (VAR G ?V10482_II127 GX11 ?V10482_TV312)
             (VAR G ?V10482_II127 GX14 ?V10482_TV313)
             (VAR G ?V10482_II127 GX19 ?V10482_TV327)

             (and 
                (or 
                   (test (eq  ?V10482_TV153 "12"))
                   (test (eq  ?V10482_TV156 "12"))
                   (test (eq  ?V10482_TV159 "12"))
                   (test (eq  ?V10482_TV162 "12"))
                   (test (eq  ?V10482_TV165 "12"))
                )
                (or 
                   (test (eq  ?V10482_TV172 "YU"))
                   (test (eq  ?V10482_TV175 "YU"))
                   (test (eq  ?V10482_TV178 "YU"))
                   (test (eq  ?V10482_TV181 "YU"))
                   (test (eq  ?V10482_TV184 "YU"))
                )
             )
             (or 
                (test (eq  ?V10482_TV191 "34"))
                (test (eq  ?V10482_TV194 "34"))
                (test (eq  ?V10482_TV197 "34"))
                (test (eq  ?V10482_TV200 "34"))
    ;            (test (eq  ?V10482_TV203 "34"))
             )
    )
    )
    =>
    (assert (XYZ 123))
    )

     
    • Gary Riley

      Gary Riley - 2009-06-13

      You don't mention what OS/compiler/version of CLIPS you're using.

       
      • vranoch

        vranoch - 2009-06-15

        OS: WinXP, Compiler: MS VisualStudio Visual C++ 2005, Clips: 6.24

         
    • NovikovAG

      NovikovAG - 2009-07-01

      I have no problem with this rule on WinXP SP3, CLIPS v6.3 and CLIPS v6.22

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks