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

Evaluation of passes fails to record positions of patterns, guards, scrutinees #161

Open
colder opened this issue Dec 8, 2015 · 1 comment
Labels

Comments

@colder
Copy link
Member

colder commented Dec 8, 2015

The counter-example is not well displayed within the passes:

package leon.custom

import leon._
import leon.lang._
import leon.collection._
import leon.annotation._

sealed abstract class List[T] {  
  def count(e: T): BigInt = { this match {
    case Cons(h, t) =>
      if (h == e) {
        t.count(e)
      } else {
        t.count(e)
      }
    case Nil() =>
      BigInt(0)
  }} ensuring { res => 
    (((this, e), res) passes {
      case (Cons(a1, Cons(a2, Cons(a3, Cons(a4, Nil())))), v) if a1 == v && a2 == v && a3 != v && a4 == v => 3
      case (Cons(a1, Cons(a2, Nil())), v) if a1 != v && a2 != v => 0
    })
  }

}


case class Cons[T](h: T, t: List[T]) extends List[T]
case class Nil[T]() extends List[T]
@colder colder added the bug label Dec 8, 2015
@MikaelMayer
Copy link
Collaborator

What is it supposed to display ? Or where ?

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

2 participants