LBJ2.infer
Class PropositionalNAryConstraint

java.lang.Object
  extended by LBJ2.infer.Constraint
      extended by LBJ2.infer.PropositionalConstraint
          extended by LBJ2.infer.PropositionalNAryConstraint
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
PropositionalAtLeast, PropositionalConjunction, PropositionalDisjunction

public abstract class PropositionalNAryConstraint
extends PropositionalConstraint

Represents a propositional constraint with an arbitrary number of arguments, usually assumed to be greater than or equal to 2.


Field Summary
protected  java.util.HashSet children
          The children of the operator.
 
Constructor Summary
PropositionalNAryConstraint()
          Default constructor.
 
Method Summary
 java.lang.Object clone()
          This method returns a shallow clone.
 void consolidateVariables(java.util.AbstractMap m)
          Replaces all unquantified variables with the unique copy stored as a value of the given map; also instantiates all quantified variables and stores them in the given map.
 boolean contains(PropositionalConstraint c)
          Determines whether the given constraint is a term of this constraint.
 Constraint[] getChildren()
          Returns the children of this constraint in an array.
 int size()
          Returns the number of terms in this constraint.
 
Methods inherited from class LBJ2.infer.PropositionalConstraint
CNF, DNF, moreGeneralThan, moreSpecificThan, moreSpecificThan, moreSpecificThan, moreSpecificThan, moreSpecificThan, moreSpecificThan, moreSpecificThan, moreSpecificThan, negate, simplify, toString, write
 
Methods inherited from class LBJ2.infer.Constraint
evaluate, runVisit
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

children

protected java.util.HashSet children
The children of the operator.

Constructor Detail

PropositionalNAryConstraint

public PropositionalNAryConstraint()
Default constructor.

Method Detail

consolidateVariables

public void consolidateVariables(java.util.AbstractMap m)
Replaces all unquantified variables with the unique copy stored as a value of the given map; also instantiates all quantified variables and stores them in the given map.

Specified by:
consolidateVariables in class Constraint
Parameters:
m - The map in which to find unique copies of the variables.

getChildren

public Constraint[] getChildren()
Returns the children of this constraint in an array.

Specified by:
getChildren in class Constraint
Returns:
The children of this constraint in an array.

contains

public boolean contains(PropositionalConstraint c)
Determines whether the given constraint is a term of this constraint.

Parameters:
c - The given constraint.
Returns:
true iff the given constraint is contained in this constraint.

size

public int size()
Returns the number of terms in this constraint.

Returns:
The number of terms in this constraint.

clone

public java.lang.Object clone()
This method returns a shallow clone.

Overrides:
clone in class PropositionalConstraint
Returns:
A shallow clone.