Description
Models loaded from BMA files using the new QN constructor from #38 are not executable because their grammar doesn't match the existing grammar. All operators like max are lowercase in the files and they're uppercase in our grammar. We should switch to lowercase for consistency.
Package Version
0.0.4
Julia Version
1.11.6
Reproduction steps
pkg> activate --temp
pkg> add GraphDynamicalSystems, JSON, DynamicalSystems
julia> using GraphDynamicalSystems, JSON, DynamicalSystems
julia> f = "test/resources/bma_models/well_formed_examples/ToyModelStable.json";
"test/resources/bma_models/well_formed_examples/ToyModelStable.json"
julia> using GraphDynamicalSystems, JSON, DynamicalSystems
julia> step!(create_qn_system(QN(f)), 100)
Relevant log output
Got exception outside of a @test
Unhandled Expr in `interpret`: max(min(1, min(max(AKT1_136, 0), 1)), 0)
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] interpret(e::Expr, qn::QualitativeNetwork{317, Asynchronous()})
@ GraphDynamicalSystems ~/Repositories/JuliaProjects/GraphDynamicalSystems.jl/src/qualitative_networks.jl:411
[3] async_qn_step!(qn::QualitativeNetwork{317, Asynchronous()})
@ GraphDynamicalSystems ~/Repositories/JuliaProjects/GraphDynamicalSystems.jl/src/qualitative_networks.jl:448
[4] step!
@ ~/.julia/packages/DynamicalSystemsBase/kc7rt/src/core_systems/arbitrary_steppable.jl:74 [inlined]
[5] step!(ds::DynamicalSystemsBase.ArbitrarySteppable{StaticArraysCore.MVector{317, Int64}, QualitativeNetwork{317, Asynchronous()},
typeof(GraphDynamicalSystems.async_qn_step!), typeof(GraphDynamicalSystems.reset_model!), typeof(GraphDynamicalSystems.extract_state),
typeof(GraphDynamicalSystems.extract_parameters), MetaGraphsNext.MetaGraph{Int64, Graphs.SimpleGraphs.SimpleDiGraph{Int64}, Symbol, Grap
hDynamicalSystems.Entity{Int64}, Nothing, DataType, MetaGraphsNext.var"#11#13", Float64}, DynamicalSystemsBase.var"#22#24"{typeof(GraphD
ynamicalSystems.reset_model!)}}, n::Int64)
@ DynamicalSystemsBase ~/.julia/packages/DynamicalSystemsBase/kc7rt/src/core_systems/arbitrary_steppable.jl:73
[6] top-level scope
@ ~/Repositories/JuliaProjects/GraphDynamicalSystems.jl/test/qn_test.jl:154
Operating System
Mac
Description
Models loaded from BMA files using the new
QNconstructor from #38 are not executable because their grammar doesn't match the existing grammar. All operators likemaxare lowercase in the files and they're uppercase in our grammar. We should switch to lowercase for consistency.Package Version
0.0.4
Julia Version
1.11.6
Reproduction steps
Relevant log output
Operating System
Mac