Skip to content

Commit

Permalink
Limit size of VC info in verif report
Browse files Browse the repository at this point in the history
  • Loading branch information
colder committed May 22, 2015
1 parent c23d1da commit 0699558
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/scala/leon/verification/VerificationReport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ case class VerificationReport(val results: Map[VC, Option[VCResult]]) {
lazy val totalInvalid: Int = vrs.count(_._2.isInvalid)
lazy val totalUnknown: Int = vrs.count(_._2.isInconclusive)

def sizeLimit(str: String, limit: Int): String = {
require(limit > 3)
if (str.length > limit) {
str.substring(0, limit-3)+"..."
} else {
str
}
}

def summaryString : String = if(totalConditions >= 0) {
import utils.ASCIIHelpers._

Expand All @@ -32,7 +41,7 @@ case class VerificationReport(val results: Map[VC, Option[VCResult]]) {
val timeStr = vr.timeMs.map(t => f"${t/1000d}%-3.3f").getOrElse("")
Row(Seq(
Cell(vc.fd.id.toString),
Cell(vc.kind.name),
Cell(sizeLimit(vc.kind.name, 30)),
Cell(vc.getPos),
Cell(vr.status),
Cell(vr.solvedWith.map(_.name).getOrElse("")),
Expand Down

0 comments on commit 0699558

Please sign in to comment.