Scala Programming Language
  1. Scala Programming Language
  2. SI-6031

allow customizing the cnf budget, equate stack overflow to budget overflow

    Details

      Description

      allow the cnf budget to be customized
      catch stack overflows in CNF conversion and treat them like a cnf budget exceeded error

        Activity

        Show
        Adriaan Moors added a comment - https://github.com/scala/scala/pull/953
        Hide
        Seth Tisue added a comment -

        fwiw, I did exceed the default analysis budget in some “real world” code. (Well, I work for a university, so maybe I don't get to claim that, but it's production code I got paid to write.)

        with potentially incriminating identifiers shortened:

        abstract sealed trait T
        case object T1 extends T
        case object T2 extends T
        case object T3 extends T
        case object T4 extends T
        case object T5 extends T
        case object T6 extends T
        case object T7 extends T
        case object T8 extends T
        case object T9 extends T
        case object T10 extends T
        case object T11 extends T
        case object T12 extends T
        case object T13 extends T
        case object T14 extends T
        case object T15 extends T
        case object T16 extends T
        
        case class C(t: T)
        
        object S {
          def foo(xs: Seq[C]) =
            xs match {
              case Seq(C(T1), C(T2)) => true
              case _ => false
            }
        }
        

        increasing the budget to 512 made the warning go away.

        Show
        Seth Tisue added a comment - fwiw, I did exceed the default analysis budget in some “real world” code. (Well, I work for a university, so maybe I don't get to claim that, but it's production code I got paid to write.) with potentially incriminating identifiers shortened: abstract sealed trait T case object T1 extends T case object T2 extends T case object T3 extends T case object T4 extends T case object T5 extends T case object T6 extends T case object T7 extends T case object T8 extends T case object T9 extends T case object T10 extends T case object T11 extends T case object T12 extends T case object T13 extends T case object T14 extends T case object T15 extends T case object T16 extends T case class C(t: T) object S { def foo(xs: Seq[C]) = xs match { case Seq(C(T1), C(T2)) => true case _ => false } } increasing the budget to 512 made the warning go away.

          People

          • Assignee:
            Adriaan Moors
            Reporter:
            Adriaan Moors
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development