justinlubin / cobbler

Refactor programs to use library functions!
5 stars 0 forks source link

Basic for loop extraction #40

Closed jeremyferguson closed 1 year ago

jeremyferguson commented 1 year ago

This PR implements basic for loop extraction. It checks a Python snippet for a for loop, and classifies all variables assigned within the for loop as output variables, and all variables not assigned to in the loop as input variables. Then, it splits the AST into input variable initializations, and the rest of the code, which will contain output variable initializations and the for loop we are trying to synthesize.