@@ -18,6 +18,7 @@ enum class option {
1818 cli_run_souffle, // generate souffle and run
1919 cli_dump_souffle_file, // generate souffle and dump
2020
21+ /* information dump */
2122 cli_help, // get help
2223 cli_verbose, // verbose output information
2324 cli_version, // get version
@@ -29,29 +30,45 @@ enum class option {
2930 cli_dump_global, // get global symbol information
3031 cli_dump_local, // get local variables' information
3132
33+ /* language server */
3234 cli_dump_lsp, // get godel frontend json dump
3335 cli_dump_lsp_file_indexed, // use indexed file name in json dump
36+ cli_dump_lsp_only_schema, // only dump schema
3437
35- cli_lexer_dump_token, // dump tokens
36- cli_lexer_dump_comment, // dump comments
37- cli_semantic_only, // only do semantic analysis and exit
38- cli_semantic_pub_check, // switch pub-access check on
39- cli_semantic_no_else, // switch no-else check on
38+ /* lexer */
39+ cli_lexer_dump_token, // dump tokens
40+ cli_lexer_dump_comment, // dump comments
4041
42+ /* semantic analysis */
43+ cli_semantic_only, // only do semantic analysis and exit
44+ cli_semantic_pub_check, // switch pub-access check on
45+
46+ /* optimization */
4147 cli_enable_for_opt, // switch for optimization on
4248 cli_enable_let_opt, // switch let optimization on
4349 cli_enable_ir_merge, // switch ir merge on
4450 cli_enable_self_constraint_opt, // switch self constraint optimization on
51+ cli_enable_join_reorder, // switch join reorder optimization on
4552 cli_disable_remove_unused, // switch unused method deletion off
4653 cli_disable_do_schema_opt, // switch do schema optimization off
4754 cli_souffle_debug_dump, // switch souffle debug mode on
4855 cli_souffle_slow_transformers, // switch souffle slow transformers on
49- cli_enable_souffle_cache, // switch souffle cache on
50- cli_clean_souffle_cache, // switch clean souffle cache on
5156 cli_enable_souffle_profiling, // switch souffle profiling on
57+
58+ /* souffle cache */
59+ cli_enable_souffle_cache, // switch souffle cache on
60+ cli_clean_souffle_cache, // switch clean souffle cache on
61+
62+ /* souffle output redirection */
5263 cli_souffle_json_output, // switch souffle json output on
5364 cli_souffle_csv_output, // switch souffle csv output on
54- cli_souffle_sqlite_output // switch souffle sqlite output on
65+ cli_souffle_sqlite_output, // switch souffle sqlite output on
66+
67+ /* directly run souffle */
68+ cli_directly_run_souffle, // run souffle directly
69+
70+ /* special debug info */
71+ cli_show_real_cmd_args
5572};
5673
5774struct info_setting {
@@ -94,12 +111,12 @@ const std::unordered_map<std::string, option> options = {
94111 {" --dump-local" , option::cli_dump_local},
95112 {" --dump-lsp" , option::cli_dump_lsp},
96113 {" --lsp-dump-use-indexed-file" , option::cli_dump_lsp_file_indexed},
114+ {" --lsp-dump-only-schema" , option::cli_dump_lsp_only_schema},
97115 {" --color-off" , option::cli_color_off},
98116 {" --lexer-dump-token" , option::cli_lexer_dump_token},
99117 {" --lexer-dump-comment" , option::cli_lexer_dump_comment},
100118 {" --semantic-only" , option::cli_semantic_only},
101119 {" --semantic-pub-check" , option::cli_semantic_pub_check},
102- {" --semantic-no-else" , option::cli_semantic_no_else},
103120 {" --opt-for" , option::cli_enable_for_opt},
104121 {" -Of" , option::cli_enable_for_opt},
105122 {" --opt-let" , option::cli_enable_let_opt},
@@ -108,13 +125,29 @@ const std::unordered_map<std::string, option> options = {
108125 {" -Oim" , option::cli_enable_ir_merge},
109126 {" --opt-self-constraint" , option::cli_enable_self_constraint_opt},
110127 {" -Osc" , option::cli_enable_self_constraint_opt},
128+ {" --opt-join-reorder" , option::cli_enable_join_reorder},
129+ {" -Ojr" , option::cli_enable_join_reorder},
111130 {" --disable-remove-unused" , option::cli_disable_remove_unused},
112131 {" --disable-do-schema-opt" , option::cli_disable_do_schema_opt},
113132 {" --souffle-debug" , option::cli_souffle_debug_dump},
114133 {" --souffle-slow-transformers" , option::cli_souffle_slow_transformers},
115134 {" --enable-souffle-profiling" , option::cli_enable_souffle_profiling},
116135 {" --enable-souffle-cache" , option::cli_enable_souffle_cache},
117- {" --clean-souffle-cache" , option::cli_clean_souffle_cache}
136+ {" --clean-souffle-cache" , option::cli_clean_souffle_cache},
137+ {" -Drs" , option::cli_directly_run_souffle},
138+ {" --directly-run-souffle" , option::cli_directly_run_souffle},
139+ {" -###" , option::cli_show_real_cmd_args}
140+ };
141+
142+ const std::unordered_map<std::string, std::vector<option>> multi_options = {
143+ {" -O1" , {option::cli_enable_for_opt}},
144+ {" -O2" , {option::cli_enable_for_opt,
145+ option::cli_enable_self_constraint_opt,
146+ option::cli_enable_ir_merge}},
147+ {" -O3" , {option::cli_enable_for_opt,
148+ option::cli_enable_self_constraint_opt,
149+ option::cli_enable_ir_merge,
150+ option::cli_enable_join_reorder}}
118151};
119152
120153typedef std::unordered_map<option, std::string> configure;
@@ -123,6 +156,7 @@ std::ostream& welcome(std::ostream&);
123156std::ostream& version (std::ostream&);
124157std::ostream& help (std::ostream&);
125158void report_invalid_argument (const std::string&);
159+ void dump_configure (const configure&);
126160configure process_args (const std::vector<std::string>&);
127161
128162}
0 commit comments