Skip to content

Conversation

mtzguido
Copy link
Member

We've long ignored the pragmas in an fsti when checking an fst (#1142). This helps in preventing tons of confusion when checking an fst file, as otherwise the rlimit/fuel/ifuel can change under the user's feet as they check a file.

However, in the IDE mode, when the pragma was near the top of the fsti (more specifically in the first chunk that would be interleaved) in the fst, this was still being interleaved. This is since when try to find the relevant decls to interleave from the fsti before the top-level module Foo decl, and that returns the empty set, so they remaing in the remaining_iface_vals which are still returned, but were unfiltered.

This lead to a long headache just now while noticing a file failing in the IDE, but that had succeeded repeatedly in batch mode.

Fix this by just filtering out all the pragmas before any kind of interleaving, which should be more robust.

We've long ignored the pragmas in an fsti when checking an fst
(FStarLang#1142). This helps in preventing
tons of confusion when checking an fst file, as otherwise the
rlimit/fuel/ifuel can change under the user's feet as they check a file.

However, in the IDE mode, when the pragma was near the top of the
fsti (more specifically in the first chunk that would be interleaved)
in the fst, this was still being interleaved. This is since when try
to find the relevant decls to interleave from the fsti before the
top-level `module Foo` decl, and that returns the empty set, so they
remaing in the `remaining_iface_vals` which are still returned, but were
unfiltered.

This lead to a long headache just now while noticing a file failing in
the IDE, but that had succeeded repeatedly in batch mode.

Fix this by just filtering out all the pragmas before any kind of
interleaving, which should be more robust.
@mtzguido mtzguido enabled auto-merge July 16, 2025 06:04
@mtzguido mtzguido disabled auto-merge July 16, 2025 06:35
@mtzguido
Copy link
Member Author

This needed more tweaks, and does in fact cause a difference in batch mode, which we just hadn't noticed. Checking the fallout here:

https://github.com/mtzguido/FStar/actions/runs/16313611786

@mtzguido mtzguido mentioned this pull request Jul 16, 2025
10 tasks
@mtzguido mtzguido marked this pull request as draft July 16, 2025 15:24
mtzguido added 3 commits July 16, 2025 16:00
This avoids having a pragma in the interface.

Also tidy up fuel usage/pragmas in these files.
@mtzguido
Copy link
Member Author

I removed an unrelated patch about pow2 (now in #3910) and re-ran here https://github.com/mtzguido/FStar/actions/runs/16332110688

@mtzguido mtzguido mentioned this pull request Jul 17, 2025
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