Skip to content

improve search graph docs, reset encountered_overflow between reruns #142617

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jun 17, 2025

I think this shouldn't really matter for now. It will be more relevant for my current rework as we otherwise cannot partially reevaluate the root goal in case there has been overflow during the prervious iteration.

r? @BoxyUwU

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 17, 2025
// optimization. However, given that the proof tree will likely
// look similar to the previous iterations when reevaluating, it's
// better for caching if the reevaluation also starts out with `false`
encountered_overflow: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've reworked this to use EvaluationResult as I've accidentally dropped heads from previous iterations while working on this change and it took me a bit to actually figure out what's going on. This now makes it clear that we need to track everything correctly.

@@ -26,6 +26,10 @@ pub(super) struct StackEntry<X: Cx> {
/// The available depth of a given goal, immutable.
pub available_depth: AvailableDepth,

/// Starts out as `None` and gets set when rerunning this
/// goal in case we encounter a cycle.
pub provisional_result: Option<X::Result>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moving this field as this type is now all the immutable fields and then the mutable ones

@lcnr lcnr force-pushed the search_graph-3 branch from ae077dd to 4b7ec20 Compare June 17, 2025 09:01
@lcnr lcnr changed the title improve search graph, reset encountered_overflow between reruns improve search graph docs, reset encountered_overflow between reruns Jun 17, 2025
@rust-log-analyzer

This comment was marked as outdated.

lcnr added 3 commits June 17, 2025 11:50
also return `EvaluationResult` instead of the final
`StackEntry` to make sure we correctly track information
between reruns.
@lcnr lcnr force-pushed the search_graph-3 branch from 4b7ec20 to e70db10 Compare June 17, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants