Skip to content
Snippets Groups Projects
Commit 871fe2f7 authored by Sandro Stucki's avatar Sandro Stucki Committed by Manos Koukoutos
Browse files

Adds test case illustrating non-wellfoundedness issues with proofs.

parent d5f23351
No related branches found
No related tags found
No related merge requests found
/* Copyright 2009-2015 EPFL, Lausanne */
package leon.testcases.verification.proof
import leon.collection._
import leon.lang._
import leon.proof._
object NotWellFounded {
// This proof is not well-founded. Since Leon doesn't run the
// termination checker by default, it will accept the proof as
// valid.
def allListsAreEmpty[T](xs: List[T]): Boolean = {
xs.isEmpty because {
xs match {
case Nil() => trivial
case Cons(x, xs) => allListsAreEmpty(x :: xs)
}
}
}.holds
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment