Class A2FReducer

  • All Implemented Interfaces:
    AFReducer

    public class A2FReducer
    extends java.lang.Object
    implements AFReducer
    A2FReducer takes an A2F constraint that is not irreducible (@see AFConstraint.isIrreducible) and reduces it by one step. The resulting constraint may still be reducible.

    Generally reductions should map to corresponding rules in https://docs.oracle.com/javase/specs/jls/se17/html/jls-15.html#jls-15.12.2.7

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.checkerframework.framework.util.typeinference.constraint.A2FReducer.A2FReducingVisitor visitor  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean reduce​(AFConstraint constraint, java.util.Set<AFConstraint> newConstraints)
      Determines if the input constraint should be handled by this reducer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • visitor

        protected final org.checkerframework.framework.util.typeinference.constraint.A2FReducer.A2FReducingVisitor visitor
    • Method Detail

      • reduce

        public boolean reduce​(AFConstraint constraint,
                              java.util.Set<AFConstraint> newConstraints)
        Description copied from interface: AFReducer
        Determines if the input constraint should be handled by this reducer. If so: Reduces the constraint into one or more new constraints. Any new constraint that can still be reduced is placed in newConstraints. New irreducible constraints are placed in finish. Return true Return false (indicating that some other reducer needs to handle this constraint) If false is returned, the reducer should NOT place any constraints in newConstraints or finished
        Specified by:
        reduce in interface AFReducer
        Parameters:
        constraint - the constraint to reduce
        newConstraints - the new constraints that may still need to be reduced
        Returns:
        true if the input constraint was handled by this reducer, false otherwise