-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP update to use InterTypes #29
Changes from 23 commits
883a465
1c91145
81d1d9c
6f3df6f
84a37dc
361199c
aa5cf1a
cd83f9d
692a242
2d073e3
a4b61af
c0a34fb
f6e4db1
eaa5c91
aed4d45
744bbca
d1ad500
8c4b047
f4fe83c
19f98d2
233896f
c2cc82b
bac39db
0274d67
37e6398
bbcb53d
5a9f95b
7785c96
6feef74
ab9a258
6af6977
cf77220
403b573
dc77e68
e07fb29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
|
||
@sum Args begin | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this being copied from https://github.com/AlgebraicJulia/ACSets.jl/blob/main/src/ADTs.jl#L14? We should upgrade that code to use InterTypes and then import that usage here. |
||
Value(_1::Symbol) | ||
Kwarg(_1::Symbol, _2::Args) | ||
end | ||
|
||
struct Statement | ||
table::Symbol | ||
element::Vector{Args} | ||
end | ||
|
||
#= | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need this? |
||
@sum union_sym_expr begin | ||
sym(s::Symbol) | ||
expr(e::Expr) | ||
end | ||
=# | ||
|
||
struct ACSetSpec | ||
acstype::Symbol | ||
body::Vector{Statement} | ||
end | ||
|
||
@sum MathML begin | ||
Math(str::String) | ||
Presentation(str::String) | ||
end | ||
|
||
|
||
struct ExpressionFormula | ||
expression::String | ||
expression_mathml::MathML | ||
end | ||
|
||
struct Unit | ||
expression::String | ||
expression_mathml::MathML | ||
end | ||
|
||
|
||
@sum Distribution begin | ||
StandardUniform(str::String) | ||
Uniform(min::Float64, max::Float64) | ||
StandardNormal(str::String) | ||
Normal(mean::Float64, variance::Float64) | ||
PointMass(value::Float64) | ||
end | ||
|
||
struct Observable | ||
id::Symbol | ||
name::String | ||
states::Vector{Symbol} | ||
f::ExpressionFormula | ||
end | ||
|
||
@sum Expression begin | ||
Rate(target::Symbol, f::ExpressionFormula) | ||
Initial(target::Symbol, f::ExpressionFormula) | ||
Parameter(id::Symbol, name::String, description::String, units::Unit, value::Float64, distribution::Distribution) | ||
Time(id::Symbol, units::Unit) | ||
end | ||
|
||
struct Pair | ||
first::Symbol | ||
second::Symbol | ||
end | ||
|
||
@sum Semantic begin | ||
ODEList(statements::Vector{Expression}) | ||
ODERecord(rates::Vector{Rate}, initials::Vector{Initial}, parameters::Vector{Parameter}, time::Time) | ||
Typing(system::ACSetSpec, map::Vector{Pair}) | ||
end | ||
|
||
|
||
@sum Note begin | ||
Name(str::String) | ||
Description(str::String) | ||
Grounding(ontology::String, identifier::String) | ||
Units(expression::String) | ||
end | ||
|
||
struct Annotation | ||
entity::Symbol | ||
type::Symbol | ||
note::Note | ||
end | ||
|
||
struct Header | ||
id::String | ||
name::String | ||
schema::String | ||
description::String | ||
schema_name::String | ||
model_version::String | ||
end | ||
|
||
|
||
struct ASKEModel | ||
header::Header | ||
model::ACSetSpec | ||
semantics::Vector{Semantic} | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
@sum CompositeModel begin | ||
OpenModel(model::decapodes.ASKEMDecaExpr, interface::Vector{Symbol}) | ||
OpenDecapode(model::decapodes.ASKEMDecapode, interface::Vector{Symbol}) | ||
CompositeModelExpr(header::amr.Header, composition_pattern::uwd.UWDExpr, components::Vector{CompositeModel}) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since code is moved here, do we still need to depend on Decapodes?