Class NISuppressionSet

    • Method Detail

      • add_to_suppressor_map

        public void add_to_suppressor_map​(Map<Class<? extends Invariant>,​List<NISuppressionSet>> suppressor_map)
        Adds this set to the suppressor map. The map is from the class of the suppressor to this. If the same suppressor class appears more than once, the suppression is only added once.
      • falsified

        public void falsified​(Invariant inv,
                              List<Invariant> new_invs)
        NIS process a falsified invariant. This method should be called for each falsified invariant in turn. Any invariants for which inv is the last valid suppressor are added to new_invs.

        Note, this is no longer the preferred approach, but is kept for informational purposes. Use NIS.process_falsified_invs() instead.

      • suppressed

        public boolean suppressed​(PptSlice slice)
        Determines whether or not the suppression set is valid in the specified slice. The suppression set is valid if any of its suppressions are valid. A suppression is valid if all of its suppressors are true.

        Also updates the debug information in each suppressor.

        See Also:
        for a check that considers missing
      • suppressed

        public boolean suppressed​(PptTopLevel ppt,
                                  VarInfo[] var_infos)
        Determines whether or not the suppression set is valid in the specified ppt and var_infos. The suppression set is valid if any of its suppressions are valid. A suppression is valid if all of its suppressors are true.

        Also updates the debug information in each suppressor.

        See Also:
        for a check that considers missing
      • is_instantiate_ok

        @Pure
        public boolean is_instantiate_ok​(PptSlice slice)
        Determines whether or not the suppression set is valid in the specified slice. The suppression set is valid if any of its suppressions are valid. A suppression is valid if all of its non-missing suppressors are true.
      • is_instantiate_ok

        @Pure
        public boolean is_instantiate_ok​(PptTopLevel ppt,
                                         VarInfo[] var_infos)
        Determines whether or not the suppressee of the suppression set should be instantiated. Instantiation is ok only if each suppression is invalid. A suppression is valid if all of its non-missing suppressors are true.
      • recurse_definitions

        public void recurse_definitions​(NISuppressionSet ss)
        Side-effects this NISuppressionSet. Each suppression where a suppressor matches the suppressee in ss is augmented by additional suppression(s) where the suppressor is replaced by each of its suppressions. This allows recursive suppressions.

        For example, consider the suppressions:

            (r == arg1) ∧ (arg2 ≤ arg1) ⇒ r = max(arg1,arg2)
            (arg2 == arg1) ⇒ arg2 ≤ arg1
         
        The suppressor (arg2 ≤ arg1) in the first suppression matches the suppressee in the second suppression. In order for the first suppression to work even when (arg2 ≤ arg1) is suppressed, the second suppression is added to the first:
            (r == arg1) ∧ (arg2 ≤ arg1) ⇒ r = max(arg1,arg2)
            (r == arg1) ∧ (arg2 == arg1) ⇒ r = max(arg1,arg2)
         
        When (arg2 ≤ arg1) is suppressed, the second suppression for max will still suppress max. If (arg2 == arg1) is falsified, the (arg2 ≤ arg1) invariant will be created and can continue to suppress max (as long as it is not falsified itself).
      • swap

        public NISuppressionSet swap()
        Swaps each suppressor and suppressee to the opposite variable order. Valid only on unary and binary suppressors and suppressees.
      • clear_state

        public void clear_state()
        Clears the suppressor state in each suppression.
      • toString

        @SideEffectFree
        public String toString​(@GuardSatisfied NISuppressionSet this)
        Returns a string containing each suppression separated by commas.
        Overrides:
        toString in class Object