4. The method of claim 1 , wherein the merge function outputs the second temporary result as the final result.
1. A method for generating a simulation executable, the method comprising: receiving HDL code which describes an RTL (register transfer level) design, wherein the HDL code includes a conditional statement which executes a first branch or a second branch based on a value of a control expression; and generating, by using one or more processors, the simulation executable, comprising: instructions for evaluating the control expression; and instructions for, in response to determining that the value of the control expression is indeterminate, executing the first branch to obtain a first temporary result, executing the second branch to obtain a second temporary result, and determining a final result by merging the first temporary result and the second temporary result based on a merge function.