Repository navigation
Conversation
strub
force-pushed
the
fix-unsuspend-oinfos
branch
from
November 29, 2026 07:57
d5a7709 to
8985f23
Compare
Fixes #1175. Fixes #1234. The oracle infos of a module record, for each procedure, the calls it may make to the parameters of the module. Two cases lost some of these calls. The module then looked as if it made no call at all and passed a restriction that it does not respect, which is enough to prove `false`. Partial applications (#1175). When a functor is partially applied, `Mod.unsuspend` keeps the calls whose target is one of the remaining parameters. It compared the full target of the call with the parameter, so a call such as `S(M).kg`, whose target is `S(M)` and not `S`, was dropped even when `S` is a remaining parameter. In the example of the issue, the following module is accepted at `Adv`, whose `run` may call nothing: module (B (D : T) : Adv) (S : Sch) = { proc run() : unit = { S(M).kg(); } }. The filter now compares the functor of the target, as `get_oi_calls` already does when it computes the calls of a module. `ModTy.sig_of_mt` uses the same filter and is changed in the same way. Module aliases (#1234). An alias copied the oracle infos of its target. These are the calls of the target to its own parameters, and they miss the calls that reach the parameters of the alias: module (C1 : V) (O : U) = O. module (C2 : V) (O : U) = E(O). module (C3 : V) (O : U) = E(E(O)). A procedure of `C1` is a call to the same procedure of `O`, a parameter of the alias. In `C2`, `Mod.unsuspend` drops the calls of `E` to its parameter, applied to `O`: that is right when the argument is closed, since the call is then no longer a call to a parameter, but here `O` is a parameter of the alias. In `C3`, the call of the outer `E` is to `E(O).p`, which only reaches `O.p` through the inner `E`. Other aliases, functor parameters and partially applied functors hide the call in the same way. A procedure of an alias is now treated as a call to the same procedure of its target, applied to the remaining parameters. Its oracle infos are computed from this call by the transitive closure that `get_oi_calls` uses for structures, which now takes a list of entry calls (`get_oi_calls_of_entries`).
strub
force-pushed
the
fix-unsuspend-oinfos
branch
from
November 29, 2026 08:35
8985f23 to
9f9b87b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1175.
Fixes #1234.
The oracle infos of a module record, for each procedure, the calls it
may make to the parameters of the module. Two cases lost some of these
calls. The module then looked as if it made no call at all and passed
a restriction that it does not respect, which is enough to prove
false.Partial applications (#1175). When a functor is partially applied,
Mod.unsuspendkeeps the calls whose target is one of the remainingparameters. It compared the full target of the call with the
parameter, so a call such as
S(M).kg, whose target isS(M)and notS, was dropped even whenSis a remaining parameter. In theexample of the issue, the following module is accepted at
Adv,whose
runmay call nothing:The filter now compares the functor of the target, as
get_oi_callsalready does when it computes the calls of a module.
ModTy.sig_of_mtuses the same filter and is changed in the same way.
Module aliases (#1234). An alias copied the oracle infos of its
target. These are the calls of the target to its own parameters, and
they miss the calls that reach the parameters of the alias:
A procedure of
C1is a call to the same procedure ofO, a parameterof the alias. In
C2,Mod.unsuspenddrops the calls ofEto itsparameter, applied to
O: that is right when the argument is closed,since the call is then no longer a call to a parameter, but here
Ois a parameter of the alias. In
C3, the call of the outerEis toE(O).p, which only reachesO.pthrough the innerE. Otheraliases, functor parameters and partially applied functors hide the
call in the same way.
A procedure of an alias is now treated as a call to the same procedure
of its target, applied to the remaining parameters. Its oracle infos
are computed from this call by the transitive closure that
get_oi_callsuses for structures, which now takes a list of entrycalls (
get_oi_calls_of_entries).