soot.jimple.toolkits.scalar
Class ToppedSet

java.lang.Object
  |
  +--soot.jimple.toolkits.scalar.ToppedSet
All Implemented Interfaces:
FlowSet

public class ToppedSet
extends java.lang.Object
implements FlowSet

Represents information for flow analysis, adding a top element to a lattice. A FlowSet is an element of a lattice; this lattice might be described by a FlowUniverse. If add, remove, size, isEmpty, toList and contains are implemented, the lattice must be the powerset of some set.


Constructor Summary
ToppedSet(FlowSet under)
           
 
Method Summary
 void add(java.lang.Object obj, FlowSet d)
          Adds obj to dest.
 void clear()
          Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)
 java.lang.Object clone()
          Clones the current FlowSet.
 boolean contains(java.lang.Object obj)
          Returns true if this FlowSet contains obj.
 void copy(FlowSet d)
          Copies the current FlowSet into dest.
 void difference(FlowSet o, FlowSet d)
          Returns the set difference (this join ~other) of this FlowSet and other, putting result into dest.
 boolean equals(java.lang.Object o)
           
 void intersection(FlowSet o, FlowSet d)
          Returns the intersection (meet) of this FlowSet and other, putting result into dest.
 boolean isEmpty()
          Returns true if this FlowSet is the empty set.
 boolean isTop()
           
 void remove(java.lang.Object obj, FlowSet d)
          Removes obj from dest.
 void setTop(boolean top)
           
 int size()
          Returns the size of the current FlowSet.
 java.util.List toList()
          Returns an unbacked list of contained objects for this FlowSet.
 java.lang.String toString()
           
 void union(FlowSet o, FlowSet d)
          Returns the union (join) of this FlowSet and other, putting result into dest.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ToppedSet

public ToppedSet(FlowSet under)
Method Detail

setTop

public void setTop(boolean top)

isTop

public boolean isTop()

clone

public java.lang.Object clone()
Description copied from interface: FlowSet
Clones the current FlowSet.
Specified by:
clone in interface FlowSet
Overrides:
clone in class java.lang.Object

copy

public void copy(FlowSet d)
Description copied from interface: FlowSet
Copies the current FlowSet into dest.
Specified by:
copy in interface FlowSet

clear

public void clear()
Description copied from interface: FlowSet
Sets this FlowSet to the empty set (more generally, the bottom element of the lattice.)
Specified by:
clear in interface FlowSet

union

public void union(FlowSet o,
                  FlowSet d)
Description copied from interface: FlowSet
Returns the union (join) of this FlowSet and other, putting result into dest.
Specified by:
union in interface FlowSet

intersection

public void intersection(FlowSet o,
                         FlowSet d)
Description copied from interface: FlowSet
Returns the intersection (meet) of this FlowSet and other, putting result into dest.
Specified by:
intersection in interface FlowSet

difference

public void difference(FlowSet o,
                       FlowSet d)
Description copied from interface: FlowSet
Returns the set difference (this join ~other) of this FlowSet and other, putting result into dest.
Specified by:
difference in interface FlowSet

isEmpty

public boolean isEmpty()
Description copied from interface: FlowSet
Returns true if this FlowSet is the empty set.
Specified by:
isEmpty in interface FlowSet

size

public int size()
Description copied from interface: FlowSet
Returns the size of the current FlowSet. (optional operation)
Specified by:
size in interface FlowSet

add

public void add(java.lang.Object obj,
                FlowSet d)
Description copied from interface: FlowSet
Adds obj to dest. (optional operation)
Specified by:
add in interface FlowSet

remove

public void remove(java.lang.Object obj,
                   FlowSet d)
Description copied from interface: FlowSet
Removes obj from dest. (optional operation)
Specified by:
remove in interface FlowSet

contains

public boolean contains(java.lang.Object obj)
Description copied from interface: FlowSet
Returns true if this FlowSet contains obj. (optional operation)
Specified by:
contains in interface FlowSet

toList

public java.util.List toList()
Description copied from interface: FlowSet
Returns an unbacked list of contained objects for this FlowSet. (optional operation)
Specified by:
toList in interface FlowSet

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object