Skip to content
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

Problems should live long enough to experience proof printing #466

Merged
merged 1 commit into from
Jul 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions vampire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,13 @@ void getRandomStrategy()
env.options->checkProblemOptionConstraints(prb->getProperty(), /*before_preprocessing = */ false);
}

void doProving()
VWARN_UNUSED
Problem *doProving()
{
// One call to randomize before preprocessing (see Options)
env.options->randomizeStrategy(0);

ScopedPtr<Problem> prb(getPreprocessedProblem());
Problem *prb = getPreprocessedProblem();

// Then again when the property is here (this will only randomize non-default things if an option is set to do so)
env.options->randomizeStrategy(prb->getProperty());
Expand All @@ -199,6 +200,7 @@ void doProving()
}

ProvingHelper::runVampireSaturation(*prb, *env.options);
return prb;
}

/**
Expand Down Expand Up @@ -442,7 +444,7 @@ void vampireMode()
env.options->setUnusedPredicateDefinitionRemoval(false);
}

doProving();
ScopedPtr<Problem> prb(doProving());

env.beginOutput();
UIHelper::outputResult(env.out());
Expand Down Expand Up @@ -470,8 +472,9 @@ void spiderMode()
#endif

bool exceptionRaised = false;
ScopedPtr<Problem> prb;
try {
doProving();
prb = doProving();
} catch (Exception& e) {
exception = &e;
exceptionRaised = true;
Expand Down