Skip to content
Snippets Groups Projects
Commit ee982702 authored by Manos Koukoutos's avatar Manos Koukoutos
Browse files

Be defensive with bodyless FunDefs

parent e0bb8a46
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,9 @@ abstract class SMTLIBCVC4QuantifiedSolver(context: LeonContext, program: Program
val s = super.declareFunction(tfd)
try {
val bodyAssert = SMTAssert(Equals(s: Term, toSMT(tfd.body.get)(Map())))
val bodyAssert = tfd.body map { bd =>
SMTAssert(Equals(s: Term, toSMT(bd)(Map())))
}
val specAssert = tfd.postcondition map { post =>
val term = implies(
......@@ -50,7 +52,7 @@ abstract class SMTLIBCVC4QuantifiedSolver(context: LeonContext, program: Program
SMTAssert(toSMT(term)(Map()))
}
Seq(bodyAssert) ++ specAssert
bodyAssert ++ specAssert
} catch {
case _ : SolverUnsupportedError =>
addError()
......
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