Package daikon

Class PptSlice3

    • Constructor Detail

      • PptSlice3

        public PptSlice3​(PptTopLevel parent,
                         VarInfo[] var_infos)
        Create a new PptSlice3. The var_infos must be in varinfo_index order.
    • Method Detail

      • instantiate_invariants

        public void instantiate_invariants()
        Creates all of the invariants that are appropriate for this slice. No invariants are created unless the variables in the slice are compatible. If the variables are compatible, invariants that match the type of the slices variables are created.
      • instantiate_invariants

        public void instantiate_invariants​(List<Invariant> proto_invs)
        Creates all of the invariants that are appropriate for this slice based on the list of invariants passed in. No invariants are created unless the variables in the slice are compatible. If the variables are compatible, invariants that match the type of the slices variables are created.
      • num_samples

        public int num_samples​(@UnknownInitialization @GuardSatisfied PptSlice3 this)
        Returns the number of (non-missing) samples observed at this slice.
        Specified by:
        num_samples in class PptSlice
      • num_values

        public int num_values()
        Returns an upper bound on the number of distinct values observed at this slice. This is not the number of samples observed.
        Specified by:
        num_values in class PptSlice
      • add

        public List<Invariantadd​(ValueTuple full_vt,
                                   int count)
        This procedure accepts a sample (a ValueTuple), extracts the values from it, casts them to the proper types, and passes them along to the invariants proper. (The invariants accept typed values rather than a ValueTuple that encapsulates objects of any type whatever.)
      • cloneAndPivot

        protected PptSlice cloneAndPivot​(VarInfo[] argNewVarInfos)
        Copy invariants from this slice to a new slice over the variables argNewVarInfos. The new slice should not already exist.
      • merge_invariants

        public void merge_invariants()
        Creates invariants at this ppt by merging invariants from each of its children. An invariant must exist at each of the children in order for it to be created here (at the parent). Additionally, some invariants have state information that must be merged. This is done by the invariant itself.

        The basic steps are:

        1. Find all of the child invariants. These are the invariants in the matching slice of each child.
        2. For each invariant class, build a list of all of the invariants of that class. Note that some invariant classes (eg, functionBinary) contain distinct invariants, each of which must be merged separately. See Invariant.Match for more information concerning what makes an invariant the 'same'
        3. Each invariant that is found at each of the children is then merged to possibly create a parent invariant.