Skip to content
Snippets Groups Projects
Commit 031954ed authored by Lars Hupel's avatar Lars Hupel Committed by Etienne Kneuss
Browse files

don't store the tactic in the VC

parent 171ae35a
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ class DefaultTactic(vctx: VerificationContext) extends Tactic(vctx) { ...@@ -16,7 +16,7 @@ class DefaultTactic(vctx: VerificationContext) extends Tactic(vctx) {
case (Some(post), Some(body)) => case (Some(post), Some(body)) =>
val vc = implies(precOrTrue(fd), application(post, Seq(body))) val vc = implies(precOrTrue(fd), application(post, Seq(body)))
Seq(VC(vc, fd, VCKinds.Postcondition, this).setPos(post)) Seq(VC(vc, fd, VCKinds.Postcondition).setPos(post))
case _ => case _ =>
Nil Nil
} }
...@@ -34,7 +34,7 @@ class DefaultTactic(vctx: VerificationContext) extends Tactic(vctx) { ...@@ -34,7 +34,7 @@ class DefaultTactic(vctx: VerificationContext) extends Tactic(vctx) {
val pre2 = tfd.withParamSubst(args, pre) val pre2 = tfd.withParamSubst(args, pre)
val vc = implies(and(precOrTrue(fd), path), pre2) val vc = implies(and(precOrTrue(fd), path), pre2)
val fiS = sizeLimit(fi.asString, 40) val fiS = sizeLimit(fi.asString, 40)
VC(vc, fd, VCKinds.Info(VCKinds.Precondition, s"call $fiS"), this).setPos(fi) VC(vc, fd, VCKinds.Info(VCKinds.Precondition, s"call $fiS")).setPos(fi)
} }
case None => case None =>
...@@ -80,7 +80,7 @@ class DefaultTactic(vctx: VerificationContext) extends Tactic(vctx) { ...@@ -80,7 +80,7 @@ class DefaultTactic(vctx: VerificationContext) extends Tactic(vctx) {
case ((e, kind, correctnessCond), path) => case ((e, kind, correctnessCond), path) =>
val vc = implies(and(precOrTrue(fd), path), correctnessCond) val vc = implies(and(precOrTrue(fd), path), correctnessCond)
VC(vc, fd, kind, this).setPos(e) VC(vc, fd, kind).setPos(e)
} }
case None => case None =>
......
...@@ -44,7 +44,7 @@ class InductionTactic(vctx: VerificationContext) extends DefaultTactic(vctx) { ...@@ -44,7 +44,7 @@ class InductionTactic(vctx: VerificationContext) extends DefaultTactic(vctx) {
implies(andJoin(subCases), application(post, Seq(body))) implies(andJoin(subCases), application(post, Seq(body)))
) )
VC(vc, fd, VCKinds.Info(VCKinds.Postcondition, s"ind. on ${arg.asString} / ${cct.classDef.id.asString}"), this).setPos(fd) VC(vc, fd, VCKinds.Info(VCKinds.Postcondition, s"ind. on ${arg.asString} / ${cct.classDef.id.asString}")).setPos(fd)
} }
case (body, _, post) => case (body, _, post) =>
...@@ -84,7 +84,7 @@ class InductionTactic(vctx: VerificationContext) extends DefaultTactic(vctx) { ...@@ -84,7 +84,7 @@ class InductionTactic(vctx: VerificationContext) extends DefaultTactic(vctx) {
// Crop the call to display it properly // Crop the call to display it properly
val fiS = sizeLimit(fi.asString, 25) val fiS = sizeLimit(fi.asString, 25)
VC(vc, fd, VCKinds.Info(VCKinds.Precondition, s"call $fiS, ind. on (${arg.asString} : ${cct.classDef.id.asString})"), this).setPos(fi) VC(vc, fd, VCKinds.Info(VCKinds.Precondition, s"call $fiS, ind. on (${arg.asString} : ${cct.classDef.id.asString})")).setPos(fi)
} }
case (body, _) => case (body, _) =>
......
...@@ -11,7 +11,7 @@ import leon.utils.Positioned ...@@ -11,7 +11,7 @@ import leon.utils.Positioned
import leon.solvers._ import leon.solvers._
/** This is just to hold some history information. */ /** This is just to hold some history information. */
case class VC(condition: Expr, fd: FunDef, kind: VCKind, tactic: Tactic) extends Positioned { case class VC(condition: Expr, fd: FunDef, kind: VCKind) extends Positioned {
override def toString = { override def toString = {
fd.id.name +" - " +kind.toString fd.id.name +" - " +kind.toString
} }
......
...@@ -36,8 +36,7 @@ object FixReportLabels extends LeonPhase[VerificationReport, VerificationReport] ...@@ -36,8 +36,7 @@ object FixReportLabels extends LeonPhase[VerificationReport, VerificationReport]
val nvc = VC( val nvc = VC(
vc.condition, vc.condition,
fd, fd,
vcKind, vcKind
vc.tactic
).setPos(vc.getPos) ).setPos(vc.getPos)
nvc -> ovr nvc -> ovr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment