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

use MTK macro processing code instead of writing custom DSL code #1023

Open
isaacsas opened this issue Aug 14, 2024 · 3 comments
Open

use MTK macro processing code instead of writing custom DSL code #1023

isaacsas opened this issue Aug 14, 2024 · 3 comments

Comments

@isaacsas
Copy link
Member

isaacsas commented Aug 14, 2024

On a quick skim, it appears subsets of our DSL macro processing code overlap with MTK macro processing code. We should switch to MTK's code as much as possible to avoid needing to maintain our own macros (for example @equation), and to ensure feature compatibility with MTK.

edit: Perhaps this isn't possible but it would be good to really make sure we can't reuse their code (similar to how we defined @species using their code as a base).

@TorkelE
Copy link
Member

TorkelE commented Aug 14, 2024

We do go through some MTK stuff, i.e. use the ModelingToolkit.parse_equations! for the equations. The rest of the equation code is basically just extracting differentials and variables from D(X).

Especially when MTK have settled down though, we should do a pass through everything to ensure that we are non unnecessarily re-implementing anything. Let's keep this open until we get there.

@isaacsas
Copy link
Member Author

OK, good. I missed that we use parse_equations! now (there is a lot of DSL code at this point...).

@TorkelE
Copy link
Member

TorkelE commented Aug 14, 2024

yeah, the DSL code has gotten increasingly messy over the last while. I tried to clean it up a bit in #985, but even after that more could probably be done to get it up to the standard of the rest of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants