saffron.opt
Class RelSet

java.lang.Object
  |
  +--saffron.opt.RelSet

class RelSet
extends Object

A RelSet is an equivalence-set of expressions; that is, a set of expressions which have identical semantics. We are generally interested in using the expression which has the lowest cost.

All of the expressions in an RelSet have the same calling convention.

Since:
16 December, 2001
Version:
$Id: //open/saffron/src/main/saffron/opt/RelSet.java#7 $
Author:
jhyde

Field Summary
(package private)  ArrayList abstractConverters
          List of AbstractConverter objects which have not yet been satisfied.
(package private)  RelSet equivalentSet
          Set to the superseding set when this is found to be equivalent to another set.
(package private)  int id
           
(package private)  Rel rel
           
(package private)  ArrayList rels
           
(package private)  ArrayList subsets
           
(package private)  Set variablesPropagated
          Names of variables which are set by relational expressions in this set and available for use by parent and child expressions.
(package private)  Set variablesUsed
          Names of variables which are used by relational expressions in this set.
 
Constructor Summary
(package private) RelSet()
           
 
Method Summary
 RelSubset add(Rel rel)
          Add a relational expression to a set, with its results available under a particular calling convention.
(package private)  void addInternal(Rel rel)
          Adds an expression rel to this set, without creating a RelSubset.
private  void failType(Rel rel)
           
(package private)  RelSubset getOrCreateSubset(Cluster cluster, CallingConvention convention)
           
 ArrayList getParentRels()
          Returns all of the Rels which reference Rels in this set.
 RelSubset getSubset(CallingConvention convention)
           
(package private)  void mergeWith(VolcanoPlanner planner, RelSet otherSet)
          Merges otherSet into this one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rel

Rel rel

id

int id

rels

final ArrayList rels

subsets

final ArrayList subsets

equivalentSet

RelSet equivalentSet
Set to the superseding set when this is found to be equivalent to another set.


variablesPropagated

Set variablesPropagated
Names of variables which are set by relational expressions in this set and available for use by parent and child expressions.


variablesUsed

Set variablesUsed
Names of variables which are used by relational expressions in this set.


abstractConverters

ArrayList abstractConverters
List of AbstractConverter objects which have not yet been satisfied.

Constructor Detail

RelSet

RelSet()
Method Detail

add

public RelSubset add(Rel rel)
Add a relational expression to a set, with its results available under a particular calling convention. An expression may be in the set several times with different calling conventions (and hence different costs).


addInternal

void addInternal(Rel rel)
Adds an expression rel to this set, without creating a RelSubset. (Called only from RelSubset.add(saffron.rel.Rel).


failType

private void failType(Rel rel)

getOrCreateSubset

RelSubset getOrCreateSubset(Cluster cluster,
                            CallingConvention convention)

getSubset

public RelSubset getSubset(CallingConvention convention)

mergeWith

void mergeWith(VolcanoPlanner planner,
               RelSet otherSet)
Merges otherSet into this one. You generally call this method after you discover that two relational expressions are equivalent, and hence their sets are equivalent also. After you have called this method, otherSet is obsolete, this otherSet is still alive.


getParentRels

public ArrayList getParentRels()
Returns all of the Rels which reference Rels in this set.


SourceForge.net_Logo