|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectPpt
PptSlice
public abstract class PptSlice
A Slice is a view of some of the variables for a program point. A program point (that is, PptTopLevel) does not directly contain invariants. Instead, slices contain the invariants that involve (all) the Slice's variables.
Suppose a program point has variables A, B, C, and D. There would be 4 unary slices -- one each for variables A, B, C, and D. There would be 6 binary slices -- for {A,B}, {A,C}, {A,D}, {B,C}, {B,D}, and {C,D}. There would be 4 ternary slices -- for {A,B,C}, {A,B,D}, {A,C,D}, and {B,C,D}.
| Nested Class Summary | |
|---|---|
static class |
PptSlice.ArityPptnameComparator
This class is used for comparing PptSlice objects. |
static class |
PptSlice.ArityVarnameComparator
This class is used for comparing PptSlice objects. |
| Nested classes/interfaces inherited from class Ppt |
|---|
Ppt.NameComparator |
| Field Summary | |
|---|---|
static Logger |
debug
Debug tracer. |
static Logger |
debugFlow
|
static Logger |
debugGeneral
Debug tracer for debugging both this and PptSlices. |
static Logger |
debugGuarding
|
Invariants |
invs
The invariants contained in this slice. |
protected static String |
lineSep
|
PptTopLevel |
parent
This is a slice of the 'parent' ppt. |
| Fields inherited from class Ppt |
|---|
emptyInvList, var_infos |
| Method Summary | |
|---|---|
abstract void |
addInvariant(Invariant inv)
|
boolean |
allPrestate()
|
abstract int |
arity()
|
boolean |
contains_inv_exact(Invariant inv)
Returns whether or not this slice contains an exact match for the specified invariant. |
boolean |
contains_inv(Invariant inv)
Returns whether or not this slice already contains the specified invariant. |
boolean |
containsOnlyGuardingPredicates()
|
PptSlice |
copy_new_invs(PptTopLevel ppt,
VarInfo[] vis)
|
Invariant |
find_inv_by_class(Class<? extends Invariant> cls)
Returns the invariant that matches the specified class if it exists. |
Invariant |
find_inv_exact(Invariant inv)
Returns the invariant that matches the specified invariant if it exists. |
boolean |
is_inv_true(Invariant inv)
Returns true if the invariant is true in this slice. |
void |
log(String msg)
Output specified log information if the PtpSlice class, and this ppt and variables are enabled for logging |
String |
name()
|
abstract int |
num_samples()
Return an approximation of the number of samples seen on this slice |
abstract int |
num_values()
Return an approximation of the number of distinct values seen on this slice |
void |
processOmissions(boolean[] omitTypes)
Remove the invariants noted in omitTypes |
protected void |
remove_falsified()
Removes any falsified invariants from our list. |
void |
removeInvariant(Invariant inv)
This method actually removes the invariant from its PptSlice. |
void |
removeInvariants(List<Invariant> to_remove)
|
void |
repCheck()
Check the internals of this slice. |
String |
toString()
For debugging only. |
void |
trimToSize()
Trim the collections used in this PptSlice. |
boolean |
usesVar(String name)
|
boolean |
usesVar(VarInfo vi)
|
boolean |
usesVarDerived(String name)
|
| Methods inherited from class Ppt |
|---|
containsVar, find_var_by_name, indexOf, varNames, varNames |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String lineSep
public static final Logger debug
public static final Logger debugGeneral
public static final Logger debugFlow
public static final Logger debugGuarding
public PptTopLevel parent
public Invariants invs
| Method Detail |
|---|
public abstract int arity()
public void trimToSize()
trimToSize in class Pptpublic final String name()
name in class Pptpublic boolean usesVar(VarInfo vi)
public boolean usesVar(String name)
public boolean usesVarDerived(String name)
public boolean allPrestate()
public abstract void addInvariant(Invariant inv)
public void removeInvariant(Invariant inv)
public void removeInvariants(List<Invariant> to_remove)
protected void remove_falsified()
public abstract int num_samples()
public abstract int num_values()
public boolean containsOnlyGuardingPredicates()
public void processOmissions(boolean[] omitTypes)
public void repCheck()
public PptSlice copy_new_invs(PptTopLevel ppt,
VarInfo[] vis)
public String toString()
toString in class Objectpublic boolean contains_inv(Invariant inv)
public boolean contains_inv_exact(Invariant inv)
public Invariant find_inv_exact(Invariant inv)
public Invariant find_inv_by_class(Class<? extends Invariant> cls)
public boolean is_inv_true(Invariant inv)
public void log(String msg)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||