# Class: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CMethodState

State of a simulated method. 
 
- the concrete value associated to each [ICIdentifier](ICIdentifier) 
- the concrete return value, if the execution terminated 
- a [ControlWord](ControlWord) value to select the next instruction to execute 

 The state also provides an equivalence relationship [#areEquivalent(CMethodState, CMethodState, boolean, boolean)](#areEquivalent(CMethodState, CMethodState, boolean, boolean)), to test if another state might represent the same computation.

## Constructor: CMethodState
- parameter: `statements`, type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement>`


## Method: getControlWord
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CMethodState.ControlWord`


## Method: getControlWordIndex
- return type: `int`


## Method: getIdentifier
- parameter: `element`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICIdentifier`


## Method: getLocalVarValue
- parameter: `element`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement`
- return type: `java.lang.Long`


## Method: getLocalVarValues
- return type: `java.util.Map<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICIdentifier,java.lang.Long>`


## Method: getReturnValue
- return type: `java.lang.Long`


## Method: getStatements
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICStatement>`


## Method: isMethodParametersSpoiled
- return type: `boolean`

Description: If true, parameters of methods called are considered spoiled; the corresponding variables' values will be modified by the simulation. If false, they are left intact.

## Method: setControlWord
- parameter: `controlWord`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CMethodState.ControlWord`


## Method: setControlWordIndex
- parameter: `controlWordIndex`, type: `int`


## Method: setLocalVarValue
- parameter: `id`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICIdentifier`
- parameter: `value`, type: `java.lang.Long`


## Method: setMethodParametersSpoiled
- parameter: `methodParametersSpoiled`, type: `boolean`


## Method: setReturnValue
- parameter: `returnValue`, type: `java.lang.Long`


## Method: setValue
- parameter: `element`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement`
- parameter: `value`, type: `java.lang.Long`
- parameter: `environment`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CEnvironment`

Description: Sets a variable \-\-either local or global\-\- value.

## Method: toString
- return type: `java.lang.String`


## Static Method: areEquivalent
- parameter: `state1`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CMethodState`
- parameter: `state2`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.simulator.CMethodState`
- parameter: `checkProducedValues`, type: `boolean`
- parameter: `checkControlWords`, type: `boolean`
- return type: `boolean`

Description: Checks if two states might represent the same computation, namely: 
 
- if the return values are the same 
- conditionally, if the same values got produced in both states 
- conditionally, if the final control words are the same

