Skip to content
Snippets Groups Projects
Commit 49f1e0e2 authored by Régis Blanc's avatar Régis Blanc
Browse files

regression is now at the top level

parent 9ae3efd4
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 236 deletions
object InfiniteLoop {
def infinite(): Int = {
var i = 0
var sum = 0
while (i < 10) {
sum = sum + i
}
sum
}
}
Revision 1137, this morning 11:20, everything worked:
====================================================
mkInfiniteTree postcondition valid Unifier
dumbInsert postcondition valid Unifier
insert postcondition valid Unifier
createRoot postcondition valid Unifier
dumbInsertWithOrder postcondition valid Unifier
====================================================
Revision 1147, this evening 19:32, already broken:
====================================================
mkInfiniteTree postcondition valid Unifier
dumbInsert postcondition unknown ---
insert postcondition unknown ---
createRoot postcondition valid Unifier
dumbInsertWithOrder postcondition unknown ---
====================================================
Revision 1157, now, better again
==================================================
createRoot postcondition valid Unifier
dumbInsert postcondition valid Unifier
mkInfiniteTree postcondition valid Unifier
dumbInsertWithOrder postcondition valid Unifier
insert postcondition <BAPA seems to hang on conjunction 11>
==================================================
Okay, we're getting there..
object Array1 {
def foo(): Int = {
(Array.fill(5)(5))(2) = 3
0
}
}
object Array10 {
def foo(): Int = {
val a = Array.fill(5)(0)
def rec(): Array[Int] = {
a
}
val b = rec()
b(0)
}
}
object Array2 {
def foo(): Int = {
val a = Array.fill(5)(5)
val b = a
b(3)
}
}
object Array3 {
def foo(): Int = {
val a = Array.fill(5)(5)
if(a.length > 2)
a(1) = 2
else
0
0
}
}
object Array4 {
def foo(a: Array[Int]): Int = {
val b = a
b(3)
}
}
object Array5 {
def foo(a: Array[Int]): Int = {
a(2) = 4
a(2)
}
}
// vim: set ts=4 sw=4 et:
object Array6 {
def foo(): Int = {
val a = Array.fill(5)(5)
var b = a
b(0)
}
}
object Array7 {
def foo(): Int = {
val a = Array.fill(5)(5)
var b = a
b(0)
}
}
object Array8 {
def foo(a: Array[Int]): Array[Int] = {
a
}
}
object Array9 {
def foo(a: Array[Int]): Int = {
def rec(): Array[Int] = {
a
}
val b = rec()
b(0)
}
}
object InstanceOf1 {
abstract class A
case class B(i: Int) extends A
case class C(i: Int) extends A
abstract class Z
case class Y(i: Int) extends Z
def foo(): Int = {
//require(3.isInstanceOf[Int])
val b: A = B(2)
if(b.isInstanceOf[Y])
0
else
-1
} ensuring(_ == 0)
def bar(): Int = foo()
}
// vim: set ts=4 sw=4 et:
object Array1 {
def foo(): Int = {
val a = Array.fill(5)(0)
a(2) = 3
a(2)
} ensuring(_ == 0)
}
object Array2 {
def foo(): Int = {
val a = Array.fill(5)(0)
a(2) = 3
a.length
} ensuring(_ == 4)
}
import leon.Utils._
object Array3 {
def foo(): Int = {
val a = Array.fill(5)(3)
var i = 0
var sum = 0
(while(i <= a.length) {
sum = sum + a(i)
i = i + 1
}) invariant(i >= 0)
sum
} ensuring(_ == 15)
}
import leon.Utils._
object Array4 {
def foo(a: Array[Int]): Int = {
a(2)
}
}
import leon.Utils._
object Array4 {
def foo(a: Array[Int]): Int = {
require(a.length > 2)
a(2)
} ensuring(_ == 0)
}
import leon.Utils._
object Epsilon1 {
def rand2(x: Int): Int = epsilon((y: Int) => true)
//this should not hold
def property2(x: Int): Boolean = {
rand2(x) == rand2(x+1)
} holds
}
import leon.Utils._
object Epsilon1 {
def rand3(x: Int): Int = epsilon((y: Int) => x == x)
//this should not hold
def property3(x: Int): Boolean = {
rand3(x) == rand3(x+1)
} holds
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment