Skip to content

Commit 0427be8

Browse files
committed
Better version printing
1 parent b4d1e02 commit 0427be8

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

src/GitSHA1.cpp.in

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ const char* CMSat::get_compilation_env()
5858
"BREAKID_LIBRARIES = @BREAKID_LIBRARIES@ | "
5959
"BREAKID-VER = @BREAKID_VERSION_MAJOR@.@BREAKID_VERSION_MINOR@ | "
6060
"BOSPHORUS_LIBRARIES = @BOSPHORUS_LIBRARIES@ | "
61-
"BOSPH-VER = @BOSPHORUS_VERSION_MAJOR@.@BOSPHORUS_VERSION_MINOR@ | "
62-
""
61+
"BOSPH-VER = @BOSPHORUS_VERSION_MAJOR@.@BOSPHORUS_VERSION_MINOR@"
6362
;
6463
return compilation_env;
6564
}

src/cryptominisat.cpp

+2-13
Original file line numberDiff line numberDiff line change
@@ -1077,12 +1077,9 @@ DLL_PUBLIC const char* SATSolver::get_compilation_env()
10771077
return Solver::get_compilation_env();
10781078
}
10791079

1080-
DLL_PUBLIC std::string SATSolver::get_text_version_info(const char* prefix)
1080+
DLL_PUBLIC std::string SATSolver::get_thanks_info(const char* prefix)
10811081
{
10821082
std::stringstream ss;
1083-
ss << prefix << "CryptoMiniSat version " << get_version() << endl;
1084-
ss << prefix << "CMS Copyright (C) 2009-2020 Authors of CryptoMiniSat, see AUTHORS file" << endl;
1085-
ss << prefix << "CMS SHA revision " << get_version_sha1() << endl;
10861083
ss << prefix << "Using VMTF and picosat code by Armin Biere from CaDiCaL" << endl;
10871084
ss << prefix << "Using WalkSAT by Henry Kautz, see Kautz and Selman Pushing the envelope: planning, propositional logic, and stochastic search, AAAI'96," << endl;
10881085
#ifdef USE_BREAKID
@@ -1092,20 +1089,12 @@ DLL_PUBLIC std::string SATSolver::get_text_version_info(const char* prefix)
10921089
#else
10931090
ss << prefix << "CMS is MIT licensed" << endl;
10941091
#endif
1095-
10961092
ss << prefix << "Using code from 'When Boolean Satisfiability Meets Gauss-E. in a Simplex Way'" << endl;
10971093
ss << prefix << " by C.-S. Han and J.-H. Roland Jiang in CAV 2012. Fixes by M. Soos" << endl;
10981094
ss << prefix << "Using CCAnr from 'CCAnr: A Conf. Checking Based Local Search Solver [...]'" << endl;
10991095
ss << prefix << " by Shaowei Cai, Chuan Luo, and Kaile Su, SAT 2015" << endl;
11001096
ss << prefix << "Using Oracle code from 'Integrating Tree Decompositions [...]'" << endl;
1101-
ss << prefix << " by Tuukka Korhonen and Matti Jarvisalo, CP 2021" << endl;
1102-
ss << prefix << "CMS compilation env " << get_compilation_env() << endl;
1103-
#ifdef __GNUC__
1104-
ss << prefix << "CMS compiled with gcc version " << __VERSION__ << endl;
1105-
#else
1106-
ss << prefix << "CMS compiled with non-gcc compiler" << endl;
1107-
#endif
1108-
1097+
ss << prefix << " by Tuukka Korhonen and Matti Jarvisalo, CP 2021";
11091098
return ss.str();
11101099
}
11111100

src/cryptominisat.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ namespace CMSat {
192192
static const char* get_version(); //get solver version in string format
193193
static const char* get_version_sha1(); //get SHA1 version string of the solver
194194
static const char* get_compilation_env(); //get compilation environment string
195-
static std::string get_text_version_info(const char* prefix = "c "); //get printable version and copyright text
195+
static std::string get_thanks_info(const char* prefix = "c "); //get printable version and copyright text
196196

197197

198198
////////////////////////////

src/main.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,10 @@ void Main::ban_found_solution() {
13601360

13611361
void Main::printVersionInfo()
13621362
{
1363-
cout << solver->get_text_version_info();
1363+
cout << "c " << "CMS SHA revision " << solver->get_version_sha1() << endl;
1364+
cout << "c " << "CryptoMiniSat version " << solver->get_version() << endl;
1365+
cout << "c " << "CMS compilation env " << solver->get_compilation_env();
1366+
cout << "c " << solver->get_thanks_info("c ") << endl;
13641367
}
13651368

13661369
int Main::correctReturnValue(const lbool ret) const

0 commit comments

Comments
 (0)