-
Notifications
You must be signed in to change notification settings - Fork 236
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
Checking exports blows up with abstract inductive and private predicate that matches on the inductive #1112
Comments
I guess this is expected. |
|
This is related to #1123 Overall, the bugs in this area suggest that checking exports needs to be revised significantly. Currently, it only checks the signatures of non-private functions. This is insufficient. It should really typecheck the entire module again, while removing the definitions of all This would also bring it closer to matching the semantics of modules with interfaces. However, this revision is non-trivial since:
|
Oh, i think this is more than just an error message issue |
This now also appears in miTLS. |
Exports checking behavior is now significantly revised in master (see https://github.com/FStarLang/FStar/wiki/Revised-checking-of-a-module's-interface). The new behavior is currently under the flag Consider the following example: A.fst:
B.fst:
The invocation
The reason is that, in the invocation above, F* tries to verify B against an extracted interface for A. In the extracted interface, the type There is another flag
|
This is great, Aseem! Thanks! Some questions: Does it with with cache_checked_modules already? Is the interface extracted after type checking the implementation? E.g., can we make use of inferred types in the interface? Aside from finding and fixing abstraction violations, are you aware of any other gotchas that prevent us from turning this feature on in other developments? |
Hi Nik: -- Yes, it works with cache_checked_modules already and is also integrated into dependency analysis. -- No, sorry, it is currently extracted before type checking. As we discussed once, this has a 2-phase flavor, may be I can try that some time. -- The scheme requires annotations for abstract definitions. Since interfaces are extracted before type checking, for abstract |
I hit this bug again recently. It still fails with
Since |
This code gives an error:
The error happens only on the command line (or when this module is checked as a dependency of other modules). Which leads me to believe that it has something to do with exports checking.
Also. changing
private
toabstract
in the definition ofpred
makes it work. But also note that I am specifically marking the type ofpred
toType0
, soC
should not have escaped in the return type.I remember one similar issue that I raised before, need to look if this is a duplicate or not. Just noting it down for record.
The text was updated successfully, but these errors were encountered: