                copy_actionlist($rule->{"Action2"}, \@action2);
                $oper->{"Action2"} = \@action2;
              }
              subst_actionlist(\%subst, $oper->{"Action2"}, '$'); 
            }
            subst_string(\%subst, $oper->{"Desc2"}, '$'); 
          } 

          execute_actionlist($oper->{"Action2"}, $oper->{"Desc2"});
        }

        delete $corr_list{$key};
        delete $rule->{"Operations"}->{$key};
      }

      # if the operation type is PairWithWindow, execute the 2nd action and
      # terminate the operation (note that the event correlation window is
      # not checked for the execution of the 1st action, in order to achieve
      # good event ordering - if the 1st action creates a synthetic event, 
      # it would always appear after the current event)

      elsif ($rule->{"Type"} == PAIR_W_WINDOW) {

        $ret = 1;
        ++$rule->{"MatchCount"};

        if (scalar(%subst)) { 

          if (exists($rule->{"ActVolat2"})) { 
            if (!exists($oper->{"Act2Copied"})) {
              copy_actionlist($rule->{"Action2"}, \@action2);
              $oper->{"Action2"} = \@action2;
            }
            subst_actionlist(\%subst, $oper->{"Action2"}, '$'); 
          }
          subst_string(\%subst, $oper->{"Desc2"}, '$'); 
        } 

        execute_actionlist($oper->{"Action2"}, $oper->{"Desc2"});

        delete $corr_list{$key};
        delete $rule->{"Operations"}->{$key};
      }
    }
  }

  # if there were 1 or more matches found, return 1, otherwise return 0

  return $ret;

}


# Parameters: par1 - name of the configuration file
#             par2 - rule index inside the configuration file
#             par3 - trace hash for detecting loops during recursive calls
#                    (this parameter is needed for processing Jump rules)
# Action: match the par2-th rule from the file par1 against input, and
#         process the rule if match was found.
#         The function returns the rule index in the configuration file
#         where the processing should continue. 

sub match_1pattern_rule {

  my($conffile, $index, $trace) = @_;
  my($rule, %subst, @context);

  $rule = $configuration{$conffile}->[$index];

  # check if the rule context expression must be evaluated before 
  # comparing input line(s) with the pattern; if the expression
  # evaluates FALSE, continue processing from 