Skip to content

Solver: do not use a hint if its fuels are no longer valid #3848

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

mtzguido
Copy link
Member

@mtzguido mtzguido commented May 6, 2025

When recording a hint, we also store the fuels at which the query succeeded, so we can tr to replay it in that configuration. However, we are not checking that these fuels are still allowed in the current configuration, so if we stored a hint for a query that required large fuels, and then add #set-options "--fuel 0 --ifuel 0" at the top of the file, it will still pass. This is undesirable since, when the hint breaks, it will require significant debugging to find out what's wrong.

This fixes by ignoring a hint when its recorded fuels are out of bounds. This is again a bit heuristic (e.g. if min/max fuels are 1/8 and we recorded a 5, the fuel-increasing logic will just try 1,2,4,8 whenever there is no hint), but I think will catch most common situations.

Note: the fuel settings are already included in the query hash string, so no change is needed there.

Thanks to @msprotz for noticing this.

When recording a hint, we also store the fuels at which the query
succeeded, so we can tr to replay it in that configuration. However,
we are not checking that these fuels are still allowed in the current
configuration, so if we stored a hint for a query that required large
fuels, and then add `#set-options "--fuel 0 --ifuel 0"` at the top of
the file, it will still pass. This is undesirable since, when the hint
breaks, it will require significant debugging to find out what's wrong.

This fixes by ignoring a hint when its recorded fuels are out of bounds.
This is again a bit heuristic (e.g. if min/max fuels are 1/8 and we
recorded a 5, the fuel-increasing logic will just try 1,2,4,8 whenever
there is no hint), but I think will catch most common situations.

Note: the fuel settings are already included in the query hash string,
so no change is needed there.

Thanks to @msprotz for noticing this.
@mtzguido mtzguido mentioned this pull request May 6, 2025
10 tasks
@mtzguido mtzguido merged commit c1dc7af into FStarLang:master May 6, 2025
10 checks passed
@mtzguido mtzguido deleted the hint_fuel branch May 6, 2025 18:27
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.

1 participant