Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/EasyCrypt/easycrypt
16 March 2026, 10:24:02 UTC
  • Code
  • Branches (52)
  • Releases (9)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/aprhl
    • refs/heads/arrays
    • refs/heads/asynchile
    • refs/heads/bdep_ecCircuitsRefactor
    • refs/heads/bdep_merge_conseq_fix
    • refs/heads/bdep_mldsa_correctness
    • refs/heads/call-fwd-auto-frame
    • refs/heads/ci-build-docker-test-on-release
    • refs/heads/comm-algebra
    • refs/heads/copilot/fix-all-fixme-comments
    • refs/heads/coupling-rnd-tactics
    • refs/heads/delayed-couplings
    • refs/heads/deploy-fix-#154
    • refs/heads/deploy-quantum-upgrade
    • refs/heads/deploy-tc
    • refs/heads/distr-matrix
    • refs/heads/doc-seq-tactic
    • refs/heads/doc-types
    • refs/heads/doc-while-tactic
    • refs/heads/dynmatrix-stability
    • refs/heads/eHoare-example
    • refs/heads/eval-pwhile
    • refs/heads/expr-fold
    • refs/heads/feature_conseq_metavars
    • refs/heads/feature_procchange_framing
    • refs/heads/feature_signed_modP
    • refs/heads/fix-142
    • refs/heads/fix-729
    • refs/heads/fix_opsel_error_printing
    • refs/heads/fmap-fold
    • refs/heads/improve_nix_flake
    • refs/heads/indexed-types
    • refs/heads/jasmin-in-ci
    • refs/heads/latest
    • refs/heads/main
    • refs/heads/new-ehoare
    • refs/heads/ocaml-5
    • refs/heads/ois-refactoring
    • refs/heads/perms-group
    • refs/heads/polydiv
    • refs/heads/pose-match-fix
    • refs/heads/r2022.04-01
    • refs/heads/refactor_cfold
    • refs/heads/release
    • refs/heads/setoidrw
    • refs/heads/softcode-memories
    • refs/heads/subtypes
    • refs/heads/theory_finite_field
    • refs/heads/uptobad_warnings
    • refs/heads/vscode
    • refs/heads/yaeasypqc
    • refs/tags/r2024.09
    • r2026.02
    • r2025.11
    • r2025.10
    • r2025.08
    • r2025.03
    • r2025.02
    • r2024.01
    • r2023.09
    • r2022.04
  • 989e7ce
  • /
  • examples
  • /
  • WhileSampling.ec
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
  • release
origin badgecontent badge
swh:1:cnt:5a6bff36de03c2d8f4fd384d4d4ab7056a7a4309
origin badgedirectory badge
swh:1:dir:f7f9019a20489153dd9e2412543d4a66c322d783
origin badgerevision badge
swh:1:rev:2b3bbadffa084466fd3450f367b2102e032c1301
origin badgesnapshot badge
swh:1:snp:b6eeb0bcb674633e436c9d0fdc73d9fd939f58d3
origin badgerelease badge
swh:1:rel:e22981de5faf2f258b09729cbdbba1826b77ea1c

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
  • release
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 2b3bbadffa084466fd3450f367b2102e032c1301 authored by Pierre-Yves Strub on 15 December 2023, 19:16:51 UTC
docker: fix opam init CL
Tip revision: 2b3bbad
WhileSampling.ec
require import Real Distr.

type t.

op sample: t distr.
axiom sample_ll: is_lossless sample.

op test: t -> bool.
axiom pr_ntest: 0%r < mu sample (predC test).

module Sample = {
  proc sample () : t = {
    var r : t;

    r <$ sample;
    while (test r) {
      r <$ sample;
    }
    return r;
  }
}.

lemma Sample_lossless: islossless Sample.sample.
proof.
proc; seq  1: true=> //.
+ by auto=> />; exact/sample_ll.
while true (if test r then 1 else 0) 1 (mu sample (predC test))=> //.
+ by move=> _ r; case: (test r).
+ move=> ih; seq  1: true=> //.
  by auto; rewrite sample_ll.
+ by auto; rewrite sample_ll.
rewrite pr_ntest=> /= z; conseq (: true ==> !test r).
+ smt().
by rnd; auto=> />.
qed.

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API