Skip to content
Snippets Groups Projects
Commit dbc4e630 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Use PrettyPrinter and not ScalaPrinter for printing c-ex

parent 59268e2b
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ package leon.verification ...@@ -4,6 +4,7 @@ package leon.verification
import leon.purescala.Expressions._ import leon.purescala.Expressions._
import leon.purescala.Definitions._ import leon.purescala.Definitions._
import leon.purescala.PrettyPrinter
import leon.purescala.Common._ import leon.purescala.Common._
import leon.utils.Positioned import leon.utils.Positioned
...@@ -52,8 +53,11 @@ case class VCResult(status: VCStatus, solvedWith: Option[Solver], timeMs: Option ...@@ -52,8 +53,11 @@ case class VCResult(status: VCStatus, solvedWith: Option[Solver], timeMs: Option
reporter.error(" => INVALID") reporter.error(" => INVALID")
reporter.error("Found counter-example:") reporter.error("Found counter-example:")
// We use PrettyPrinter explicitly and not ScalaPrinter: printing very
// large arrays faithfully in ScalaPrinter is hard, while PrettyPrinter
// is free to simplify
val strings = cex.toSeq.sortBy(_._1.name).map { val strings = cex.toSeq.sortBy(_._1.name).map {
case (id, v) => (id.asString(context), v.asString(context)) case (id, v) => (id.asString(context), PrettyPrinter(v))
} }
if (strings.nonEmpty) { if (strings.nonEmpty) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment