concepts.dm.crow.parsers.cdl_symbolic_execution.FunctionCallSymbolicExecutor#

class FunctionCallSymbolicExecutor[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

run()

Simulate the execution of the program and generates an equivalent return statement.

Attributes

local_variables_stack

The assignments of local variables.

assign_expressions

A list of assign expressions.

assign_expression_signatures

A dictionary of assign expressions, indexed by their signatures.

check_expressions

A list of check expressions.

expr_expressions

A list of expr expressions (i.e. bare expressions in the body).

return_expression

The return expression.

behavior_expressions

__init__(suite, init_local_variables=None)[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.

__new__(**kwargs)#
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.

assign_expression_signatures: Dict[Tuple[str, ...], VariableAssignmentExpression]#

A dictionary of assign expressions, indexed by their signatures.

assign_expressions: List[CrowFeatureAssignmentExpression | CrowBehaviorForeachLoopSuite | CrowBehaviorConditionSuite]#

A list of assign expressions.

behavior_expressions: List[CrowBehaviorCommit | CrowAchieveExpression | CrowUntrackExpression | CrowAssertExpression | CrowBindExpression | CrowControllerApplicationExpression | CrowRuntimeAssignmentExpression | CrowFeatureAssignmentExpression | CrowBehaviorConditionSuite | CrowBehaviorWhileLoopSuite | CrowBehaviorForeachLoopSuite | CrowBehaviorOrderingSuite | CrowBehaviorApplicationExpression]#
check_expressions: List[ValueOutputExpression]#

A list of check expressions.

expr_expressions: List[ValueOutputExpression]#

A list of expr expressions (i.e. bare expressions in the body).

local_variables_stack: List[Dict[str, Any]]#

The assignments of local variables.

return_expression: ValueOutputExpression | None#

The return expression. This is either None or a single expression.