concepts.dm.crow.parsers.cdl_parser.FunctionCallTracker#
- class FunctionCallTracker[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
The assignments of local variables.
A list of assign expressions.
A dictionary of assign expressions, indexed by their signatures.
A list of check expressions.
A list of expr expressions (i.e. bare expressions in the body).
The return expression.
Whether to use runtime assign expressions.
- __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[CrowBehaviorBodyPrimitiveBase | CrowBehaviorBodySuiteBaseCrowControllerApplicationExpression | ListExpansionExpression]#
- 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).
- return_expression: ValueOutputExpression | None#
The return expression. This is either None or a single expression.