concepts.dm.crow.parsers.cdl_symbolic_execution.FunctionCallSymbolicExecutor2#
- class FunctionCallSymbolicExecutor2[source]#
Bases:
object
This class is used to track the function calls and other statements in a suite. It supports simulating the execution of the program and generating the post-condition of the program.
Methods
fork
(suite[, init_local_variables])Make a "fork" of the current tracker.
run
()Simulate the execution of the program and generates an equivalent return statement.
set_unique_return
(return_expression)Set the return expression.
Attributes
The suite to be tracked.
The assignments of local variables.
The return expression.
- __init__(suite, init_local_variables=None, mode=SymbolicExecutionMode.FUNCTIONAL)[source]#
Initialize the function call tracker.
- Parameters:
suite (Suite) – the suite to be tracked.
init_local_variables (Dict[str, Any] | None) – the initial local variables. If None, an empty dictionary will be used.
mode (SymbolicExecutionMode)
- __new__(**kwargs)#
- fork(suite, init_local_variables=None)[source]#
Make a “fork” of the current tracker.
- Parameters:
- Returns:
A new instance of the tracker.
- Return type:
- run()[source]#
Simulate the execution of the program and generates an equivalent return statement. This function handles if-else conditions. However, loops are not allowed.
- set_unique_return(return_expression)[source]#
Set the return expression. This function is used to set the return expression when it is unique.
- Parameters:
return_expression (ValueOutputExpression)
- mode: SymbolicExecutionMode#
- return_expression: ValueOutputExpression | None#
The return expression. This is either None or a single expression.