Open cpitclaudel opened 2 years ago
Here is a variant that lets you assert false
abstract module Interface {
const x : int := 1
}
abstract module Functor {
import Obj : Interface
lemma NZ() ensures Obj.x == 1 {}
}
module Implementation {
const x : int := 0
}
module Refinement refines Functor {
import Obj = Implementation
method Unsound() ensures false {
calc { 0; Obj.x; { NZ(); } 1; }
}
}
method Main() ensures false {
Refinement.Unsound();
}
The following code crashes Dafny:
h/t @davidcok @RustanLeino