Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: drools-verifier
    • Labels:
      None

      Description

      Restrictions are not needed in this rule.

      rule "Pattern possibility that is always true"
      when
      a: Restriction()
      b: Restriction()
      $pp: SubPattern()
      Opposites(
      (
      left == a && right memberOf $pp.items
      ) && (
      left == b && right memberOf $pp.items
      )
      )
      then
      insert( new AlwaysTrue( $pp, a, b ) );
      end

      Because it could be simply written as:
      when
      $pp: SubPattern()
      Opposites( $left: left memberOf $pp.items &&
      $right: right memberOf $pp.items )
      then
      insert( new AlwaysTrue( $pp, $left, $right ) );
      end

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Rikkola Toni Rikkola
                Reporter:
                Rikkola Toni Rikkola
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: