AlgebraicJulia / StockFlow.jl

https://algebraicjulia.github.io/StockFlow.jl/
MIT License
65 stars 6 forks source link

Stratification DSL (and homomorphism DSL) #73

Closed neonWhiteout closed 1 year ago

neonWhiteout commented 1 year ago

Still has a lot of irrelevant comments around, and needs further testing, and probably refactoring to remove duplicate code. Still, though, I think it's pretty good.

If you use as a prefix, it says that the following string should match all symbols which have it as a substring. This means matches all strings.

It functions kinda like case/break statements. Once you have a first match, future matches will be ignored.

See the testing file Stratify.jl for a few examples.

There's also a homomorphism DSL here, which was a bit of an afterthought. Figured it would be really easy to make after making the stratification DSL, and it was.

neonWhiteout commented 1 year ago

Oh yeah also probably gonna wanna do some rebasing here, Jesus. Look at all those commits.