Dafnyを使って以下のプログラムの正誤を証明しようとしています。
datatype List<T> = Nil | Cons(T, List)
function tail(l:List):List
{
match l
case Nil => Nil
case Cons(x,xs) => xs
}
method check(l:List)
{
assert(expr(l)!=2);
}
function expr(l : List):int
{
if(l == Nil) then 0
else if(tail(l)==Nil) then 1
else if(tail(tail(l)) == Nil) then 2
else 3
}
Dafny は、アサーションが正しくないことを証明することに成功しました。ただし、アサーションが失敗した例は示していません。Dafny だけでそのような例を挙げることができますか?