Skip to content
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

Closed
wants to merge 35 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
883a465
Started making versions with InterTypes, amr.it and decapodes.it, and…
p-stokes Dec 1, 2023
1c91145
Fixed typos in decapodes.it and updated intertype_examples.jl
p-stokes Dec 1, 2023
81d1d9c
Removed redundant Header def from decapodes.it and added id field to …
p-stokes Dec 1, 2023
6f3df6f
Added decapode parsing functions and test example for ASKEMDecaExpr w…
p-stokes Dec 1, 2023
84a37dc
Started setting up src files to export the intertype structures. Star…
p-stokes Dec 4, 2023
361199c
uwd write and read test example working. needed to change write_json_…
p-stokes Dec 4, 2023
aa5cf1a
Added intertype version of SummationDecapode function and its helpers…
p-stokes Dec 4, 2023
cd83f9d
Added intertype structs for SummationDecapode. It will load the inter…
p-stokes Dec 5, 2023
692a242
Added/updated functions to make intertype SummationDecapode. No longe…
p-stokes Dec 5, 2023
2d073e3
Started factoring amr and uwd parts into source and test files, and u…
p-stokes Dec 5, 2023
a4b61af
Updated Project.toml
p-stokes Dec 5, 2023
c0a34fb
Factored decapodes part into src and test. Again had to change AMR na…
p-stokes Dec 5, 2023
f6e4db1
Started making intertype version for composite_models.
p-stokes Dec 5, 2023
eaa5c91
Updated composite_models_it src and test. Intertype version of oapply…
p-stokes Dec 6, 2023
aed4d45
Started working on intertype version of ACSetSpec and other ADT code …
p-stokes Dec 6, 2023
744bbca
Moved amr_it.jl contents into amr.jl to better view differences.
p-stokes Dec 6, 2023
d1ad500
Moved contents of decapodes_it.jl and uwd_it.jl files to respective o…
p-stokes Dec 6, 2023
8c4b047
Moved contents of composite_models_it.jl to original file for easier …
p-stokes Dec 6, 2023
f4fe83c
Moved contents of _it_ex.jl files to their corresponding _examples.jl…
p-stokes Dec 6, 2023
19f98d2
deleted intertype versions of amr.jl and decapodes.jl
p-stokes Dec 7, 2023
233896f
Removed remaining intertype versions of src and test files for easier…
p-stokes Dec 7, 2023
c2cc82b
Removed unnecessary imports from test examples.
p-stokes Dec 7, 2023
bac39db
Updated Project.toml for docs.
p-stokes Dec 7, 2023
0274d67
Updated decapodes example doc.
p-stokes Dec 7, 2023
37e6398
Cleaned up imports and qualification of type names in src files. Remo…
p-stokes Dec 7, 2023
bbcb53d
Updated name qualifications in test examples.
p-stokes Dec 8, 2023
5a9f95b
Removed new id field from Header. Now same as before the PR. Will mak…
p-stokes Dec 8, 2023
7785c96
Made oapply workaround -- it_to_orig converts an intertype summation …
p-stokes Dec 11, 2023
6feef74
Made coversion from Decapodes.SummationDecapode to intertype version.…
p-stokes Dec 11, 2023
ab9a258
Uncommented sm_write_json_model, 2nd write_json_model method and most…
p-stokes Dec 12, 2023
6af6977
Added clarifying comments in composite_models_examples.jl about fixes…
p-stokes Dec 12, 2023
cf77220
Added acsetspec converter from ADTs version to intertype. Updated typ…
p-stokes Dec 14, 2023
403b573
Fixed convert_pair_to_it and changed convert_val_to_it to handle Quot…
p-stokes Dec 14, 2023
dc77e68
Edited load Typing and ASKEModel from dict. Typing part requires Pair…
p-stokes Dec 14, 2023
e07fb29
Corrected amr var name in amr_to_expr. Now, problem with amr_to_expr …
p-stokes Dec 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed redundant Header def from decapodes.it and added id field to …
…amr.it version. Changed amr module name to AMR.
p-stokes committed Dec 1, 2023
commit 81d1d9cb44099e3e1277b6039a5c6203f684aa8b
1 change: 1 addition & 0 deletions src/amr.it
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ struct Annotation
end

struct Header
id::String
name::String
schema::String
description::String
14 changes: 2 additions & 12 deletions src/decapodes.it
Original file line number Diff line number Diff line change
@@ -19,21 +19,11 @@ struct Judgement
Eq(lhs::Term, rhs::Term)
end

struct DecaExpr
struct DecaExpr
context::Vector{Judgement}
equations::Vector{Equation}
end


struct Header
id::String
description::String
name::String
model_version::String
schema::String
schema_name::String
end

@sum ASKEMDeca begin
ASKEMDecaExpr(header::Header, model::DecaExpr, annotations::Vector{amr.Annotation})
ASKEMDecaExpr(header::AMR.Header, model::DecaExpr, annotations::Vector{AMR.Annotation})
end
33 changes: 29 additions & 4 deletions test/intertype_examples.jl
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ import JSON3

# using .SyntacticModels
# # using .SyntacticModels.ASKEMDecapodes

using Decapodes


using Reexport
@@ -26,20 +26,45 @@ using StructTypes
# using ..SyntacticModelsBase


@intertypes "../src/amr.it" module amr end
@intertypes "../src/amr.it" module AMR end

using .amr
using .AMR



@intertypes "../src/decapodes.it" module decapodes
import ..amr
import ..AMR
end

using .decapodes



h = AMR.Header("", "harmonic_oscillator",
"modelreps.io/DecaExpr",
"A Simple Harmonic Oscillator as a Diagrammatic Equation",
"DecaExpr",
"v1.0")

# The easiest way to write down a DecaExpr is in our DSL and calling the parser.
dexpr = Decapodes.parse_decapode(quote
X::Form0{Point}
V::Form0{Point}

k::Constant{Point}

∂ₜ(X) == V
∂ₜ(V) == -1*k*(X)
end
)

annot = [AMR.Annotation(:X,:Form0,AMR.Name("The X variable."))]

# Bundle the DecaExpr with the header metadata.
mexpr = decapodes.ASKEMDecaExpr(h, dexpr, annot)



#=
@intertypes "simpleast.it" module simpleast end