Class Execution


  • public final class Execution
    extends Object
    A path-exploring abstract interpreter over one method's bytecode that builds operand-stack/local def-use (InsnContext/StackCtx/VarCtx) without an abstract value domain.
    • Constructor Detail

      • Execution

        public Execution​(MethodEntry method)
        Builds an execution over the method's decoded instruction list.
        Parameters:
        method - the method to interpret
      • Execution

        public Execution​(MethodEntry method,
                         List<Instruction> insns)
        Builds an execution over a caller-provided instruction list.
        Parameters:
        method - the method to interpret
        insns - the decoded instruction list to interpret
    • Method Detail

      • addVisitor

        public Execution addVisitor​(Consumer<InsnContext> v)
        Registers a visitor invoked for every executed instruction-context.
        Parameters:
        v - the visitor to add
        Returns:
        this execution
      • run

        public void run()
        Explores the method from its entry frame until the work queue drains or the frame cap is hit.
      • wasExecuted

        public boolean wasExecuted​(Instruction insn)
        Reports whether the interpreter reached the given instruction on any explored path.
        Parameters:
        insn - the instruction to test
        Returns:
        true if the instruction was executed at least once