pub fn simulate<GetStatementGasInfo: Fn() -> Option<i64>, SimulateFunction: Fn(&FunctionId, Vec<CoreValue>) -> Result<Vec<CoreValue>, LibfuncSimulationError>>(
libfunc: &CoreConcreteLibfunc,
inputs: Vec<CoreValue>,
get_statement_gas_info: GetStatementGasInfo,
simulate_function: SimulateFunction,
) -> Result<(Vec<CoreValue>, usize), LibfuncSimulationError>
Expand description
Simulates the run of a single libfunc. Returns the value representations of the outputs, and the chosen branch given the inputs.
simulate_function
is a function that simulates running of a user function. It is provided here
for the case where the extensions need to use it.