Skip to content

Commit

Permalink
szs comments include if relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Suda committed Sep 26, 2017
1 parent 77f2675 commit a2b36e7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CASC/CASCMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ bool CASCMode::runSlice(Options& opt)
return false;
}






/**
* Do the theorem proving in a forked-off process
*/
Expand Down
17 changes: 5 additions & 12 deletions CASC/PortfolioMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,6 @@ static unsigned milliToDeci(unsigned timeInMiliseconds) {
return timeInMiliseconds/100;
}

static ostream& lineOutput()
{
CALL("PortfolioMode static lineOutput");
addCommentSignForSZS(env.out());
return env.out() << "(" << getpid() << ',' << (env.timer->elapsedMilliseconds()/100)/10.0 << ") ";
}

/**
* Run a schedule.
* Return true if a proof was found, otherwise return false.
Expand Down Expand Up @@ -238,8 +231,8 @@ bool PortfolioMode::runSchedule(Schedule& schedule, int terminationTime)

/*
env.beginOutput();
lineOutput() << "Slices left: " << slices << endl;
lineOutput() << "Processes available: " << processesLeft << endl;
addCommentSignForSZS(env.out()) << "Slices left: " << slices << endl;
addCommentSignForSZS(env.out()) << "Processes available: " << processesLeft << endl;
env.endOutput();
*/

Expand Down Expand Up @@ -287,7 +280,7 @@ bool PortfolioMode::runSchedule(Schedule& schedule, int terminationTime)

if (outputAllowed()) {
env.beginOutput();
lineOutput() << "spawned child "<< childId << " with time: " << sliceTime << " (total remaining time " << remainingTime << ")" << endl;
addCommentSignForSZS(env.out()) << "spawned child "<< childId << " with time: " << sliceTime << " (total remaining time " << remainingTime << ")" << endl;
env.endOutput();
}

Expand Down Expand Up @@ -421,7 +414,7 @@ void PortfolioMode::runSlice(Options& strategyOpt)

if (outputAllowed()) {
env.beginOutput();
lineOutput() << opt.testId() << " on " << opt.problemName() << endl;
addCommentSignForSZS(env.out()) << opt.testId() << " on " << opt.problemName() << endl;
env.endOutput();
}

Expand Down Expand Up @@ -462,7 +455,7 @@ void PortfolioMode::runSlice(Options& strategyOpt)
/*
if (!resultValue) {
env.beginOutput();
lineOutput() << " found a proof after proof output" << endl;
addCommentSignForSZS(env.out()) << " found a proof after proof output" << endl;
env.endOutput();
}
*/
Expand Down
6 changes: 5 additions & 1 deletion Shell/UIHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,15 @@ bool szsOutputMode() {
return (Lib::env.options && Lib::env.options->outputMode() == Shell::Options::Output::SZS);
}

void addCommentSignForSZS(ostream& out)
ostream& addCommentSignForSZS(ostream& out)
{
if (szsOutputMode()) {
out << "% ";
if (Lib::env.options && Lib::env.options->multicore() != 1) {
out << "(" << getpid() << ")";
}
}
return out;
}

bool UIHelper::s_haveConjecture=false;
Expand Down
2 changes: 1 addition & 1 deletion Shell/UIHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ using namespace Lib;
using namespace Kernel;

bool szsOutputMode();
void addCommentSignForSZS(ostream&);
ostream& addCommentSignForSZS(ostream&);
void reportSpiderFail();
void reportSpiderStatus(char status);
bool outputAllowed(bool debug=false);
Expand Down

0 comments on commit a2b36e7

Please sign in to comment.