16namespace layer1_foundations {
36 int argc, std::string *argv,
39 int f_v = (verbose_level >= 1);
44 cout <<
"function_polish_description::read_arguments" << endl;
46 for (i = 0; i < argc; i++) {
48 if (ST.
stringcmp(argv[i],
"-const") == 0) {
50 cout <<
"-const" << endl;
53 for (++i; i < argc; i++) {
54 if (ST.
stringcmp(argv[i],
"-const_end") == 0) {
65 str.assign(argv[i0 + 2 * h + 0]);
69 str.assign(argv[i0 + 2 * h + 1]);
79 cout <<
"cannot find -cost_end command" << endl;
83 else if (ST.
stringcmp(argv[i],
"-var") == 0) {
85 cout <<
"-var" << endl;
88 for (++i; i < argc; i++) {
89 if (ST.
stringcmp(argv[i],
"-var_end") == 0) {
101 str.assign(argv[i0 + h]);
107 cout <<
"read " <<
nb_variables <<
" variables" << endl;
111 cout <<
"cannot find -var_end command" << endl;
115 else if (ST.
stringcmp(argv[i],
"-code") == 0) {
117 cout <<
"-code" << endl;
120 for (++i; i < argc; i++) {
121 if (ST.
stringcmp(argv[i],
"-code_end") == 0) {
127 for (h = 0; h <
code_sz; h++) {
131 str.assign(argv[i0 + h]);
136 cout <<
"read " <<
code_sz <<
" code items" << endl;
137 for (h = 0; h <
code_sz; h++) {
138 cout << h <<
" : " <<
code[h] << endl;
143 cout <<
"cannot find -code_end command" << endl;
147 else if (ST.
stringcmp(argv[i],
"-function_end") == 0) {
149 cout <<
"-function_end" << endl;
154 cout <<
"function_polish_description::read_arguments "
155 "unrecognized option " << argv[i] << endl;
159 cout <<
"function_polish_description::read_arguments done" << endl;
166 cout <<
"-function_polish_description" << endl;
function_polish_description()
~function_polish_description()
std::vector< std::string > const_names
std::vector< std::string > variable_names
std::vector< std::string > code
int read_arguments(int argc, std::string *argv, int verbose_level)
std::vector< std::string > const_values
the orbiter library for the classification of combinatorial objects