Package daikon.inv.unary.sequence
Class SingleFloatSequence
- Object
-
- Invariant
-
- UnaryInvariant
-
- SingleSequence
-
- SingleFloatSequence
-
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
CommonFloatSequence
,EltLowerBoundFloat
,EltNonZeroFloat
,EltOneOfFloat
,EltRangeFloat
,EltUpperBoundFloat
,EltwiseFloatComparison
,NoDuplicatesFloat
,OneOfFloatSequence
,SeqIndexFloatEqual
,SeqIndexFloatGreaterEqual
,SeqIndexFloatGreaterThan
,SeqIndexFloatLessEqual
,SeqIndexFloatLessThan
,SeqIndexFloatNonEqual
public abstract class SingleFloatSequence extends SingleSequence
Abstract base class for invariants over one variable of typedouble[]
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class Invariant
Invariant.ClassVarnameComparator, Invariant.ClassVarnameFormulaComparator, Invariant.InvariantComparatorForPrinting, Invariant.Match
-
-
Field Summary
-
Fields inherited from class SingleSequence
dkconfig_SeqIndexDisableAll
-
Fields inherited from class Invariant
CONFIDENCE_JUSTIFIED, CONFIDENCE_NEVER, CONFIDENCE_UNJUSTIFIED, debug, debugFlow, debugGuarding, debugIsObvious, debugIsWorthPrinting, debugPrint, debugPrintEquality, dkconfig_confidence_limit, dkconfig_fuzzy_ratio, dkconfig_simplify_define_predicates, falsified, invariantEnabledDefault, isGuardingPredicate, min_mod_non_missing_samples, ppt, PROBABILITY_JUSTIFIED, PROBABILITY_NEVER, PROBABILITY_UNJUSTIFIED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SingleFloatSequence()
protected
SingleFloatSequence(PptSlice ppt)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InvariantStatus
add(@Interned Object val, int mod_index, int count)
abstract InvariantStatus
add_modified(double @Interned [] value, int count)
Similar tocheck_modified(double[], int)
except that it can change the state of the invariant if necessary.InvariantStatus
add_unmodified(double @Interned [] value, int count)
By default, do nothing if the value hasn't been seen yet.InvariantStatus
check(@Interned Object val, int mod_index, int count)
abstract InvariantStatus
check_modified(double @Interned [] value, int count)
Presents a sample to the invariant.InvariantStatus
check_unmodified(double @Interned [] value, int count)
boolean
valid_types(VarInfo[] vis)
Returns whether or not the specified types are valid.-
Methods inherited from class SingleSequence
var
-
Methods inherited from class UnaryInvariant
resurrect_done
-
Methods inherited from class Invariant
add_sample, asInvClass, checkRep, clear_falsified, clone, clone_and_permute, computeConfidence, conf_is_ge, confidence_and, confidence_and, confidence_or, createGuardedInvariant, createGuardingPredicate, enabled, enoughSamples, falsify, find, format, format_classname, format_too_few_samples, format_unimplemented, format_using, formatFuzzy, get_comparability, get_ni_suppressions, getConfidence, getGuardingList, getGuardingList, hasUninterestingConstant, instantiate, instantiate_dyn, instantiate_ok, is_false, is_ni_suppressed, isActive, isAllPrestate, isEqualityComparison, isExact, isExclusiveFormula, isObvious, isObviousDynamically, isObviousDynamically, isObviousDynamically_SomeInEquality, isObviousDynamically_SomeInEqualityHelper, isObviousStatically, isObviousStatically, isObviousStatically_AllInEquality, isObviousStatically_SomeInEquality, isObviousStatically_SomeInEqualityHelper, isReflexive, isSameFormula, isSameInvariant, isValidEscExpression, isValidExpression, isWorthPrinting, justified, log, log, logDetail, logOn, match, merge, mergeFormulasOk, permute, prob_and, prob_and, prob_is_ge, prob_or, repCheck, repr, repr_prob, resurrect, simplify_format_double, simplify_format_long, simplify_format_string, state_match, toString, toString, transfer, usesVar, usesVar, usesVarDerived, varNames
-
-
-
-
Constructor Detail
-
SingleFloatSequence
protected SingleFloatSequence(PptSlice ppt)
-
SingleFloatSequence
protected SingleFloatSequence()
-
-
Method Detail
-
valid_types
public final boolean valid_types(VarInfo[] vis)
Returns whether or not the specified types are valid.- Specified by:
valid_types
in classInvariant
- See Also:
Invariant.instantiate_ok(VarInfo[])
-
add
public InvariantStatus add(@Interned Object val, int mod_index, int count)
- Specified by:
add
in classUnaryInvariant
-
check
public InvariantStatus check(@Interned Object val, int mod_index, int count)
- Specified by:
check
in classUnaryInvariant
-
add_modified
public abstract InvariantStatus add_modified(double @Interned [] value, int count)
Similar tocheck_modified(double[], int)
except that it can change the state of the invariant if necessary. If the invariant doesn't have any state, then the implementation should simply callcheck_modified(double[], int)
. This method need not check for falsification; that is done by the caller.
-
add_unmodified
public InvariantStatus add_unmodified(double @Interned [] value, int count)
By default, do nothing if the value hasn't been seen yet. Subclasses can override this.
-
check_modified
public abstract InvariantStatus check_modified(double @Interned [] value, int count)
Presents a sample to the invariant. Returns whether the sample is consistent with the invariant. Does not change the state of the invariant.- Parameters:
count
- how many identical samples were observed in a row. For example, three calls to check_modified with a count parameter of 1 is equivalent to one call to check_modified with a count parameter of 3.- Returns:
- whether or not the sample is consistent with the invariant
-
check_unmodified
public InvariantStatus check_unmodified(double @Interned [] value, int count)
-
-