This was found while writing the if_statement unit test in #275. In the C file for that test, notice that variable a is accessed in the second if block. In the GrFN, we would expect an arrow from a at the top to in the interface node in the second conditional block. Furthermore, the GrFN which is generated cannot be executed and results in the following error:
Executing GrFN...
Traceback (most recent call last):
File "/home/ryan/projects/automates/scripts/program_analysis/run_gcc_to_grfn.py", line 213, in <module>
run_gcc_pipeline()
File "/home/ryan/projects/automates/scripts/program_analysis/run_gcc_to_grfn.py", line 205, in run_gcc_pipeline
result = grfn(inputs)
File "/home/ryan/projects/automates/automates/model_assembly/networks.py", line 1197, in __call__
self.root_subgraph(self, subgraph_to_hyper_edges, node_to_subgraph, set())
File "/home/ryan/projects/automates/automates/model_assembly/networks.py", line 621, in __call__
sugraph_execution_result = subgraph(
File "/home/ryan/projects/automates/automates/model_assembly/networks.py", line 646, in __call__
to_execute()
File "/home/ryan/projects/automates/automates/model_assembly/networks.py", line 390, in __call__
variable = self.outputs[i]
IndexError: list index out of range
Excerpt of relevant code:
if (a > b) {
x = b;
b = a;
}
if (x == 3) {
a = x;
b = a;
x = 10;
}
This was found while writing the
if_statement
unit test in #275. In theC
file for that test, notice that variablea
is accessed in the secondif
block. In the GrFN, we would expect an arrow froma
at the top to in the interface node in the second conditional block. Furthermore, the GrFN which is generated cannot be executed and results in the following error:Excerpt of relevant code:
Here are the CAST and GrFN pdfs created from the
C
file: if_statement--CAST.pdf if_statement--GrFN.pdf