Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in ImperativeCodeElimination #288

Open
mantognini opened this issue Dec 15, 2016 · 0 comments
Open

Bug in ImperativeCodeElimination #288

mantognini opened this issue Dec 15, 2016 · 0 comments
Labels

Comments

@mantognini
Copy link
Contributor

mantognini commented Dec 15, 2016

The following program makes Leon's ImperativeCodeElimination crash.

object Dummy {

  case class M(var value: Int)

  def barM(m: M) = {
    m.value = m.value + 1
    303
  }

  def foo(m: M) = m match {
    case n: M => barM(n)
  }

}

Stacktrace looks like:

java.lang.AssertionError: assertion failed
	at scala.Predef$.assert(Predef.scala:156)
	at leon.xlang.ImperativeCodeElimination$.leon$xlang$ImperativeCodeElimination$$toFunction(ImperativeCodeElimination.scala:75)
	at leon.xlang.ImperativeCodeElimination$$anonfun$20.apply(ImperativeCodeElimination.scala:177)
	at leon.xlang.ImperativeCodeElimination$$anonfun$20.apply(ImperativeCodeElimination.scala:175)
	at scala.collection.immutable.List$$anonfun$foldRight$1.apply(List.scala:397)
	at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:124)
	at scala.collection.immutable.List.foldLeft(List.scala:84)
	at scala.collection.immutable.List.foldRight(List.scala:397)
	at leon.xlang.ImperativeCodeElimination$.leon$xlang$ImperativeCodeElimination$$toFunction(ImperativeCodeElimination.scala:175)
	at leon.xlang.ImperativeCodeElimination$.leon$xlang$ImperativeCodeElimination$$toFunction(ImperativeCodeElimination.scala:200)
	at leon.xlang.ImperativeCodeElimination$$anonfun$44.apply(ImperativeCodeElimination.scala:376)
	at leon.xlang.ImperativeCodeElimination$$anonfun$44.apply(ImperativeCodeElimination.scala:374)

When this is fixed, src/test/resources/regression/genc/unverified/Inheritance9.scala should be moved to src/test/resources/regression/genc/valid/Inheritance9.scala.

@mantognini mantognini added the bug label Dec 15, 2016
mantognini added a commit that referenced this issue Dec 15, 2016
 - Aliasing3 is disabled because it make verification crash (see #289)
 - Aliasing4 is disabled because it make verification produce incorrect counter-example (see #287)
 - Inheritance9 is disabled because it make xlang crash (see #288)
 - UsingConcreteCLasses is enabled because verification is easy
mantognini added a commit that referenced this issue Dec 15, 2016
 - Aliasing3 is disabled because it make verification crash (see #289)
 - Aliasing4 is disabled because it make verification produce incorrect counter-example (see #287)
 - Inheritance9 is disabled because it make xlang crash (see #288)
 - UsingConcreteCLasses is enabled because verification is easy
mantognini added a commit that referenced this issue Jan 25, 2017
 - Aliasing3 is disabled because it make verification crash (see #289)
 - Aliasing4 is disabled because it make verification produce incorrect counter-example (see #287)
 - Inheritance9 is disabled because it make xlang crash (see #288)
 - UsingConcreteCLasses is enabled because verification is easy
mantognini added a commit that referenced this issue Feb 13, 2017
 - Aliasing3 is disabled because it make verification crash (see #289)
 - Aliasing4 is disabled because it make verification produce incorrect counter-example (see #287)
 - Inheritance9 is disabled because it make xlang crash (see #288)
 - UsingConcreteCLasses is enabled because verification is easy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant