From 7e3ac96618ba5b4889218c2bac04acdca7481287 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 8 Feb 2024 13:05:14 -0500 Subject: [PATCH 1/2] AMR to_string fix missing `@` --- src/amr.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amr.jl b/src/amr.jl index 42c7984..7f97740 100644 --- a/src/amr.jl +++ b/src/amr.jl @@ -142,7 +142,7 @@ function amr_to_string(amr) Rate(t, f) => "$t::Rate = $(f.expression)" Initial(t, f) => "$t::Initial = $(f.expression)" Observable(id, n, states, f) => "# $n\n$id::Observable = $(f.expression)($states)\n" - Header(name, s, d, sn, mv) => "\"\"\"\nASKE Model Representation: $name$mv :: $sn \n $s\n\n$d\n\"\"\"" + Header(name, s, d, sn, mv) => "\"\"\"\nASKE Model Representation: $name@$mv :: $sn \n $s\n\n$d\n\"\"\"" Parameter(t, n, d, u, v, dist) => "\n# $n-- $d\n$t::Parameter{$(!u)} = $v ~ $(!dist)\n" m::ACSetSpec => "Model = begin\n$(padlines(sprint(show, m),2))\nend" ODEList(l) => "ODE_Equations = begin\n" * padlines(join(map(!, l), "\n")) * "\nend" @@ -460,4 +460,4 @@ function load(::Type{ASKEModel}, ex::Expr) end ASKEModel(elts[2][1], elts[2][2], [elts[4], elts[6]]) end -end # module end \ No newline at end of file +end # module end From c719ae8059544200bbb01fb6ade3960cf80dd3f7 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 8 Feb 2024 13:07:36 -0500 Subject: [PATCH 2/2] fix #25 part 2 --- src/amr.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amr.jl b/src/amr.jl index 7f97740..43cce08 100644 --- a/src/amr.jl +++ b/src/amr.jl @@ -452,7 +452,7 @@ function load(::Type{ASKEModel}, ex::Expr) elts = map(ex.args) do arg @match arg begin Expr(:macrocall, var"@doc", _, s, ex) => (load(Header, s), load(ACSetSpec, ex)) - Expr(:(=), :ODE_Record, body) => load(ODEList, arg) + Expr(:(=), :ODE_Record, body) => load(ODERecord, arg) Expr(:(=), :ODE_Equations, body) => load(ODEList, arg) Expr(:(=), :Typing, body) => load(Typing, arg) _ => arg