Skip to content

Commit

Permalink
[fix] Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
misonijnik committed Nov 22, 2022
1 parent 8ed9e49 commit d8a07ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/Core/Executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,9 @@ Executor::Executor(LLVMContext &ctx, const InterpreterOptions &opts,


time::Span maxTime{MaxTime};
klee_message("Initialization overhead: %ds", opts.InitializationOverhead);
maxTime -= time::seconds(opts.InitializationOverhead);
if (opts.InitializationOverhead != 0) {
maxTime -= time::seconds(opts.InitializationOverhead);
}
if (maxTime)
timers.add(std::make_unique<Timer>(maxTime, [&] {
klee_message("HaltTimer invoked");
Expand Down Expand Up @@ -4070,12 +4071,14 @@ void Executor::run(std::vector<ExecutionState *> initialStates) {
haltExecution = true;
}

bool canReachNew1 = decreaseConfidenceFromStoppedStates(pausedStates);
bool canReachNew2 = decreaseConfidenceFromStoppedStates(states);
if (guidanceKind == GuidanceKind::ErrorGuidance) {
bool canReachNew1 = decreaseConfidenceFromStoppedStates(pausedStates);
bool canReachNew2 = decreaseConfidenceFromStoppedStates(states);

for (auto &startBlockAndWhiteList : targets) {
targetedExecutionManager.reportFalsePositives(startBlockAndWhiteList.second,
canReachNew1 || canReachNew2);
for (auto &startBlockAndWhiteList : targets) {
targetedExecutionManager.reportFalsePositives(startBlockAndWhiteList.second,
canReachNew1 || canReachNew2);
}
}

delete searcher;
Expand Down
4 changes: 4 additions & 0 deletions lib/Runner/run_klee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2095,6 +2095,10 @@ int run_klee(int argc, char **argv, char **envp) {
Interpreter::InterpreterOptions IOpts;
IOpts.MakeConcreteSymbolic = MakeConcreteSymbolic;
IOpts.InitializationOverhead = (lastTime - startTime).toSeconds();
klee_message("Initialization overhead: %ds", IOpts.InitializationOverhead);
if (ExecutionMode != Interpreter::GuidanceKind::ErrorGuidance) {
IOpts.InitializationOverhead = 0;
}
std::unique_ptr<KleeHandler> handler =
std::make_unique<KleeHandler>(pArgc, pArgv);
std::unique_ptr<Interpreter> interpreter(
Expand Down

0 comments on commit d8a07ff

Please sign in to comment.