revisionlogic
Class Tautology

java.lang.Object
  extended byrevisionlogic.ISent
      extended byrevisionlogic.Tautology

final class Tautology
extends ISent

Tautology represents a tautology. 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) Tautology()
           
 
Method Summary
 java.lang.Object clone()
          Returns a reference to this Tautology.
(package private)  ISent conjunctionsIn()
          Returns a reference to this Tautology, as the dnf transformation of a tautology T remains the same as the tautology.
(package private)  ISent disjunctionsIn()
          Returns a reference to this Tautology, as the cnf transformation of a tautology T remains the same as the tautology.
 boolean equals(java.lang.Object s)
          Checks if this Tautology equals s.
(package private)  java.util.HashSet getAtoms()
          Returns the empty set of literals of this Tautology.
 ISent getCNF()
          Returns a reference to this Tautology, as the cnf transformation of a tautology T remains the same as the tautology.
 ISent getCNFUI()
          Returns a reference to this Tautology, as the cnf transformation of a tautology T remains the same as the tautology.
(package private)  int getDepth()
          Returns the depth of this Tautology.
 ISent getDNFUI()
          Returns a reference to this Tautology, as the dnf transformation of a tautology T remains the same as the tautology.
 java.lang.String getLabel()
          Returns the string representation of this Tautology.
(package private)  java.lang.StringBuffer getLabelSB()
          Returns null as this method is never invoked on this Tautology but implemented only to satisfy the abstract specification of ISent.
 int getType()
          Returns the type of this Tautology.
(package private)  ISent implicationsOut()
          Returns a reference to this Tautology, as the cnf and dnf transformations of a tautology T remain the same as the tautology.
 boolean isConsistent()
          Returns true to indicate this Tautology is itself consistent.
(package private)  ISent negationsIn()
          Returns a reference to this Tautology, as the cnf and dnf transformations of a tautology T remain the same as the tautology.
 
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

Tautology

Tautology()
Method Detail

clone

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

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

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

equals

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

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

getDepth

int getDepth()
Returns the depth of this Tautology.

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

getType

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

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

isConsistent

public boolean isConsistent()
Returns true to indicate this Tautology is itself consistent.

Overrides:
isConsistent in class ISent
Returns:
always true to indicate this Tautology is itself consistent.

implicationsOut

ISent implicationsOut()
Returns a reference to this Tautology, as the cnf and dnf transformations of a tautology T remain the same as the tautology.

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

negationsIn

ISent negationsIn()
Returns a reference to this Tautology, as the cnf and dnf transformations of a tautology T remain the same as the tautology.

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

disjunctionsIn

ISent disjunctionsIn()
Returns a reference to this Tautology, as the cnf transformation of a tautology T remains the same as the tautology.

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

conjunctionsIn

ISent conjunctionsIn()
Returns a reference to this Tautology, as the dnf transformation of a tautology T remains the same as the tautology.

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

getCNF

public ISent getCNF()
Returns a reference to this Tautology, as the cnf transformation of a tautology T remains the same as the tautology.

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

getCNFUI

public ISent getCNFUI()
Returns a reference to this Tautology, as the cnf transformation of a tautology T remains the same as the tautology.

This method is invoked only by the ListSent constructors.

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

getDNFUI

public ISent getDNFUI()
Returns a reference to this Tautology, as the dnf transformation of a tautology T remains the same as the tautology.

This method is invoked only by the ListSent constructors.

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

getLabel

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

Overrides:
getLabel in class ISent
Returns:
the string representation T of this Tautology.

getLabelSB

java.lang.StringBuffer getLabelSB()
Returns null as this method is never invoked on this Tautology 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 Tautology.

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