Skip to content

Add Cthulhu integration using the new provider API#56

Draft
serenity4 wants to merge 15 commits into
JuliaComputing:mainfrom
serenity4:cthulhu
Draft

Add Cthulhu integration using the new provider API#56
serenity4 wants to merge 15 commits into
JuliaComputing:mainfrom
serenity4:cthulhu

Conversation

@serenity4

@serenity4 serenity4 commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

Uses the new API introduced in JuliaDebug/Cthulhu.jl#662 to enable an integration with Cthulhu, allowing to navigate with descend into the post-structural CodeInstances we generate. This facilitates introspection into the refined lattice elements that we introduce (e.g. Eq, Incidence) which appear in type annotations.

To do:

Comment thread test/runtests.jl
include("errors.jl")
include("invalidation.jl")
include("validation.jl")
include("cthulhu.jl")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually the include that I forgot to remove. I planned to have tests (and still do), but until now I've just tested manually.

@Keno

Keno commented Oct 8, 2025

Copy link
Copy Markdown
Member

Labeling for the descend seems wrong:

julia> @descend provider=dae_provider() pingpong()
pingpong() @ Main REPL[22]:1
 1 function pingpong()::Tuple
 2     # N.B.: Deliberate not using variables, which requires
 3     # scope, etc handling
 4     a = continuous()
 5     b = continuous()
 6     c = continuous()
 7     d = continuous()
 8     ping(a, b, c, d)
 9     pong(b, c, d, a)
10 end

Select a call to descend into or ↩ to ascend.

Toggles: [w]arn, [h]ide type-stable statements, [t]ype_annotations, [s]yntax highlight for Source/LLVM/Native, [j]ump to source always, [f]orce inline all.
Show: [S]ource, [A]ST, [T]yped.
Actions: [q]uit, ⟵ ascend, [b]ookmark, [E]dit source code, [R]evise and redisplay.

   continuous
   continuous()
   continuous
   continuous()
 • continuous
   continuous()
   ↩

Is this what you meant by Fix incorrect source mapping in callsite navigation.?

@Keno

Keno commented Oct 8, 2025

Copy link
Copy Markdown
Member

Could I get an extra Show toggle that shows the MSS at the current level?

@serenity4

Copy link
Copy Markdown
Contributor Author

Is this what you meant by Fix incorrect source mapping in callsite navigation.?

Yes, exactly. Until this is fixed, it's probably best to switch to typed view when introspecting.

@serenity4

serenity4 commented Oct 10, 2025

Copy link
Copy Markdown
Contributor Author

@Keno would it be possible to update the dependencies on main? I see that a bunch of packages started making breaking releases (SciMLOperators going to 0.3, DifferentiationInterface to 0.7), and that gets in the way of updating to the latest JuliaSyntax to work on the Cthulhu integration. (I could do it myself but I figure you'd rather have your own forks in the manifest)

@Keno

Keno commented Oct 12, 2025

Copy link
Copy Markdown
Member

I've pushed a version of this branch with updated deps to kf/updeps - you can use that.

@serenity4

Copy link
Copy Markdown
Contributor Author

Could I get an extra Show toggle that shows the MSS at the current level?

Implemented in 26e3cca. I made it be an "action" to show the MSS by pressing m, which I think will be more friendly than dumping it on every ascend/descend. Happy to change it to a Toggle or a Show though if you prefer.

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.

2 participants