satisfiabilityApplet.cnfParser
Class DisjunctionOfConjunctions

java.lang.Object
  extended bysatisfiabilityApplet.cnfParser.DisjunctionOfConjunctions
All Implemented Interfaces:
java.lang.Cloneable

public class DisjunctionOfConjunctions
extends java.lang.Object
implements java.lang.Cloneable

by Catherine Block id# 6319 Date: Sep 6, 2004 Time: 11:02:35 AM CS 180H todo convert this from conjunction A satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions is a clauseList of disjunctions. Delimiters are defined in the satisfiabilityApplet.cnfParser.Grammar class. The destructor method must be used to properly dispose of Conjunctions


Constructor Summary
DisjunctionOfConjunctions(java.util.List tokens)
          Constructor creates a new satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions after calling the constructors for the contained disjunctions.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions
 void convert()
          Mutator method that will effectively convert a DNF entry into its negated CNF form by switching the "not" status of all the variables
 void destructor()
          Destructor method must be called to properly destroy all the contents of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions
 boolean isTrue()
          Checks this conjunction to see if all of the disjunctions have a set value of true.
 java.lang.String toPolynomial()
          A polynomial representation of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions
 java.lang.String toString()
           
 java.util.List value()
          The clauseList of Disjunctions contained by this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisjunctionOfConjunctions

public DisjunctionOfConjunctions(java.util.List tokens)
                          throws ParseError
Constructor creates a new satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions after calling the constructors for the contained disjunctions.

Parameters:
tokens - A clauseList of tokens that reprensents a conjunction
Throws:
ParseError - - The clauseList of tokens does not parse to a conjunction
Method Detail

value

public java.util.List value()
The clauseList of Disjunctions contained by this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions.

Returns:
- The clauseList of Disjunctions contained by this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions.

isTrue

public boolean isTrue()
               throws UnsupportedTypeError
Checks this conjunction to see if all of the disjunctions have a set value of true.

Returns:
The truth value of this conjunction
Throws:
UnsupportedTypeError - One or more disjunctions in this conjunctions have not had their truth values set.

convert

public void convert()
Mutator method that will effectively convert a DNF entry into its negated CNF form by switching the "not" status of all the variables


clone

public java.lang.Object clone()
Creates a copy of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions

Returns:
A copy of this conjunction

toPolynomial

public java.lang.String toPolynomial()
A polynomial representation of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions

Returns:
- A polynomial representation of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions

destructor

public void destructor()
Destructor method must be called to properly destroy all the contents of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions


toString

public java.lang.String toString()
Returns:
A string representation of this object