/*
 * Copyright 2015 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/

import org.drools.benchmark.model.*

rule R1 salience 1 when
    $b1 : B( i < 2, $j1 : j < 1000, $bool1 : b == false )
    $b2 : B( i < 2, $j2 : j < 1000, $bool2 : b == true )
then
    modify($b1) { setJ($j1 + 1), setB(!$bool1) };
    modify($b2) { setJ($j2 + 1), setB(!$bool2) };
end

rule R2 salience 2 when
    A( $a_i : i, $a_b : b )
    not B( i < $a_i, b == $a_b )
then
end
