Skip to content

Streamline tracking of dependencies#2026

Open
Lysxia wants to merge 1 commit intomasterfrom
depgraph
Open

Streamline tracking of dependencies#2026
Lysxia wants to merge 1 commit intomasterfrom
depgraph

Conversation

@Lysxia
Copy link
Copy Markdown
Collaborator

@Lysxia Lysxia commented Apr 9, 2026

Previously, dependencies started as dep_set: IndexSet before being converted into the expansion_queue.

Now, that logic is gathered in a single DepGraphBuilder structure to directly build the final graph.
Thanks to that, update_graph is just a small loop now.

A further simplification is that expansion_queue now only contains unvisited vertices instead of edges,
since the edges are added to the graph immediately.

@xldenis
Copy link
Copy Markdown
Collaborator

xldenis commented Apr 9, 2026

A further simplification is that expansion_queue now only contains unvisited vertices instead of edges,
since the edges are added to the graph immediately.

that always felt like a failure when I had to move the expansion queue to track edges. I had originally wanted to get it working with just nodes, so I'm glad you've managed to fix the bugs that prevented that!

@jhjourdan
Copy link
Copy Markdown
Collaborator

Generally, this looks good to me.

However, I think we can fix #1299 along the way, and it might be very well the case that the fix would be a simplification of Creusot.

In #1299, I said that the problem was that Why3 was not compatible with that. I think I was wrong: in program code, we should consider the source program function just like any other function (ignoring the fact that it is recursive), and, in the names map, we do not associate the name of the source function with the generated body. Then, a recursive call (in a closure or not) will generate a stub for the source function, with the right specification, and therefore we will generate the right VCs. We translate a recursive function to a no recursive one, but who cares?

Should we do something similar for logic functions, to support polymorphic recursion, and even perhaps mutual recursion?

@Lysxia
Copy link
Copy Markdown
Collaborator Author

Lysxia commented Apr 9, 2026

That does sound feasible! It would require tweaking the termination checker, so maybe #2006 should be merged before that happens.

@jhjourdan
Copy link
Copy Markdown
Collaborator

Are you trying to Lazy.force my review of #2006 ? 😉

I'll do that as soon as the deadline chain that I currently have comes at its end.

@Lysxia Lysxia force-pushed the depgraph branch 2 times, most recently from cd6540b to d0d021b Compare April 29, 2026 08:46
Previously, dependencies started as `dep_set: IndexSet` before being
converted into the `expansion_queue`.

Now, that logic is gathered in a single `DepGraphBuilder` structure
to directly build the final graph.
Thanks to that, `update_graph` is just a small loop now.

A further simplification is that `expansion_queue` now only
contains unvisited vertices instead of edges,
since the edges are added to the graph immediately.
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.

3 participants