Package daikon
Class PptSlice3
-
- All Implemented Interfaces:
Serializable
public final class PptSlice3 extends PptSlice
Contains all of the invariants over a particular set of 3 variables.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class PptSlice
PptSlice.ArityPptnameComparator, PptSlice.ArityVarnameComparator
-
Nested classes/interfaces inherited from class Ppt
Ppt.NameComparator
-
-
Field Summary
Fields Modifier and Type Field Description static Logger
debugMerge
static Logger
debugSpecific
Debug tracer.-
Fields inherited from class PptSlice
debug, debugFlow, debugGeneral, debugGuarding, invs, lineSep, parent
-
Fields inherited from class Ppt
emptyInvList, var_infos
-
-
Constructor Summary
Constructors Constructor Description PptSlice3(PptTopLevel parent, VarInfo[] var_infos)
Create a new PptSlice3.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Invariant>
add(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.List<Invariant>
add_val_bu(@Interned Object val1, @Interned Object val2, @Interned Object val3, int mod1, int mod2, int mod3, int count)
void
addInvariant(Invariant invariant)
int
arity()
protected PptSlice
cloneAndPivot(VarInfo[] argNewVarInfos)
Copy invariants from this slice to a new slice over the variables argNewVarInfos.void
instantiate_invariants()
Creates all of the invariants that are appropriate for this slice.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.void
merge_invariants()
Creates invariants at this ppt by merging invariants from each of its children.int
num_samples()
Returns the number of (non-missing) samples observed at this slice.int
num_values()
Returns an upper bound on the number of distinct values observed at this slice.-
Methods inherited from class PptSlice
allPrestate, contains_inv, contains_inv_exact, containsOnlyGuardingPredicates, copy_new_invs, find_inv_by_class, find_inv_exact, is_inv_true, log, name, processOmissions, remove_falsified, removeInvariant, removeInvariants, repCheck, toString, usesVar, usesVar, usesVarDerived
-
Methods inherited from class Ppt
containsVar, find_var_by_name, indexOf, trimToSize, varNames, varNames
-
-
-
-
Field Detail
-
debugSpecific
public static final Logger debugSpecific
Debug tracer.
-
debugMerge
public static final Logger debugMerge
-
-
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
-
arity
public final int arity(@UnknownInitialization(PptSlice.class) PptSlice3 this)
-
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 classPptSlice
-
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 classPptSlice
-
add
public List<Invariant> add(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.)
-
add_val_bu
public List<Invariant> add_val_bu(@Interned Object val1, @Interned Object val2, @Interned Object val3, int mod1, int mod2, int mod3, int count)
-
addInvariant
public void addInvariant(Invariant invariant)
- Specified by:
addInvariant
in classPptSlice
-
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:
- Find all of the child invariants. These are the invariants in the matching slice of each child.
- 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'
- Each invariant that is found at each of the children is then merged to possibly create a parent invariant.
-
-