ml4ai / automates

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

Refactoring of GroMEt Generation Visitors. #326

Open titomeister opened 1 year ago

titomeister commented 1 year ago

At this point the GroMEt generation has extensively grown, and with that it could use some refactoring in some visitors. Some visitors were initially written in a less-than-general manner, but as new language features get added the visitors become harder to maintain. I think a rewrite of some pieces would help alleviate the issue, and make the implementations more general.

The current pieces that could use a rewrite, in order of priority: AnnCAST Call Node: Adding primitives and attributes into the mix has made this visitor difficult to understand and maintain. AnnCAST Assignment Node: This visitor in particular is dealt on a case-by-case basis. While this doesn't need a serious rewrite it could definitely use some looking over as it's been added to a lot. AnnCAST Attribute Node: This visitor is relatively new, and doesn't need a rewrite, but needs more expansion in order to better fit itself when used by other visitors.