Skip to content

Commit 72227a9

Browse files
committed
handle crashes inside TraceCheck s.t. refinement engine can suppress them
1 parent e44f250 commit 72227a9

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

trunk/source/Library-TraceCheckerUtils/src/de/uni_freiburg/informatik/ultimate/lib/tracecheckerutils/singletracecheck/TraceCheck.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ public class TraceCheck<LETTER extends IAction> implements ITraceCheck {
138138
protected NestedSsaBuilder mNsb;
139139
protected final TraceCheckStatisticsGenerator mTraceCheckBenchmarkGenerator;
140140
protected final AssertCodeBlockOrder mAssertCodeBlocksIncrementally;
141-
protected ToolchainCanceledException mToolchainCanceledException;
142141
protected final IIcfgSymbolTable mBoogie2SmtSymbolTable;
143142
protected final FeasibilityCheckResult mFeasibilityResult;
144143

@@ -243,8 +242,16 @@ protected TraceCheck(final IPredicate precondition, final IPredicate postconditi
243242
}
244243
}
245244
}
246-
} catch (final ToolchainCanceledException tce) {
247-
mToolchainCanceledException = tce;
245+
} catch (final ToolchainCanceledException e) {
246+
feasibilityResult = new FeasibilityCheckResult(LBool.UNKNOWN,
247+
new TraceCheckReasonUnknown(Reason.ULTIMATE_TIMEOUT, e, ExceptionHandlingCategory.KNOWN_THROW),
248+
false);
249+
} catch (final SMTLIBException e) {
250+
feasibilityResult =
251+
new FeasibilityCheckResult(LBool.UNKNOWN, TraceCheckReasonUnknown.constructReasonUnknown(e), true);
252+
} catch (final Exception e) {
253+
feasibilityResult = new FeasibilityCheckResult(LBool.UNKNOWN,
254+
new TraceCheckReasonUnknown(Reason.SOLVER_CRASH_OTHER, e, ExceptionHandlingCategory.UNKNOWN), true);
248255
} finally {
249256
mFeasibilityResult = feasibilityResult;
250257
mProvidesIcfgProgramExecution = providesIcfgProgramExecution;
@@ -448,7 +455,7 @@ public IcfgProgramExecution getRcfgProgramExecution() {
448455

449456
@Override
450457
public TraceCheckStatisticsGenerator getStatistics() {
451-
if (mTraceCheckFinished || mToolchainCanceledException != null) {
458+
if (mTraceCheckFinished) {
452459
return mTraceCheckBenchmarkGenerator;
453460
}
454461
return null;

trunk/source/Library-TraceCheckerUtils/src/de/uni_freiburg/informatik/ultimate/lib/tracecheckerutils/singletracecheck/TraceCheckSpWp.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,17 @@ public TraceCheckSpWp(final IPredicate precondition, final IPredicate postcondit
159159
}
160160
final LBool result = isCorrect();
161161
if (result == LBool.UNSAT) {
162-
computeInterpolants(new AllIntegers(), interpolation);
163-
mInterpolantComputationStatus = new InterpolantComputationStatus();
162+
InterpolantComputationStatus actualInterpolationComputationStatus = null;
163+
try {
164+
computeInterpolants(new AllIntegers(), interpolation);
165+
actualInterpolationComputationStatus = new InterpolantComputationStatus();
166+
} catch (final ToolchainCanceledException ex) {
167+
throw ex;
168+
} catch (final Throwable ex) {
169+
actualInterpolationComputationStatus =
170+
new InterpolantComputationStatus(ItpErrorStatus.SMT_SOLVER_CRASH, ex);
171+
}
172+
mInterpolantComputationStatus = actualInterpolationComputationStatus;
164173
} else if (result == LBool.SAT) {
165174
mInterpolantComputationStatus = new InterpolantComputationStatus(ItpErrorStatus.TRACE_FEASIBLE, null);
166175
} else {

0 commit comments

Comments
 (0)