Skip to content

Commit

Permalink
remove uniform extern
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-aws committed Nov 6, 2023
1 parent a8ad7d5 commit c342f38
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions src/Dafny-VMC.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ module DafnyVMC {
constructor {:extern} ()
}

/* class DRandomExternUniform extends Coin.Interface.Trait, UniformPowerOfTwo.Implementation.Trait, Bernoulli.Implementation.Trait, Uniform.Implementation.TraitExtern, BernoulliExpNeg.Implementation.Trait, DiscreteGaussian.Implementation.Trait, DiscreteLaplace.Implementation.Trait {
constructor {:extern} ()
} */

class DRandomExternUniform extends Coin.Interface.Trait, UniformPowerOfTwo.Implementation.TraitExtern, Bernoulli.Implementation.Trait, Uniform.Implementation.Trait, BernoulliExpNeg.Implementation.Trait, DiscreteGaussian.Implementation.Trait, DiscreteLaplace.Implementation.Trait {
constructor {:extern} ()
}
Expand Down
15 changes: 0 additions & 15 deletions src/Distributions/Uniform/Implementation.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,4 @@ module Uniform.Implementation {
reveal Model.Sample();
}
}

method {:extern "DRandomUniform", "Uniform"} ExternUniformSample(n: nat) returns (u: nat)

trait {:termination false} TraitExtern extends Interface.Trait {
method UniformSample(n: nat) returns (u: nat)
modifies this
decreases *
requires n > 0
ensures u < n
ensures Model.Sample(n)(old(s)) == Monad.Result(u, s)
{
u := ExternUniformSample(n);
assume {:axiom} false; // assume correctness of extern implementation
}
}
}

0 comments on commit c342f38

Please sign in to comment.