|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectInvariant
BinaryInvariant
SequenceScalar
SeqIntLessThan
public final class SeqIntLessThan
Represents an invariant between a long scalar and a a sequence of long values. Prints as x[] elements < y where x is a long sequence and y is a long scalar.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Invariant |
|---|
Invariant.ClassVarnameComparator, Invariant.ClassVarnameFormulaComparator, Invariant.InvariantComparatorForPrinting, Invariant.Match |
| Field Summary | |
|---|---|
static Logger |
debug
|
static boolean |
dkconfig_enabled
Boolean. |
| Constructor Summary | |
|---|---|
protected |
SeqIntLessThan()
|
protected |
SeqIntLessThan(PptSlice ppt)
|
| Method Summary | |
|---|---|
InvariantStatus |
add_modified(long[] a,
long x,
int count)
This method need not check for falsified; that is done by the caller. |
InvariantStatus |
check_modified(long[] a,
long x,
int count)
|
SeqIntLessThan |
clone()
Do nothing special, Overridden to remove exception from declaration |
protected double |
computeConfidence()
This method computes the confidence that this invariant occurred by chance. |
boolean |
enabled()
Returns whether or not this invariant is enabled |
static SeqIntLessThan |
find(PptSlice ppt)
|
String |
format_daikon()
|
String |
format_esc()
|
String |
format_java_family(OutputFormat format)
|
String |
format_simplify()
|
String |
format_using(OutputFormat format)
|
NISuppressionSet |
get_ni_suppressions()
Returns a list of non-instantiating suppressions for this invariant. |
static SeqIntLessThan |
get_proto()
Returns the prototype invariant for SeqIntLessThan |
protected SeqIntLessThan |
instantiate_dyn(PptSlice slice)
instantiates the invariant on the specified slice |
boolean |
instantiate_ok(VarInfo[] vis)
Non-equal SeqIntComparison is only valid on integral types |
boolean |
isExact()
Subclasses should override. |
boolean |
isExclusiveFormula(Invariant other)
|
DiscardInfo |
isObviousDynamically(VarInfo[] vis)
Checks to see if this is obvious over the specified variables. |
DiscardInfo |
isObviousStatically(VarInfo[] vis)
Checks to see if the comparison is obvious statically. |
boolean |
isSameFormula(Invariant other)
|
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 SequenceScalar |
|---|
add_unmodified, add, check_unmodified, check, is_symmetric, resurrect_done_swapped, resurrect_done_unswapped, resurrect_done, scl_index, sclvar, sclvar, seq_first, seq_index, seqvar, seqvar, valid_types |
| Methods inherited from class BinaryInvariant |
|---|
add_unordered, check_unordered, find, get_swap |
| Methods inherited from class Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean dkconfig_enabled
public static final Logger debug
| Constructor Detail |
|---|
protected SeqIntLessThan(PptSlice ppt)
protected SeqIntLessThan()
| Method Detail |
|---|
public static SeqIntLessThan get_proto()
public boolean enabled()
enabled in class Invariantpublic boolean instantiate_ok(VarInfo[] vis)
instantiate_ok in class InvariantInvariant.valid_types(VarInfo[])protected SeqIntLessThan instantiate_dyn(PptSlice slice)
instantiate_dyn in class Invariantpublic DiscardInfo isObviousStatically(VarInfo[] vis)
max(A[]) op A[]
min(A[]) op A[]
JHP: Note that these are not strict implications, these are merely
uninteresting comparisons (except when op is GreaterEqual for max
and LessEqual for min)
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 SeqIntLessThan clone()
Invariant
clone in class Invariantpublic String repr()
Invariant
repr in class Invariantpublic String format_using(OutputFormat format)
format_using in class Invariantpublic String format_daikon()
public String format_esc()
public String format_simplify()
public String format_java_family(OutputFormat format)
public InvariantStatus check_modified(long[] a,
long x,
int count)
check_modified in class SequenceScalar
public InvariantStatus add_modified(long[] a,
long x,
int count)
SequenceScalar
add_modified in class SequenceScalarprotected double computeConfidence()
Invariant
computeConfidence in class InvariantInvariant.getConfidence()public boolean isExact()
Invariant
isExact in class Invariantpublic boolean isSameFormula(Invariant other)
isSameFormula in class Invariantpublic boolean isExclusiveFormula(Invariant other)
isExclusiveFormula in class Invariantpublic static SeqIntLessThan find(PptSlice ppt)
public DiscardInfo isObviousDynamically(VarInfo[] vis)
(x op B[]) ^ (B[] subsequence A[]) ==> (x op A[]) (A[] == []) ==> (x op A[])
isObviousDynamically in class Invariantpublic NISuppressionSet get_ni_suppressions()
get_ni_suppressions in class Invariant
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||