Package daikon.inv
Class Joiner
-
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
AndJoiner
,Implication
public abstract class Joiner extends Invariant
- 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 Modifier and Type Field Description Invariant
left
Invariant
right
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
format_using(OutputFormat format)
Return a printed representation of this invariant, in the given format.boolean
isObviousDerived()
@Nullable DiscardInfo
isObviousImplied()
boolean
isSameFormula(Invariant other)
Returns true iff the two invariants represent the same mathematical formula.boolean
isSameInvariant(Invariant other)
Returns true iff the argument is the "same" invariant as this.boolean
isValidEscExpression()
Returns a conjuction of mapping the same function of our expresssions's VarInfos, in general.abstract String
repr()
For printing invariants, there are two interfaces: repr gives a low-level representation (Invariant.repr_prob()
also prints the confidence), andInvariant.format()
gives a high-level representation for user output.protected Invariant
resurrect_done(int[] permutation)
Called on the new invariant just before resurrect() returns it to allow subclasses to fix any information they might have cached from the old Ppt and VarInfos.-
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, 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, isValidExpression, isWorthPrinting, justified, log, log, logDetail, logOn, match, merge, mergeFormulasOk, permute, prob_and, prob_and, prob_is_ge, prob_or, repCheck, repr_prob, resurrect, simplify_format_double, simplify_format_long, simplify_format_string, state_match, toString, toString, transfer, usesVar, usesVar, usesVarDerived, valid_types, varNames
-
-
-
-
Method Detail
-
repr
public abstract String repr(@GuardSatisfied Joiner this)
Description copied from class:Invariant
For printing invariants, there are two interfaces: repr gives a low-level representation (Invariant.repr_prob()
also prints the confidence), andInvariant.format()
gives a high-level representation for user output.
-
resurrect_done
protected Invariant resurrect_done(int[] permutation)
Description copied from class:Invariant
Called on the new invariant just before resurrect() returns it to allow subclasses to fix any information they might have cached from the old Ppt and VarInfos.- Specified by:
resurrect_done
in classInvariant
- Parameters:
permutation
- the permutation- Returns:
- the permuted invariant
-
format_using
@SideEffectFree public abstract String format_using(@GuardSatisfied Joiner this, OutputFormat format)
Description copied from class:Invariant
Return a printed representation of this invariant, in the given format.- Specified by:
format_using
in classInvariant
-
isValidEscExpression
@Pure public boolean isValidEscExpression()
Description copied from class:Invariant
Returns a conjuction of mapping the same function of our expresssions's VarInfos, in general. Subclasses may override if they are able to handle generally-inexpressible properties in special-case ways.- Overrides:
isValidEscExpression
in classInvariant
- Returns:
- conjuction of mapping the same function of our expresssions's VarInfos
- See Also:
VarInfo.isValidEscExpression()
-
isObviousDerived
@Pure public boolean isObviousDerived()
-
isObviousImplied
public @Nullable DiscardInfo isObviousImplied()
-
isSameInvariant
@Pure public boolean isSameInvariant(Invariant other)
Description copied from class:Invariant
Returns true iff the argument is the "same" invariant as this. Same, in this case, means a matching type, formula, and variable names.- Overrides:
isSameInvariant
in classInvariant
- Parameters:
other
- the other invariant to compare to this one- Returns:
- true iff the argument is the "same" invariant as this
-
isSameFormula
@Pure public boolean isSameFormula(Invariant other)
Description copied from class:Invariant
Returns true iff the two invariants represent the same mathematical formula. Does not consider the context such as variable names, confidences, sample counts, value counts, or related quantities. As a rule of thumb, if two invariants format the same, this method returns true. Furthermore, in many cases, if an invariant does not involve computed constants (as "x>c" and "y=ax+b" do for constants a, b, and c), then this method vacuously returns true.- Specified by:
isSameFormula
in classInvariant
- Parameters:
other
- the invariant to compare to this one- Returns:
- true iff the two invariants represent the same mathematical formula. Does not consider
-
-