Class SuperSequence

    • Field Detail

      • dkconfig_enabled

        public static boolean dkconfig_enabled
        Boolean. True iff SubSequence invariants should be considered.
    • Method Detail

      • enabled

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

        public InvariantStatus check_modified​(long[] a1,
                                              long[] a2,
                                              int count)
        Description copied from class: TwoSequence
        Presents a sample to the invariant. Returns whether the sample is consistent with the invariant. Does not change the state of the invariant.
        Specified by:
        check_modified in class TwoSequence
        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
      • isObviousSubSequence

        @Pure
        public static @Nullable DiscardInfo isObviousSubSequence​(Invariant inv,
                                                                 VarInfo subvar,
                                                                 VarInfo supervar)
        Returns a DiscardInfo, or null if the Invariant is not an obvious subsequence.
        Returns:
        a DiscardInfo, or null if the Invariant is not an obvious subsequence
      • isObviousSubSequence

        @Pure
        public static @Nullable IPair<DiscardCode,​StringisObviousSubSequence​(VarInfo subvar,
                                                                                     VarInfo supervar)
        Returns a IPair of a DiscardCode and a discardReason string, or null if the Invariant is not an obvious subsequence.
        Returns:
        a IPair of a DiscardCode and a discardReason string, or null if the Invariant is not an obvious subsequence
      • isObviousStatically

        @Pure
        public @Nullable DiscardInfo isObviousStatically​(VarInfo[] vis)
        Description copied from class: Invariant
        Return true if this invariant is necessarily true from a fact that can be determined statically -- for the given varInfos rather than the varInfos of this. Conceptually, this means "is this invariant statically obvious if its VarInfos were switched with vis?" Intended to be overridden by subclasses. Should only do static checking.

        Precondition: vis.length == this.ppt.var_infos.length

        Overrides:
        isObviousStatically in class Invariant
        Parameters:
        vis - the VarInfos this invariant is obvious over. The position and data type of the variables is the *same* as that of this.ppt.var_infos.
      • 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
      • isSameFormula

        @Pure
        public boolean isSameFormula​(Invariant inv)
        Description copied from class: TwoSequence
        Return true if both invariants are the same class and the order of the variables (swap) is the same.
        Overrides:
        isSameFormula in class TwoSequence
        Parameters:
        inv - the invariant to compare to this one
        Returns:
        true iff the two invariants represent the same mathematical formula. Does not consider