Class LinearBinaryCore

    • Field Detail

      • debug

        public static final Logger debug
        Debug tracer.
      • a

        public double a
        This invariant represents ax + by + c = 0; the first argument is x, second is y.
      • b

        public double b
        This invariant represents ax + by + c = 0; the first argument is x, second is y.
      • c

        public double c
        This invariant represents ax + by + c = 0; the first argument is x, second is y.
      • min_x

        public long min_x
      • min_y

        public long min_y
      • max_x

        public long max_x
      • max_y

        public long max_y
      • min_a

        public double min_a
      • max_a

        public double max_a
      • min_b

        public double min_b
      • max_b

        public double max_b
      • min_c

        public double min_c
      • max_c

        public double max_c
    • Method Detail

      • swap

        public void swap()
      • isActive

        @Pure
        public boolean isActive()
        Returns whether or not the invariant is currently active. We become active after MINPAIRS values have been seen and a line calculated. Before that, a and b are uninitialized.
      • isFlowable

        @Pure
        public boolean isFlowable()
        LinearBinary can't be flowed because it keeps samples to build the line. These sample can't be flowed from ppt to ppt (since they probably didn't occur at the lower ppt).
      • enoughSamples

        public boolean enoughSamples​(@GuardSatisfied LinearBinaryCore this)
      • repr

        public String repr​(@GuardSatisfied LinearBinaryCore this)
      • mergeFormulasOk

        public boolean mergeFormulasOk()
        In general, we can't merge formulas, but we can merge invariants with too few samples to have formed a line with invariants with enough samples. And those will appear to have different formulas.
      • merge

        public @Nullable LinearBinaryCore merge​(List<LinearBinaryCore> cores,
                                                Invariant wrapper)
        Merge the linear binary cores in cores to form a new core. Any core in the list that has seen enough points to define a line, must define the same line. Any cores that have not yet seen enough points, will have each of their points applied to that invariant. The merged core is returned. Null is returned if the cores don't describe the same line
        Parameters:
        cores - list of LinearBinary cores to merge. They should all be permuted to match the variable order in ppt.