public class

CMethodSimulator

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CMethodSimulator

Class Overview

Pseudo-C method simulator.

Note that a simulator serves for one method only, and the simulation might happen only once.

Summary

Public Constructors
CMethodSimulator(ICMethod method, CEnvironment environment)
CMethodSimulator(ICMethod method, CEnvironment environment, int traceMaxSize)
CMethodSimulator(ICMethod method, CEnvironment environment, boolean strictMode)
Public Methods
static boolean areEquivalentSimulations(CSimulationLogger simLogger1, CSimulationLogger simLogger2)
Check if two simulations are equivalent, i.e.
List<ICStatement> getStmtsFlatList()
CSimulationLogger simulate()
Run the simulation from an empty input state.
CSimulationLogger simulate(CMethodState inputState)
Run the simulation from the given input state.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CMethodSimulator (ICMethod method, CEnvironment environment)

public CMethodSimulator (ICMethod method, CEnvironment environment, int traceMaxSize)

public CMethodSimulator (ICMethod method, CEnvironment environment, boolean strictMode)

Parameters
strictMode if true simulator will follow strict C emulation, otherwise some tweaks will be made to ensure simulation can be done even when AST contains errors (e.g. dereferencement of non-pointers)

Public Methods

public static boolean areEquivalentSimulations (CSimulationLogger simLogger1, CSimulationLogger simLogger2)

Check if two simulations are equivalent, i.e. if:

public List<ICStatement> getStmtsFlatList ()

public CSimulationLogger simulate ()

Run the simulation from an empty input state.

public CSimulationLogger simulate (CMethodState inputState)

Run the simulation from the given input state.