Skip to content
Snippets Groups Projects
Commit 134279e6 authored by Ali Sinan Köksal's avatar Ali Sinan Köksal
Browse files

Separate VCs for each case class in induction tactic.

parent f29384cf
No related branches found
No related tags found
No related merge requests found
...@@ -74,12 +74,12 @@ class InductionTactic(reporter: Reporter) extends DefaultTactic(reporter) { ...@@ -74,12 +74,12 @@ class InductionTactic(reporter: Reporter) extends DefaultTactic(reporter) {
}) })
Implies(And(inductiveHypothesis), withPrec) Implies(And(inductiveHypothesis), withPrec)
} }
Implies(CaseClassInstanceOf(ccd, argAsVar), conditionForChild) new VerificationCondition(Implies(CaseClassInstanceOf(ccd, argAsVar), conditionForChild), funDef, VCKind.Postcondition, this)
case _ => error("Abstract class has non-case class subtype.") case _ => error("Abstract class has non-case class subtype.")
})) }))
println("Induction tactic yields the following vc:") println("Induction tactic yields the following VCs:")
println(And(conditionsForEachChild)) println(conditionsForEachChild.map(vc => vc.condition).mkString("\n"))
Seq(new VerificationCondition(And(conditionsForEachChild), funDef, VCKind.Postcondition, this)) conditionsForEachChild
} }
case None => case None =>
reporter.warning("Induction tactic currently supports exactly one argument of abstract class type") reporter.warning("Induction tactic currently supports exactly one argument of abstract class type")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment