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

Replace Expression abstract type with a union type for union splitting optimizations #68

Closed
ChrisRackauckas opened this issue Sep 20, 2018 · 1 comment

Comments

@ChrisRackauckas
Copy link
Member

#62 (comment)

Problem right now is that Operation needs a Vector{Expression} so without JuliaLang/julia#269 we cannot have Expression have Operation in it.

@ChrisRackauckas
Copy link
Member Author

Yingbo Ma [11:42 AM]
On #68, what should we replace Expression with Union{Int, UInt, ..., Symbol}?
ChrisRackauckas
#68 Replace Expression abstract type with a union type for union splitting optimizations
#62 (comment)

Problem right now is that Operation needs a Vector{Expression} so without JuliaLang/julia#269 we cannot have Expression have Operation in it.
JuliaDiffEq/ModelingToolkit.jlToday at 10:31 AMAdded by GitHub

Chris Rackauckas [11:42 AM]
that's pretty much the idea
but one of the things we need in there is Operation
but Operation needs Vector{Expression}
So we can't make Expression = Union{Int, UInt, ..., Symbol}
since we need the definition both before and after
we can do something like
Operation takes a Vector{Union{ExpressionComponents},Operation}

since recursive definitions like that are allowed
that's the whole

  x::Vector{Union{Nothing,M}}
end
M([M([nothing])])```

thing.
Anyways, with the current timings and profiles it is not the biggest issue right now, so I at least feel fine moving on from it

Yingbo Ma [11:45 AM]
>`Operation` takes a `Vector{Union{ExpressionComponents},Operation}`
Do you mean `Vector{Union{ExpressionComponents...,Operation}}`?

Chris Rackauckas [11:45 AM]
it's definitely something to play with
`Vector{Union{ExpressionComponents,Operation}}`
with `ExpressionComponents = Union{Int, UInt, ..., Symbol}`

Yingbo Ma [11:46 AM]
I see, thanks!

Chris Rackauckas [11:46 AM]
or call it expression primatives
so you basically have primatives
or groups of primatives which is the Operation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant