Class PedanticThrowAnalysis

  • All Implemented Interfaces:
    ThrowAnalysis

    public class PedanticThrowAnalysis
    extends AbstractThrowAnalysis
    A ThrowAnalysis that says that every unit can throw every possible exception type. Strictly speaking, this is correct, since the deprecated java.lang.Thread#stop(Throwable) method allows one thread to cause any Throwable it wants to be thrown in another thread, meaning that all Throwables may arrive asynchronously from the perspective of the victim thread.
    • Constructor Detail

      • PedanticThrowAnalysis

        public PedanticThrowAnalysis​(Singletons.Global g)
        Constructs a PedanticThrowAnalysis for inclusion in Soot's global variable manager, G.
        Parameters:
        g - guarantees that the constructor may only be called from Singletons.
    • Method Detail

      • v

        public static PedanticThrowAnalysis v()
        Returns the single instance of PedanticThrowAnalysis.
        Returns:
        Soot's PedanticThrowAnalysis.
      • mightThrow

        public ThrowableSet mightThrow​(Unit u)
        Returns the set of all Throwables as the set of types that the specified unit might throw, regardless of the unit's identity.
        Specified by:
        mightThrow in interface ThrowAnalysis
        Specified by:
        mightThrow in class AbstractThrowAnalysis
        Parameters:
        u - Unit whose exceptions are to be returned.
        Returns:
        the set of all Throwables.
      • mightThrowImplicitly

        public ThrowableSet mightThrowImplicitly​(ThrowInst t)
        Returns the set of all Throwables as the set of types that a throw instruction may throw implicitly, that is, the possible types of errors which might arise in the course of executing the throw instruction, rather than the type of the throw's operand.
        Specified by:
        mightThrowImplicitly in interface ThrowAnalysis
        Specified by:
        mightThrowImplicitly in class AbstractThrowAnalysis
        Parameters:
        t - the ThrowInst whose exceptions are to be returned.
        Returns:
        the set of all Throwables.
      • mightThrowImplicitly

        public ThrowableSet mightThrowImplicitly​(ThrowStmt t)
        Returns the set of all Throwables as the set of types that a throw statement may throw implicitly, that is, the possible types of errors which might arise in the course of executing the throw statement, rather than the type of the throw's operand.
        Specified by:
        mightThrowImplicitly in interface ThrowAnalysis
        Specified by:
        mightThrowImplicitly in class AbstractThrowAnalysis
        Parameters:
        t - the ThrowStmt whose exceptions are to be returned.
        Returns:
        the set of all Throwables.