Package daikon

Class 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 Detail

    • Method Detail

      • get

        @Pure
        public @Nullable 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

        @Pure
        public @Nullable 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

        @Pure
        @EnsuresNonNullIf(result=true,
                          expression="get(#1)")
        public boolean containsName​(String name)
        Returns whether or not 'name' is the name of a Ppt in the map. Note that conditional program points are not stored in the map by name. They are only available through their parent.
      • nameStringSet

        public Collection<@KeyFor("nameToPpt") StringnameStringSet()
        Returns an unmodifiable version of the keySet.
        Returns:
        an unmodifiable version of the keySet
      • pptIterator

        public Iterator<PptTopLevelpptIterator()
        Returns an iterator over the PptTopLevels in this, sorted by Ppt.NameComparator on their names. The sorting makes the iterator deterministic.

        If you wish to merely iterate over the result in a foreach loop, use pptIterable() instead.

        Returns:
        an iterator over the PptTopLevels in this, sorted by Ppt.NameComparator on their names
        See Also:
        pptIterable()
      • pptIterable

        public Iterable<PptTopLevelpptIterable()
        Returns an iterable over the PptTopLevels in this, sorted by Ppt.NameComparator on their names. The sorting makes the iterator deterministic.

        It is a wrapper around pptIterator() that can be used in a foreach loop.

        Returns:
        an iterable over the PptTopLevels in this, sorted by Ppt.NameComparator on their names
        See Also:
        pptIterator()
      • ppt_all_iterator

        public Iterator<PptTopLevelppt_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).

        If you wish to merely iterate over the result in a Java new-style for loop ("foreach loop"), use ppt_all_iterable() instead.

        Returns:
        an iterator over the PptTopLevels in this, sorted by Ppt.NameComparator on their names
        See Also:
        ppt_all_iterable()
      • ppt_all_iterable

        public Iterable<PptTopLevelppt_all_iterable()
        Returns an iterable over the PptTopLevels in this, sorted by Ppt.NameComparator on their names. This differs from pptIterable() in that it includes all ppts (including conditional ppts).

        It is a wrapper around ppt_all_iterator() that can be used in a Java new-style for loop ("foreach loop").

        Returns:
        an iterable over the PptTopLevels in this, sorted by Ppt.NameComparator on their names
        See Also:
        ppt_all_iterator()
      • 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

        @Pure
        public int countSlices()
        Return the number of active PptSlices.
      • size

        @Pure
        public int size()
      • removeUnsampled

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