Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up drivers stanc3, stancjs #1214

Open
4 tasks
WardBrian opened this issue Jun 17, 2022 · 0 comments
Open
4 tasks

Clean up drivers stanc3, stancjs #1214

WardBrian opened this issue Jun 17, 2022 · 0 comments
Labels
cleanup Code simplification or clean-up

Comments

@WardBrian
Copy link
Member

These have sort of grown over time to use some odd patterns.

TODO list:

  • Debugging.ml is used for printing things like the typed_ast, but not the MIRs or anything else. We should move more of that code in there. We should also generalize Debugging.ml to allow its usage in stanc3js so it doesn't always just print
  • There is a lot of nested if-else style logic which shouldn't need to be there if we encapsulate the debug logic into Debugging.ml. Because we use the with_return pattern in stanc3js (which I don't love but has some benefits in a JS driver), and can exit in stanc, I think the drivers could both just be straight lines of assignments and processing
  • Make sure they both do the same thing - see Identifier clash when Stan model file name is the same as distribution #751 (comment)
  • Expose all the same functionality - stanc3js lacks several more of the debug flags
@WardBrian WardBrian added the cleanup Code simplification or clean-up label Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code simplification or clean-up
Projects
None yet
Development

No branches or pull requests

1 participant