# Class: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CMethodSimulator
- Super class: `java.lang.Object`

Pseudo\-C method simulator.  

  Note that a simulator serves for one method only, and the simulation might happen only once.

## Constructor: CMethodSimulator
- parameter: `method`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICMethod`
- parameter: `environment`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CEnvironment`


## Constructor: CMethodSimulator
- parameter: `method`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICMethod`
- parameter: `environment`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CEnvironment`
- parameter: `traceMaxSize`, type: `int`


## Constructor: CMethodSimulator
- parameter: `method`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICMethod`
- parameter: `environment`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CEnvironment`
- parameter: `strictMode`, type: `boolean`

Description: 
parameter: method: 
parameter: environment: 
parameter: 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\)

## Method: getStmtsFlatList
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement>`


## Method: simulate
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CSimulationLogger`

Description: Run the simulation from an empty input state.

## Method: simulate
- parameter: `inputState`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CMethodState`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CSimulationLogger`

Description: Run the simulation from the given input state.

## Static Method: areEquivalentSimulations
- parameter: `simLogger1`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CSimulationLogger`
- parameter: `simLogger2`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CSimulationLogger`
- return type: `boolean`

Description: Check if two simulations are equivalent, i.e. if:  
  
- their final states are equivalents, see  [CMethodState#areEquivalent(CMethodState, CMethodState, boolean, boolean)](CMethodState#areEquivalent(CMethodState, CMethodState, boolean, boolean))  
- their final environments are equivalents, see  [CEnvironment#areEquivalent(CEnvironment, CEnvironment)](CEnvironment#areEquivalent(CEnvironment, CEnvironment))  
- their method calls are the same \(same routines called in the same order\)

