revisionlogic
Class EquivalenceSet

java.lang.Object
  extended byrevisionlogic.EquivalenceSet

class EquivalenceSet
extends java.lang.Object

EquivalenceSet represents a set of equivalences or biconditionals.

Author:
Daphne Liu, daphnel@sfu.ca; Sven Thiele, sthiele@rz.uni-potsdam.de

Field Summary
(package private)  java.util.Vector m_Equivalences
          The set of equivalences or biconditionals.
 
Constructor Summary
(package private) EquivalenceSet()
          Creates a new EquivalenceSet.
 
Method Summary
(package private)  void addEquivalences_NumberedtoPrimed(java.util.Collection v, int n)
          Creates a set of biconditionals from the strings in v with the superscript n.
(package private)  void addEquivalences_PrimedtoUnprimed(java.util.Vector v)
          Creates a set of biconditionals from the strings in v.
(package private)  void clear()
          Clears the set of equivalences of this EquivalenceSet.
(package private)  java.util.Vector getEQSet(java.util.BitSet bs)
          Returns the corresponding set of equivalences for the BitSet bs.
(package private)  java.util.Vector getLiteralsFromEQSet(java.util.BitSet bs)
          Returns the corresponding set of literals for the BitSet bs.
(package private)  int getNumberOfEquivalences()
          Returns the number of equivalences of this EquivalenceSet.
(package private) static java.util.Vector pairDownToMaximal(java.util.Vector v)
          Returns all of the maximal elements (Vectors) of v.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Equivalences

java.util.Vector m_Equivalences
The set of equivalences or biconditionals.

Constructor Detail

EquivalenceSet

EquivalenceSet()
Creates a new EquivalenceSet.

Method Detail

clear

void clear()
Clears the set of equivalences of this EquivalenceSet.


addEquivalences_PrimedtoUnprimed

void addEquivalences_PrimedtoUnprimed(java.util.Vector v)
Creates a set of biconditionals from the strings in v. For example, given a v containing {p, q}, it creates a vector of ISents {p=p', q=q'}.

Parameters:
v - the Vector of strings from which to generate equivalences.

addEquivalences_NumberedtoPrimed

void addEquivalences_NumberedtoPrimed(java.util.Collection v,
                                      int n)
Creates a set of biconditionals from the strings in v with the superscript n. For example, given a v containing {p, q} and an int i, it creates a vector of ISents {p^i=p',q^i=q'}.

Parameters:
v - the Collection of strings from which to generate equivalences.
n - an int indicating the superscript for the generated equivalences.

getNumberOfEquivalences

int getNumberOfEquivalences()
Returns the number of equivalences of this EquivalenceSet.

Returns:
an int indicating the number of equivalences of this EquivalenceSet.

pairDownToMaximal

static java.util.Vector pairDownToMaximal(java.util.Vector v)
Returns all of the maximal elements (Vectors) of v. More precisely, suppose Vectors v1 and v2 are in v. If v1 is a subset of v2, then the returned Vector will contain v2 but not v1.

Parameters:
v - the Vector whose elements (Vectors) are to be compared to each other.
Returns:
a Vector containing only the maximal elements (Vectors).

getEQSet

java.util.Vector getEQSet(java.util.BitSet bs)
Returns the corresponding set of equivalences for the BitSet bs. For example, if a bit k in bs is set, then the returned set of equivalences will contain the biconditional indexed k.

Parameters:
bs - the BitSet whose corresponding equivalences are to be returned.
Returns:
a Vector containing the corresponding equivalences for bs.

getLiteralsFromEQSet

java.util.Vector getLiteralsFromEQSet(java.util.BitSet bs)
Returns the corresponding set of literals for the BitSet bs. For example, if a bit k in bs is set, then the returned set of literals will contain the first literal of the equivalence indexed k.

Parameters:
bs - the BitSet whose corresponding literals are to be returned.
Returns:
a Vector containing the corresponding literals for bs.