|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectInvariant
Joiner
Implication
public class Implication
The Implication invariant class is used internally within Daikon to handle invariants that are only true when certain other conditions are also true (splitting).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Invariant |
|---|
Invariant.ClassVarnameComparator, Invariant.ClassVarnameFormulaComparator, Invariant.InvariantComparatorForPrinting, Invariant.Match |
| Field Summary | |
|---|---|
boolean |
iff
|
| Fields inherited from class Joiner |
|---|
left, right |
| Constructor Summary | |
|---|---|
protected |
Implication(PptSlice ppt,
Invariant predicate,
Invariant consequent,
boolean iff,
Invariant orig_predicate,
Invariant orig_consequent)
|
| Method Summary | |
|---|---|
protected double |
computeConfidence()
This method computes the confidence that this invariant occurred by chance. |
Invariant |
consequent()
|
String |
format_using(OutputFormat format)
|
boolean |
hasUninterestingConstant()
This is the test that's planned to replace the poorly specified "isInteresting" check. |
boolean |
isAllPrestate()
|
boolean |
isInteresting()
|
DiscardInfo |
isObviousDynamically_SomeInEquality()
Return true if the rightr side of the implication some equality combinations of its member variables are dynamically obvious. |
DiscardInfo |
isObviousDynamically(VarInfo[] vis)
Return non-null if this invariant is necessarily true from a fact that can be determined dynamically (after checking data) -- for the given varInfos rather than the varInfos of this. |
DiscardInfo |
isObviousStatically_SomeInEquality()
Return true if the right side of the implication and some equality combinations of its member variables are statically obvious. |
DiscardInfo |
isObviousStatically(VarInfo[] vis)
Return true if this invariant is necessarily true from a fact that can be determined statically -- for the given varInfos rather than the varInfos of this. |
boolean |
isSameFormula(Invariant other)
|
boolean |
isSameInvariant(Invariant other)
|
void |
log(Logger log,
String msg)
Logs a description of the invariant and the specified msg via the logger as described in Debug.log(Logger, Class, Ppt,
VarInfo[], String). |
boolean |
log(String msg)
Logs a description of the invariant and the specified msg via the logger as described in Debug.log(Logger, Class, Ppt,
VarInfo[], String). |
static Implication |
makeImplication(PptTopLevel ppt,
Invariant predicate,
Invariant consequent,
boolean iff,
Invariant orig_predicate,
Invariant orig_consequent)
Creates a new Implication Invariant and adds it to the PptTopLevel. |
Invariant |
predicate()
|
String |
repr()
For printing invariants, there are two interfaces: repr gives a low-level representation (repr_prop also prints the confidence), and format gives a high-level representation for user output. |
| Methods inherited from class Joiner |
|---|
isObviousDerived, isObviousImplied, isValidEscExpression, resurrect_done |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public boolean iff
| Constructor Detail |
|---|
protected Implication(PptSlice ppt,
Invariant predicate,
Invariant consequent,
boolean iff,
Invariant orig_predicate,
Invariant orig_consequent)
| Method Detail |
|---|
public Invariant predicate()
public Invariant consequent()
public static Implication makeImplication(PptTopLevel ppt,
Invariant predicate,
Invariant consequent,
boolean iff,
Invariant orig_predicate,
Invariant orig_consequent)
protected double computeConfidence()
Invariant
computeConfidence in class InvariantInvariant.getConfidence()public String repr()
Invariant
repr in class Joinerpublic String format_using(OutputFormat format)
format_using in class Joinerpublic DiscardInfo isObviousStatically(VarInfo[] vis)
Invariant
isObviousStatically in class Invariantvis - The VarInfos this invariant is obvious over. The
position and data type of the variables is the *same* as that of
this.ppt.var_infos.public DiscardInfo isObviousDynamically(VarInfo[] vis)
Invariant
isObviousDynamically in class Invariantpublic DiscardInfo isObviousStatically_SomeInEquality()
isObviousStatically_SomeInEquality in class Invariantpublic DiscardInfo isObviousDynamically_SomeInEquality()
isObviousDynamically_SomeInEquality in class Invariantpublic boolean isSameFormula(Invariant other)
isSameFormula in class Joinerpublic boolean isSameInvariant(Invariant other)
isSameInvariant in class Joinerpublic boolean isInteresting()
isInteresting in class Joinerpublic boolean hasUninterestingConstant()
Invariant
hasUninterestingConstant in class Invariantpublic boolean isAllPrestate()
isAllPrestate in class Invariant
public void log(Logger log,
String msg)
Debug.log(Logger, Class, Ppt,
VarInfo[], String). Uses the consequent as the logger
log in class Invariantpublic boolean log(String msg)
Debug.log(Logger, Class, Ppt,
VarInfo[], String). Uses the consequent as the logger
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||