Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3488

infinite loop in rule with accumulate, even if the then part does nothing

    Details

    • Steps to Reproduce:
      Hide

      Only one rule:

      rule "test.n3 0"
      when
      $LIST : java.util.List( )
      from accumulate( $Triple_1 : Triple( $CN : subject, predicate == "<http://deductions.sf.net/samples/princing.n3p.n3#number>", $N : object )
      , collectList( $N ) )
      $NUMBER : Number() from accumulate(
      $NUMBER_STRING_ : String() from $LIST
      , sum( Double.parseDouble( $NUMBER_STRING_)) )
      then
      system.out ("test.n3 0 fires");
      end

      Needs to have 3 object asserted:

      new Triple( ( "<CN1>", "<number>", "200" );
      new Triple( ( "<CN2>", "<number>", "100" );
      new Triple( ( "<CN3>", "<number>", "100" );

      The Triple class :

      http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/src/main/java/n3_project/helpers/Triple.java

      Show
      Only one rule: rule "test.n3 0" when $LIST : java.util.List( ) from accumulate( $Triple_1 : Triple( $CN : subject, predicate == "< http://deductions.sf.net/samples/princing.n3p.n3#number >", $N : object ) , collectList( $N ) ) $NUMBER : Number() from accumulate( $NUMBER_STRING_ : String() from $LIST , sum( Double.parseDouble( $NUMBER_STRING_)) ) then system.out ("test.n3 0 fires"); end Needs to have 3 object asserted: new Triple( ( "<CN1>", "<number>", "200" ); new Triple( ( "<CN2>", "<number>", "100" ); new Triple( ( "<CN3>", "<number>", "100" ); The Triple class : http://eulergui.svn.sourceforge.net/viewvc/eulergui/trunk/eulergui/src/main/java/n3_project/helpers/Triple.java

      Description

      There is an infinite loop .
      It happens in the addPackage step.
      It happens whatever is in the then part

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mfusco Mario Fusco
                Reporter:
                jmvanel Jean-Marc Vanel
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: