Class FunctionBinaryFloat

    • Field Detail

      • dkconfig_enabled

        public static boolean dkconfig_enabled
        Boolean. True if FunctionBinaryFloat invariants should be considered.
    • Method Detail

      • enabled

        public boolean enabled()
        returns whether or not this invariant is enabled
        Specified by:
        enabled in class Invariant
      • get_proto_all

        public static List<Invariantget_proto_all()
        Returns a list of all of the FunctionBinaryFloat prototype invariants.
      • check_ordered

        public InvariantStatus check_ordered​(double result,
                                             double arg1,
                                             double arg2,
                                             int count)
        Apply the specified sample to the function, returning the result. The caller is responsible for permuting the arguments.
      • add_ordered

        public InvariantStatus add_ordered​(double result,
                                           double arg1,
                                           double arg2,
                                           int count)
        Apply the specified sample to the function, returning the result. The caller is responsible for permuting the arguments.
      • resurrect_done

        protected Invariant resurrect_done​(int[] permutation)
        Reorganize our already-seen state as if the variables had shifted order underneath us (re-arrangement given by the permutation). We accomplish this by returning the class that corresponds to the new permutation.
        Overrides:
        resurrect_done in class TernaryInvariant
        Parameters:
        permutation - the permutation
        Returns:
        the permuted invariant
      • repr

        public String repr​(@GuardSatisfied FunctionBinaryFloat 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), and Invariant.format() gives a high-level representation for user output.
        Overrides:
        repr in class Invariant
        Returns:
        a string representation of 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 class Invariant
        Parameters:
        other - the invariant to compare to this one
        Returns:
        true iff the two invariants represent the same mathematical formula. Does not consider
      • isObviousDynamically

        @Pure
        public @Nullable DiscardInfo isObviousDynamically​(VarInfo[] vis)
        Description copied from class: Invariant
        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. Conceptually, this means, "Is this invariant dynamically obvious if its VarInfos were switched with vis?" Intended to be overriden by subclasses so they can filter invariants after checking; the overriding method should first call "super.isObviousDynamically(vis)". Since this method is dynamic, it should only be called after all processing.
        Overrides:
        isObviousDynamically in class Invariant
      • isMinimum

        @Pure
        public boolean isMinimum()
      • isMaximum

        @Pure
        public boolean isMaximum()
      • isPower

        @Pure
        public boolean isPower()