-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update traceInduct and clustering #1052
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a quick look and it looks good to me! Should you maybe add positions to the functions/lemmas you're adding?
case Precondition(cond) => Precondition(exprOps.replaceFromSymbols(specsMap, cond)).setPos(spec) | ||
case LetInSpec(vd, expr) => LetInSpec(vd, exprOps.replaceFromSymbols(specsMap, expr)).setPos(spec) | ||
case Measure(measure) => Measure(exprOps.replaceFromSymbols(specsMap, measure)).setPos(spec) | ||
case s => s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a crash in this last case to make sure we modify that if we ever add new specs.
} | ||
|
||
} | ||
private def shouldBeChecked(fid: Identifier): Boolean = pathsOpt match { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you refactor this to use the already existing shouldBeChecked
?
report = Report(reports) | ||
rerunPipeline = Trace.nextIteration(report) | ||
if (!rerunPipeline) Trace.printEverything | ||
//else report.emit(context) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra comment
@@ -166,6 +168,11 @@ trait MainHelpers extends inox.MainHelpers { self => | |||
|
|||
import ctx.{ reporter, timers } | |||
|
|||
if (extraction.trace.Trace.optionsError) { | |||
reporter.error(s"Equivalence checking for --comparefuns and --models only works in batched mode.") | |||
System.exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use reporter.fatalError()
to crash instead of reporter.error()
followed by System.exit(1)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes! I think you can remove System.exit(1)
when you use fatalError
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops I forgot to remove it, thanks!
bbf73eb
to
2e03319
Compare
stainless/frontends/scalac/src/it/scala/stainless/Utils.scala Lines 12 to 20 in a0a3ff8
Is there a problem of initialisation for the trace induct phase? |
2cab6b1
to
4a99dae
Compare
@jad-hamza not sure what was it with |
I hope the example that failed in For |
Makes sense, let's see if it's ok now |
Very good, thanks! |
Reimplements #931 using
.holds
instead ofensuring
, and using the newBodyWithSpecs
API