JuliaDebug / JuliaDebug/Cthulhu.jl
show corresponding return types for each union-split callsite
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 709
- Forks
- 46
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 2
Description
Can be described with the following example:
julia> f(::Int) = rand(Int)
f (generic function with 1 method)
julia> f(::Float64) = rand(Float64)
f (generic function with 2 methods)
julia> descend((Union{Int,Float64},); optimize = false) do t
f(a)
end
...
• %1 = call #f(::Any)::Union{Float64, Int64}
↩
• %1 = f(::Int64)::Union{Float64, Int64} # <= ::Int64, ideally
%1 = f(::Float64)::Union{Float64, Int64} # <= ::Float64, ideally
↩
We will need to obtain "not-merged" return types for each callsite somehow,
and it requires additional or customized abstract interpretation passes under the current AbstractInterpreter inteface, I guess.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the descend((Union{Int,Float64},); optimize = false) example and inspect the current AbstractInterpreter interface. Determine how additional or customized abstract-interpretation passes could retain unmerged return types for each union-split callsite. Done means each specialized callsite displays its corresponding return type rather than only the merged union.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100