ml4ai / automates

AutoMATES: Automated Model Assembly from Text, Equations, and Software
https://ml4ai.github.io/automates
Other
25 stars 9 forks source link

Python Conditional Variable Issue #306

Open titomeister opened 2 years ago

titomeister commented 2 years ago

Given a Python program like the following y = 10 if y < 5: x = 1 else: x = 3 print(x)

This program won't correctly translate to GrFN due to a bug having to do with the variable x. The variable x doesn't appear before the conditional, and this introduces an issue at the GrFN generation when creating the appropriate GrFN variables. There are currently two proposed fixes:

The current proposal is to implement the second as a solution, though perhaps in the future the first solution should also be implemented.