2222
2323int main (int argc, char ** argv)
2424{
25- auto program = argparse::ArgumentParser (" AStar search. " );
26- program.add_argument (" -D " , " -- domain-filepath " ).required ().help (" The path to the PDDL domain file." );
27- program.add_argument (" -P " , " -- problem-filepath " ).default_value (" " ).help (" The path to the PDDL problem file." );
28- program.add_argument (" -OD" , " --out-domain-filepath " ).default_value (" " ).help (" The path to the output PDDL domain file." );
29- program.add_argument (" -OP" , " --out-problem-filepath " ).default_value (" " ).help (" The path to the output PDDL problem file." );
25+ auto program = argparse::ArgumentParser (" loki " );
26+ program.add_argument (" domain" ).required ().help (" The path to the PDDL domain file." );
27+ program.add_argument (" problem" ).default_value (" " ).help (" The path to the PDDL problem file." );
28+ program.add_argument (" -OD" , " --out-domain" ).default_value (" " ).help (" The path to the output PDDL domain file." );
29+ program.add_argument (" -OP" , " --out-problem" ).default_value (" " ).help (" The path to the output PDDL problem file." );
3030 program.add_argument (" -S" , " --strict" ).default_value (false ).implicit_value (true ).help (" Enable strict parsing mode." );
31- program.add_argument (" -Q" , " --quiet" ).default_value (true ).implicit_value (false ).help (" Disable quiet mode." );
32- /* TODO(Dominik): add translator options */
33- program.add_argument (" -T" , " --remove-typing" ).default_value (false ).implicit_value (true ).help (" Enable removal of typing." );
31+ program.add_argument (" -V" , " --verbose" ).default_value (false ).implicit_value (true ).help (" Verbose prints." );
32+ program.add_argument (" --remove-typing" ).default_value (false ).implicit_value (true ).help (" Enable removal of typing." );
3433
3534 try
3635 {
@@ -43,13 +42,13 @@ int main(int argc, char** argv)
4342 std::exit (1 );
4443 }
4544
46- auto domain_filepath = program.get <std::string>(" -- domain-filepath " );
47- auto problem_filepath = program.get <std::string>(" -- problem-filepath " );
48- auto out_domain_filepath = program.get <std::string>(" --out-domain-filepath " );
49- auto out_problem_filepath = program.get <std::string>(" --out-problem-filepath " );
45+ auto domain_filepath = program.get <std::string>(" domain" );
46+ auto problem_filepath = program.get <std::string>(" problem" );
47+ auto out_domain_filepath = program.get <std::string>(" --out-domain" );
48+ auto out_problem_filepath = program.get <std::string>(" --out-problem" );
5049
5150 auto parser_options = loki::ParserOptions ();
52- parser_options.quiet = program.get <bool >(" --quiet " );
51+ parser_options.verbose = program.get <bool >(" --verbose " );
5352 parser_options.strict = program.get <bool >(" --strict" );
5453
5554 auto translator_options = loki::TranslatorOptions ();
@@ -59,7 +58,8 @@ int main(int argc, char** argv)
5958 const auto domain = parser.get_domain ();
6059
6160 const auto domain_translation_result = loki::translate (domain, translator_options);
62- std::cout << *domain_translation_result.get_translated_domain () << std::endl;
61+ if (parser_options.verbose )
62+ std::cout << *domain_translation_result.get_translated_domain () << std::endl;
6363
6464 if (!out_domain_filepath.empty ())
6565 {
@@ -73,7 +73,8 @@ int main(int argc, char** argv)
7373 auto problem = parser.parse_problem (problem_filepath, parser_options);
7474
7575 const auto translated_problem = loki::translate (problem, domain_translation_result, translator_options);
76- std::cout << *translated_problem << std::endl;
76+ if (parser_options.verbose )
77+ std::cout << *translated_problem << std::endl;
7778
7879 if (!out_problem_filepath.empty ())
7980 {
0 commit comments