Skip to content
Snippets Groups Projects
Commit c2015e43 authored by Mikaël Mayer's avatar Mikaël Mayer
Browse files

Removed println's and references to leon.lang.string

parent cfcdbc75
Branches
Tags
No related merge requests found
/* Copyright 2009-2015 EPFL, Lausanne */
package leon.lang.string
import leon.annotation._
import leon.collection._
@library
case class String(chars: List[Char]) {
def +(that: String): String = {
String(this.chars ++ that.chars)
}
def size = chars.size
def length = size
@ignore
override def toString = {
"\""+charsToString(chars)+"\""
}
@ignore
def charsToString(chars: List[Char]): java.lang.String = chars match {
case Cons(h, t) => h + charsToString(t)
case Nil() => ""
}
}
/* Copyright 2009-2015 EPFL, Lausanne */
package leon.lang
import leon.annotation._
import leon.collection._
import scala.language.implicitConversions
import scala.collection.immutable.{List => ScalaList}
package object string {
/*@ignore
implicit def strToStr(s: java.lang.String): leon.lang.string.String = {
String(listToList(s.toList))
}*/
@ignore
def listToList[A](s: ScalaList[A]): List[A] = s match {
case scala.::(h, t) =>
Cons(h, listToList(t))
case _ =>
Nil[A]()
}
}
......@@ -16,7 +16,6 @@ case class Library(pgm: Program) {
lazy val Some = lookup("leon.lang.Some").collectFirst { case ccd : CaseClassDef => ccd }
lazy val None = lookup("leon.lang.None").collectFirst { case ccd : CaseClassDef => ccd }
//lazy val String = lookup("leon.lang.string.String").collectFirst { case ccd : CaseClassDef => ccd }
lazy val StrOps = lookup("leon.lang.StrOps").collectFirst { case md: ModuleDef => md }
lazy val Dummy = lookup("leon.lang.Dummy").collectFirst { case ccd : CaseClassDef => ccd }
......
......@@ -199,7 +199,6 @@ class StringSolverSuite extends FunSuite with Matchers with ScalaFutures {
val solution = solve(problem)
solution should not be 'empty
val firstSolution = solution(0)
println("First solution " + firstSolution)
firstSolution(idMap("const8")) should equal("List(")
firstSolution(idMap("const4")) should equal("")
}
......@@ -216,7 +215,6 @@ T2: internal
T2: ret Pop() -> 5"""
val problem: Problem = List(lhs === expected)
println("Problem to solve:" + StringSolver.renderProblem(problem))
solve(problem) should not be 'empty
}
......
......@@ -3,7 +3,6 @@ import leon.annotation._
import leon.collection._
import leon.lang.synthesis._
import leon._
import leon.lang.string._
object Lambda {
case class Id(v: BigInt)
......
import leon.lang._
import leon.lang.synthesis._
import leon.lang.string._
import leon.collection._
object Justify {
......
import leon.lang._
import leon.lang.string._
object TryMonad {
......
......@@ -6,7 +6,6 @@ import leon.lang._
object Freshen {
import State._
import leon.lang.string._
case class Id(name: String, id: BigInt)
......
import leon.lang.string._
import leon.annotation._
sealed abstract class Outcome[T] {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment