Integrating Scala, Intellij Idea and SBT on project III

I'm [coming back][1] to developing in Scala using the Intellij Idea IDE based on SBT. This time I want to integrate the [Stainless verifier][2] which I forked in my github with a project that needs to be verified. I wrote the following build.sbt:

    name := "experiment3"
    version := "0.1"
    scalaVersion := "2.12.6"

I then added my clone of stainless as a module to the Intellij Idea project and write the following scala class:

    import stainless.annotation._
    import stainless.lang._

    object Main {
      def max(x: Int, y: Int): Int = {
        val d = x - y
        if (d > 0) x
        else y
      } ensuring(res =>
        x <= res && y <= res && (res == x || res == y))
      def main(args: Array[String]): Unit = {
        println("Hello world")

However, the compiler does not recognize stainless in the imports.

How can I set this project correctly in Intellij Idea?



Please sign in to leave a comment.