saffron.opt
Class RuleCall

java.lang.Object
  |
  +--saffron.opt.RuleCall
Direct Known Subclasses:
RuleMatch, VolcanoPlanner.DeferringRuleCall

public class RuleCall
extends Object

A RuleCall is an invocation of a Rule with a set of relational expressions as arguments.


Field Summary
 Operand operand0
           
 Rel[] rels
           
 Rule rule
           
 
Constructor Summary
(package private) RuleCall(Operand operand)
           
protected RuleCall(Operand operand, Rel[] rels)
           
 
Method Summary
 Planner getPlanner()
           
(package private)  Rule getRule()
           
(package private)  void match(Rel rel)
          Applies this rule, with a given relexp in the first slot.
private  void matchRecurse(int solve)
           
protected  void onMatch()
          Called when all operands have matched.
 void transformTo(Rel rel)
          Called by the rule whenever it finds a match.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operand0

public final Operand operand0

rels

public final Rel[] rels

rule

public final Rule rule
Constructor Detail

RuleCall

RuleCall(Operand operand)

RuleCall

protected RuleCall(Operand operand,
                   Rel[] rels)
Method Detail

getRule

Rule getRule()

getPlanner

public Planner getPlanner()

match

void match(Rel rel)
Applies this rule, with a given relexp in the first slot.

Pre-condition:
operand0.matches(rel)

matchRecurse

private void matchRecurse(int solve)
Pre-condition:
solve > 0, solve <= rule.operands.length

onMatch

protected void onMatch()
Called when all operands have matched.


transformTo

public void transformTo(Rel rel)
Called by the rule whenever it finds a match.


SourceForge.net_Logo