Class SimulationResult


  • public final class SimulationResult
    extends Object
    Immutable result of a simulation run.
    • Method Detail

      • getMethod

        public IRMethod getMethod()
        Returns:
        the method that was simulated
      • getAllStates

        public List<StateSnapshot> getAllStates()
        Returns:
        all state snapshots recorded during simulation, in order
      • getStatesAt

        public List<StateSnapshot> getStatesAt​(IRBlock block)
        Gets the state snapshots recorded for a block.
        Parameters:
        block - the block to look up
        Returns:
        the block's snapshots, or an empty list when none were recorded
      • getStateAt

        public StateSnapshot getStateAt​(int index)
        Gets the state snapshot at an index into the overall recording order.
        Parameters:
        index - the snapshot index
        Returns:
        the snapshot, or null when the index is out of range
      • getEntryStateFor

        public StateSnapshot getEntryStateFor​(IRBlock block)
        Gets the first state snapshot recorded for a block.
        Parameters:
        block - the block to look up
        Returns:
        the block's entry snapshot, or null when none were recorded
      • getExitStateFor

        public StateSnapshot getExitStateFor​(IRBlock block)
        Gets the last state snapshot recorded for a block.
        Parameters:
        block - the block to look up
        Returns:
        the block's exit snapshot, or null when none were recorded
      • getTotalInstructions

        public int getTotalInstructions()
        Returns:
        the total number of instructions simulated
      • getMaxStackDepth

        public int getMaxStackDepth()
        Returns:
        the maximum stack depth observed during simulation
      • getSimulationTimeNanos

        public long getSimulationTimeNanos()
        Returns:
        the simulation wall time in nanoseconds
      • getSimulationTimeMillis

        public double getSimulationTimeMillis()
        Returns:
        the simulation wall time in milliseconds
      • getBlockCount

        public int getBlockCount()
        Returns:
        the number of blocks with recorded states
      • getStateCount

        public int getStateCount()
        Returns:
        the total number of state snapshots recorded
      • hasStates

        public boolean hasStates()
        Returns:
        whether any state snapshots were recorded