Skip to content
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

Merging fiat-crypto utilities into coqutil? #55

Open
Tracked by #143
JasonGross opened this issue Jan 26, 2022 · 2 comments
Open
Tracked by #143

Merging fiat-crypto utilities into coqutil? #55

JasonGross opened this issue Jan 26, 2022 · 2 comments
Labels
question Further information is requested

Comments

@JasonGross
Copy link
Collaborator

JasonGross commented Jan 26, 2022

Should any/all/most of the fiat-crypto src/Util directory be migrated to coqutil? (Currently this directory is more-or-less replicated across fiat, rewriter, and fiat-crypto, with fiat-crypto containing the most complete and up-to-date version.)

An incomplete list of tactics, roughly in order from most-used to least-used:

An incomplete list of other utilities:

@JasonGross JasonGross added the question Further information is requested label Jan 26, 2022
@samuelgruetter
Copy link
Contributor

I think it would be useful to have these tactics and utilities in coqutil. Some questions:

  • What Coq version compatibility constraint does that impose, and will I have to test new code for coqutil with 7 different Coq versions before pushing it? Could we maybe designate the Tactics, Datatypes and the Word subfolders as high-compatibility folders (supporting older Coq versions), while only supporting the most recent released Coq version in the remaining subfolders?
  • FixCoqMistakes.v looks like it would be good to have in coqutil too, but I wonder why it has to export GlobalSettings.v? Could we have it in coqutil without GlobalSettings.v?
  • What should we do about fiat-crypto Util code that's already present in a somewhat different form in coqutil? I'm not super keen on doing a lot of merging work and updating bedrock2 to use renamed definitions, but having several similar definitions of basically the same thing in coqutil doesn't look great either, on the other hand we also shouldn't perfectionism allow to be the enemy of usefulness... Opinions?

I quickly went through the tactics/utilities you listed above and looked for equivalent ones in coqutil, and here's what I found:

coqutil.Tactics.Tactics.destruct_one_match_...

coqutil.Tactics.forward.unique_pose

head/head_of_app already appears in 3 different locations in coqutil

coqutil.Z

coqutil.Decidable based on BoolSpec rather than sumbool (because we don't want proofs of Props to appear in code that's meant to be executed)

coqutil.Datatypes.Inhabited

coqutil.Datatypes.HList

also in coqutil.Datatypes.HList

coqutil.Datatypes.List also contains some lemmas about option (list _) and list (option _)

@andres-erbsen
Copy link
Contributor

FixCoqMistakes sounds like https://github.com/mit-plv/coqutil/blob/master/src/coqutil/sanity.v

https://coq.inria.fr/refman/changes.html

Changed: The default tactic used by firstorder is auto with core instead of auto with *; see Solvers for logic and equality for details; old behavior can be reset by using the -compat 8.12 command-line flag; to ease the migration of legacy code, the default solver can be set to debug auto with * with Set Firstorder Solver debug auto with * (#11760, by Vincent Laporte).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants