net.sf.bddbddb
Class NumberingRule
java.lang.Object
net.sf.bddbddb.InferenceRule
net.sf.bddbddb.NumberingRule
- All Implemented Interfaces:
- IterationElement
public class NumberingRule
- extends InferenceRule
This class represents a special kind of rule used for numbering paths.
The form of the rule is as follows:
pathNum(a,b,x,y) :- A(a,b),B(b,c),C(c,d),D(d,e). number
The subgoal relations (A, B, C, and D) define the edges of the graph.
The first two variables of the head relation define the edge you want
to number, and the next two variables are filled in with the number
of the source and destination, respectively.
- Version:
- $Id: NumberingRule.java 585 2005-06-10 18:04:11Z joewhaley $
- Author:
- jwhaley
Method Summary |
Variable |
checkUnnecessaryVariables()
Checks to see if there are any variables that only appear once. |
void |
reportStats()
Report statistics about this rule. |
java.util.Collection |
split(int myIndex)
Splits a rule into a collection of rules, such that each of the new rules
has only two subgoals. |
boolean |
update()
Update the head relation of this rule based on the subgoal relations. |
Methods inherited from class net.sf.bddbddb.InferenceRule |
calculateNecessaryVariables, copyOptions, free, fromXMLElement, generateIR_incremental, generateIR, getAttribute, getHead, getNecessaryVariables, getRelationToDefiningRule, getRelationToUsingRule, getSubgoals, getUnnecessaryVariables, getVariable, getVariables, getVarNameMap, hashCode, numberOfVariables, toString, toXMLElement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
split
public java.util.Collection split(int myIndex)
- Description copied from class:
InferenceRule
- Splits a rule into a collection of rules, such that each of the new rules
has only two subgoals. The current rule is simply mutated and not returned
in the collection.
- Overrides:
split
in class InferenceRule
- Parameters:
myIndex
- index number used to name the new rules
- Returns:
- collection of new inference rules
checkUnnecessaryVariables
public Variable checkUnnecessaryVariables()
- Description copied from class:
InferenceRule
- Checks to see if there are any variables that only appear once.
- Overrides:
checkUnnecessaryVariables
in class InferenceRule
update
public boolean update()
- Description copied from class:
InferenceRule
- Update the head relation of this rule based on the subgoal relations.
Returns true if the head relation changed.
- Specified by:
update
in class InferenceRule
- Returns:
- true if the head relation changed
reportStats
public void reportStats()
- Description copied from class:
InferenceRule
- Report statistics about this rule.
- Specified by:
reportStats
in class InferenceRule
Copyright © 2004-2008 Stanford SUIF Compiler Group. All Rights Reserved.