Skip to content

Conversation

@Keno
Copy link
Member

@Keno Keno commented Feb 16, 2021

This is the minimal work required to switch Cthulhu to AbstractInterpreter.
There are several things I would like to build on top of this:
- Read callsites out of statement info rather than reconstructing it
- Support for Opaque Closures
- More consistent use of AbstractInterpreter throughout the API
- Expose inference remarks

I would like to propose that we make a codebase break at Julia 1.6
for Cthulhu, moving the current master to a branch and requiring
Julia 1.7 on Cthulhu master. That gives us the rest of the 1.7 cycle
to update Cthulhu and figure out what the right interfaces between
Cthulhu and Base are.

Fixes #124

cc @maleadt

This is the minimal work required to swtich Cthulhu to AbstractInterpreter.
There are several things I would like to build on top of this:
    - Read callsites out of statment info rather than reconstructing it
    - Support for Opaque Closures
    - More consistent use of AbstractInterpreter throughout the API
    - Expose inference remarks

I would like to propose that we make a codebase break at Julia 1.6
for Cthulhu, moving the current master to a branch and requiring
Julia 1.7 on Cthulhu master. That gives us the rest of the 1.7 cycle
to update Cthulhu and figure out what the right interfaces between
Cthulhu and Base are.
@codecov-io
Copy link

codecov-io commented Feb 16, 2021

Codecov Report

Merging #126 (651203a) into master (7386619) will decrease coverage by 7.81%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
- Coverage   51.02%   43.20%   -7.82%     
==========================================
  Files           6        7       +1     
  Lines         874      891      +17     
==========================================
- Hits          446      385      -61     
- Misses        428      506      +78     
Impacted Files Coverage Δ
src/Cthulhu.jl 0.60% <0.00%> (-1.33%) ⬇️
src/interpreter.jl 0.00% <0.00%> (ø)
src/reflection.jl 69.91% <0.00%> (-16.24%) ⬇️
src/backedges.jl 68.62% <0.00%> (-10.79%) ⬇️
src/codeview.jl 56.97% <0.00%> (-4.07%) ⬇️
src/ui.jl 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7386619...651203a. Read the comment docs.

@vchuravy
Copy link
Member

I would like to propose that we make a codebase break at Julia 1.6
for Cthulhu, moving the current master to a branch and requiring
Julia 1.7 on Cthulhu master. That gives us the rest of the 1.7 cycle
to update Cthulhu and figure out what the right interfaces between
Cthulhu and Base are.

Good by me.

@aviatesk
Copy link
Member

I'll take a look on this PR during this week.

@Keno
Copy link
Member Author

Keno commented Feb 16, 2021

No worries, this PR is mostly the trial balloon to figure out what to do about version compats and such. Actually making use of AbstractInterpreter will take a couple more PRs - just wanted to keep you in the loop.

@timholy
Copy link
Member

timholy commented Feb 16, 2021

Strongly supportive of this plan. As it stands, the inaccuracies in specialization heuristics alone would be worth the break. I bet this will fix a couple of open issues.

Just a comment, our confidence in doing refactorings like this would be greatly enhanced by having a better test suite. Something for us all to aspire to. I've been trying to avoid fixing bugs or add functionality without accompanying tests, but we have a long ways to catch up. And the interactive components are of course hard to test (maybe so hard it's not worth it).

@Keno
Copy link
Member Author

Keno commented Feb 17, 2021

Alright, the plan here is:

  • Branch a 16-compat branch from current master
  • Update this PR to update CI config to only run on master
  • Merge this PR
  • Start iterating from there by cleaning out old code/updating to use new interfaces, etc.

@Keno Keno changed the title WIP: Minimal switch to AbstractInterpreter Minimal switch to AbstractInterpreter Feb 17, 2021
@Keno Keno merged commit 2c5b03d into master Feb 17, 2021
@timholy timholy deleted the kf/abstractinterp branch February 17, 2021 19:55
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

Successfully merging this pull request may close these issues.

Update to use AbstractInterpreter framework

6 participants