daikon
Class PptMap

Object
  extended by PptMap
All Implemented Interfaces:
Serializable

public class PptMap
extends Object
implements Serializable

Maps from a program point name (a String) to a PptTopLevel.

This is the major data structure of Daikon. All the invariants can be found in it, and an .inv file contains (only) the serialized form of this object.

See Also:
Serialized Form

Constructor Summary
PptMap()
           
 
Method Summary
 void add(PptTopLevel ppt)
           
 void addAll(List<PptTopLevel> ppts)
           
 Collection<PptTopLevel> all_ppts()
          Returns all of the program points in the map
 Collection<PptTopLevel> asCollection()
           
 boolean containsName(String name)
          Returns whether or not 'name' is in the map.
 int countSlices()
          Return the number of active PptSlices.
 PptTopLevel get(PptName name)
          Get the pptname 'name' from the map.
 PptTopLevel get(String name)
          Get the pptname named 'name' from the map.
 Collection<String> nameStringSet()
           
 Iterator<PptTopLevel> ppt_all_iterator()
           
 Iterator<PptTopLevel> pptIterator()
           
 void removeUnsampled()
          Blow away any PptTopLevels that never saw any samples (to reclaim space).
 void repCheck()
          Check the rep invariant of this.
 int size()
           
 String toString()
           
 void trimToSize()
          Iterate over the PptTopLevels and trim them.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PptMap

public PptMap()
Method Detail

add

public void add(PptTopLevel ppt)

addAll

public void addAll(List<PptTopLevel> ppts)

get

public PptTopLevel get(String name)
Get the pptname named 'name' from the map. Note that conditional program points are not stored in the map by name. They are only available through their parent.


get

public PptTopLevel get(PptName name)
Get the pptname 'name' from the map. Note that conditional program points are not stored in the map by name. They are only available through their parent.


containsName

public boolean containsName(String name)
Returns whether or not 'name' is in the map. Note that conditional program points are not stored in the map by name. They are only available through their parent.


all_ppts

public Collection<PptTopLevel> all_ppts()
Returns all of the program points in the map


asCollection

public Collection<PptTopLevel> asCollection()
Returns:
unstably-ordered collection of PptTopLevels
See Also:
pptIterator()

nameStringSet

public Collection<String> nameStringSet()

pptIterator

public Iterator<PptTopLevel> pptIterator()
Returns:
an iterator over the PptTopLevels in this, sorted by Ppt.NameComparator on their names. This is good for consistency.

ppt_all_iterator

public Iterator<PptTopLevel> ppt_all_iterator()
Returns:
an iterator over the PptTopLevels in this, sorted by Ppt.NameComparator on their names. This differs from pptIterator() in that it includes all ppts (including conditional ppts).

trimToSize

public void trimToSize()
Iterate over the PptTopLevels and trim them.


repCheck

public void repCheck()
Check the rep invariant of this. Throws an Error if incorrect.


countSlices

public int countSlices()
Return the number of active PptSlices.


size

public int size()

toString

public String toString()
Overrides:
toString in class Object

removeUnsampled

public void removeUnsampled()
Blow away any PptTopLevels that never saw any samples (to reclaim space).