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

Created Composition DSL. #85

Merged
merged 6 commits into from
Sep 27, 2023

Conversation

neonWhiteout
Copy link
Collaborator

sfcompose(sf1, sf2, quote
(s1, s2)
s1, s2 ^ A => N
end)

Where sf1 and sf2 are stockflows, the first line is an ordered tuple of symbols which will act as its corresponding stockflow, and stockflows are separated from feet with ^. This commit includes Composition.jl, a testing file, and slight changes to Syntax.jl in src and tests; in src, I include Composition.jl, and in tests, I run the Composition tests from Syntax.

@neonWhiteout
Copy link
Collaborator Author

This doesn't have any overlap with the stratification DSL. Shouldn't be any issue with accepting both of them.

(s1, s2)
s1, s2 ^ A => N
end)

Where sf1 and sf2 are stockflows, the first line is an ordered tuple of symbols which will act as its corresponding stockflow, and stockflows are separated from feet with ^.
This commit includes Composition.jl, a testing file, and slight changes to Syntax.jl in src and tests; in src, I include Composition.jl, and in tests, I run the Composition tests from Syntax.
@neonWhiteout
Copy link
Collaborator Author

Force pushing was me removing some code which only works with stratification.

@neonWhiteout
Copy link
Collaborator Author

Rewriting DSL will likely need to wait until Stratification is merged; it relies on a few functions which are on the Stratification branch.

Also I still need to write tests for it.

@neonWhiteout
Copy link
Collaborator Author

Some minor updates. Used to need quote blocks, now you can use begin end

@neonWhiteout
Copy link
Collaborator Author

I'm hoping you won't get a merge conflict after every merge. They should be easy to deal with, though.

@Xiaoyan-Li Xiaoyan-Li merged commit 78cc1f3 into AlgebraicJulia:master Sep 27, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants