daikon.inv.binary.twoScalar
Class NumericInt.ShiftZero

Object
  extended by Invariant
      extended by BinaryInvariant
          extended by TwoScalar
              extended by NumericInt
                  extended by NumericInt.ShiftZero
All Implemented Interfaces:
Serializable, Cloneable
Enclosing class:
NumericInt

public static class NumericInt.ShiftZero
extends NumericInt

Represents the ShiftZero invariant between two long scalars; that is, x right-shifted by y is always zero. Prints as x >> y = 0.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class NumericInt
NumericInt.BitwiseAndZero, NumericInt.BitwiseComplement, NumericInt.BitwiseSubset, NumericInt.Divides, NumericInt.ShiftZero, NumericInt.Square, NumericInt.ZeroTrack
 
Nested classes/interfaces inherited from class Invariant
Invariant.ClassVarnameComparator, Invariant.ClassVarnameFormulaComparator, Invariant.InvariantComparatorForPrinting, Invariant.Match
 
Field Summary
static boolean dkconfig_enabled
          Boolean.
 
Fields inherited from class NumericInt
var1_eq_0, var1_eq_1, var1_eq_minus_1, var1_eq_var2, var1_ge_0, var1_le_var2, var1_ne_0, var2_eq_0, var2_eq_1, var2_eq_minus_1, var2_eq_var1, var2_ge_0, var2_ne_0, var2_valid_shift
 
Fields inherited from class TwoScalar
swap
 
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, isGuardingPredicate, min_mod_non_missing_samples, ppt, PROBABILITY_JUSTIFIED, PROBABILITY_NEVER, PROBABILITY_UNJUSTIFIED
 
Constructor Summary
protected NumericInt.ShiftZero(boolean swap)
           
protected NumericInt.ShiftZero(PptSlice ppt, boolean swap)
           
 
Method Summary
 boolean enabled()
          Returns whether or not this invariant is enabled
 boolean eq_check(long x, long y)
          Returns true if x and y don't invalidate the invariant.
 String get_format_str(OutputFormat format)
          Return a format string for the specified output format.
 NISuppressionSet get_ni_suppressions()
          Returns a list of non-instantiating suppressions for this invariant.
static NumericInt.ShiftZero get_proto(boolean swap)
           
protected  NumericInt.ShiftZero instantiate_dyn(PptSlice slice)
          Instantiates an invariant of the same class on the specified slice.
 
Methods inherited from class NumericInt
check_modified, format_using, get_proto_all, instantiate_ok, is_subscript, isExact, isObviousDynamically, obvious_checks, repr
 
Methods inherited from class TwoScalar
add_modified, add_unmodified, add, check_unmodified, check, computeConfidence, get_swap, isSameFormula, resurrect_done_swapped, resurrect_done_unswapped, resurrect_done, valid_types, var1, var1, var2, var2
 
Methods inherited from class BinaryInvariant
add_unordered, check_unordered, find, is_symmetric
 
Methods inherited from class Invariant
add_sample, asInvClass, clear_falsified, clone_and_permute, clone, conf_is_ge, confidence_and, confidence_and, confidence_or, createGuardedInvariant, createGuardingPredicate, enoughSamples, falsify, find, format_too_few_samples, format_unimplemented, format, formatFuzzy, get_comparability, getConfidence, getGuardingList, getGuardingList, hasUninterestingConstant, instantiate, is_false, is_ni_suppressed, isActive, isAllPrestate, isExclusiveFormula, isInteresting, isObvious, isObviousDynamically_SomeInEquality, isObviousDynamically_SomeInEqualityHelper, isObviousDynamically, isObviousStatically_AllInEquality, isObviousStatically_SomeInEquality, isObviousStatically_SomeInEqualityHelper, isObviousStatically, isObviousStatically, isReflexive, isSameInvariant, isValidEscExpression, 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, varNames
 
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dkconfig_enabled

public static boolean dkconfig_enabled
Boolean. True iff ShiftZero invariants should be considered.

Constructor Detail

NumericInt.ShiftZero

protected NumericInt.ShiftZero(PptSlice ppt,
                               boolean swap)

NumericInt.ShiftZero

protected NumericInt.ShiftZero(boolean swap)
Method Detail

get_proto

public static NumericInt.ShiftZero get_proto(boolean swap)

enabled

public boolean enabled()
Returns whether or not this invariant is enabled

Overrides:
enabled in class Invariant

instantiate_dyn

protected NumericInt.ShiftZero instantiate_dyn(PptSlice slice)
Description copied from class: Invariant
Instantiates an invariant of the same class on the specified slice. Must be overridden in each class. Must be used rather than clone so that checks in instantiate for reasonable invariants are done.

Overrides:
instantiate_dyn in class Invariant
Returns:
the new invariant

get_format_str

public String get_format_str(OutputFormat format)
Description copied from class: NumericInt
Return a format string for the specified output format. Each instance of %varN% will be replaced by the correct name for varN.

Specified by:
get_format_str in class NumericInt

eq_check

public boolean eq_check(long x,
                        long y)
Description copied from class: NumericInt
Returns true if x and y don't invalidate the invariant.

Specified by:
eq_check in class NumericInt

get_ni_suppressions

public NISuppressionSet get_ni_suppressions()
Returns a list of non-instantiating suppressions for this invariant.

Overrides:
get_ni_suppressions in class Invariant