EasyCrypt / easycrypt

EasyCrypt: Computer-Aided Cryptographic Proofs
MIT License
321 stars 49 forks source link

[nix] Rework the nix configuration #428

Closed fdupress closed 1 year ago

fdupress commented 1 year ago

This reworks the nix configuration to:

  1. avoid duplication of derivation information; and
  2. pin provers to better support replication; (this is only partial: nixpkgs allows easy pinning of z3 down to minor only, and cvc4 is pinned only by virtue of no longer being maintained).

The pinning upgrades all provers to their maximum version supported by why3 1.6.0, stopping short of upgrading cvc4 to cvc5 due to clear instability in cvc5 and its interactions with why3 (50/50 chance of High failure). A minor refinement is needed in the case of one SMT call which fails with z3 4.12.2 and all other solvers, but succeeds with z3 <= 4.12.1.

The pinning of alt-ergo to 2.4.2 works, but leaves paths and derivation names unchanged, so alt-ergo-2.4.2 appears in paths as alt-ergo-2.4.3. Avoiding this might require vendoring a derivation for alt-ergo. (@vbgl , do you have a suggestion for this? alt-ergo is internally split into 3 separate derivations and that level of override-based surgery is beyond the effort I'm willing to put into pinning an SMT solver.)

If we decide the pins need more work, it should be fine to only keep the first commit, and at least make it easier and safer to later improve our derivations.