Closed neonWhiteout closed 10 months ago
Attention: 89 lines
in your changes are missing coverage. Please review.
Comparison is base (
e2b3ca8
) 49.96% compared to head (d5717e2
) 57.90%.
Files | Patch % | Lines |
---|---|---|
src/syntax/Rewrite.jl | 82.57% | 77 Missing :warning: |
src/StockFlow.jl | 62.06% | 11 Missing :warning: |
src/Syntax.jl | 96.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Updated rewrite syntax
The above example in the new syntax would be
aged_sir_rewritten = @rewrite aged_sir begin
:redefs
v_meanInfectiousContactsPerSv_cINC = cc_C * v_prevalencev_INC_post
v_meanInfectiousContactsPerSv_cINA = cc_A * v_prevalencev_INA_post
:parameters
fcc
fca
fac
faa
:dynamic_variables
v_CCContacts = fcc * v_prevalencev_INC
v_CAContacts = fca * v_prevalencev_INA
v_ACContacts = fac * v_prevalencev_INC
v_AAContacts = faa * v_prevalencev_INA
v_prevalencev_INC_post = v_CCContacts + v_CAContacts
v_prevalencev_INA_post = v_ACContacts + v_AAContacts
end
Created a DSL for rewrite:
Requires further tests to fix edge case bugs, but currently works with all our examples. Creates L, I and R, defines the two homs and applies the rule.