revisionlogic
Class Contradiction

java.lang.Object
  extended byrevisionlogic.ISent
      extended byrevisionlogic.Contradiction

final class Contradiction
extends ISent

Contradiction represents a contradiction. It is a concrete subclass of ISent.

Author:
Daphne Liu, daphnel@sfu.ca

Field Summary
 
Fields inherited from class revisionlogic.ISent
ATOM, BIIMP, CONJ, CONT, DIS, IMP, NEG, TAUT
 
Constructor Summary
(package private) Contradiction()
           
 
Method Summary
 java.lang.Object clone()
          Returns a reference to this Contradiction.
(package private)  ISent conjunctionsIn()
          Returns a reference to this Contradiction, as the dnf transformation of a contradiction F remains the same as the contradiction.
(package private)  ISent disjunctionsIn()
          Returns a reference to this Contradiction, as the cnf transformation of a contradiction F remains the same as the contradiction.
 boolean equals(java.lang.Object s)
          Checks if this Contradiction equals s.
(package private)  java.util.HashSet getAtoms()
          Returns the empty set of literals of this Contradiction.
 ISent getCNF()
          Returns a reference to this Contradiction, as the cnf transformation of a contradiction F remains the same as the contradiction.
 ISent getCNFUI()
          Returns a reference to this Contradiction, as the cnf transformation of a contradiction F remains the same as the contradiction.
(package private)  int getDepth()
          Returns the depth of this Contradiction.
 ISent getDNFUI()
          Returns a reference to this Contradiction, as the dnf transformation of a contradiction F remains the same as the contradiction.
 java.lang.String getLabel()
          Returns the string representation of this Contradiction.
(package private)  java.lang.StringBuffer getLabelSB()
          Returns null as this method is never invoked on this Contradiction but implemented only to satisfy the abstract specification of ISent.
 int getType()
          Returns the type of this Contradiction.
(package private)  ISent implicationsOut()
          Returns a reference to this Contradiction, as the cnf and dnf transformations of a contradiction F remain the same as the contradiction.
 boolean isConsistent()
          Returns false to indicate this Contradiction is itself inconsistent.
(package private)  ISent negationsIn()
          Returns a reference to this Contradiction, as the cnf and dnf transformations of a contradiction F remain the same as the contradiction.
 
Methods inherited from class revisionlogic.ISent
getDIMACSFormat, isConsistent, isConsistent, isInconsistentSList, isprConsistent
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Contradiction

Contradiction()
Method Detail

clone

public java.lang.Object clone()
Returns a reference to this Contradiction.

This shallow cloning is acceptable since the cnf and dnf transformations of a contradiction F remain the same as the contradiction.

Specified by:
clone in class ISent
Returns:
a reference to this Contradiction.

equals

public boolean equals(java.lang.Object s)
Checks if this Contradiction equals s.

Specified by:
equals in class ISent
Returns:
true if s is a Contradiction, false otherwise.

getDepth

int getDepth()
Returns the depth of this Contradiction.

Specified by:
getDepth in class ISent
Returns:
always 0 for the depth of this Contradiction.

getType

public int getType()
Returns the type of this Contradiction.

Specified by:
getType in class ISent
Returns:
an int indicating the contradiction type.

isConsistent

public boolean isConsistent()
Returns false to indicate this Contradiction is itself inconsistent.

Overrides:
isConsistent in class ISent
Returns:
always false to indicate this Contradiction is itself inconsistent.

implicationsOut

ISent implicationsOut()
Returns a reference to this Contradiction, as the cnf and dnf transformations of a contradiction F remain the same as the contradiction.

Specified by:
implicationsOut in class ISent
Returns:
a reference to this Contradiction.

negationsIn

ISent negationsIn()
Returns a reference to this Contradiction, as the cnf and dnf transformations of a contradiction F remain the same as the contradiction.

Specified by:
negationsIn in class ISent
Returns:
a reference to this Contradiction.

disjunctionsIn

ISent disjunctionsIn()
Returns a reference to this Contradiction, as the cnf transformation of a contradiction F remains the same as the contradiction.

Specified by:
disjunctionsIn in class ISent
Returns:
a reference to this Contradiction.

conjunctionsIn

ISent conjunctionsIn()
Returns a reference to this Contradiction, as the dnf transformation of a contradiction F remains the same as the contradiction.

Specified by:
conjunctionsIn in class ISent
Returns:
a reference to this Contradiction.

getCNF

public ISent getCNF()
Returns a reference to this Contradiction, as the cnf transformation of a contradiction F remains the same as the contradiction.

Overrides:
getCNF in class ISent
Returns:
a reference to this Contradiction.

getCNFUI

public ISent getCNFUI()
Returns a reference to this Contradiction, as the cnf transformation of a contradiction F remains the same as the contradiction.

This method is invoked only by the ListSent constructors.

Overrides:
getCNFUI in class ISent
Returns:
a reference to this Contradiction.

getDNFUI

public ISent getDNFUI()
Returns a reference to this Contradiction, as the dnf transformation of a contradiction F remains the same as the contradiction.

This method is invoked only by the ListSent constructors.

Overrides:
getDNFUI in class ISent
Returns:
a reference to this Contradiction.

getLabel

public java.lang.String getLabel()
Returns the string representation of this Contradiction.

Overrides:
getLabel in class ISent
Returns:
the string representation F of this Contradiction.

getLabelSB

java.lang.StringBuffer getLabelSB()
Returns null as this method is never invoked on this Contradiction but implemented only to satisfy the abstract specification of ISent.

Specified by:
getLabelSB in class ISent
Returns:
null.

getAtoms

java.util.HashSet getAtoms()
Returns the empty set of literals of this Contradiction.

Specified by:
getAtoms in class ISent
Returns:
the empty HashSet of literals of this Contradiction.