@@ -18,6 +18,7 @@ enum class option {
18
18
cli_run_souffle, // generate souffle and run
19
19
cli_dump_souffle_file, // generate souffle and dump
20
20
21
+ /* information dump */
21
22
cli_help, // get help
22
23
cli_verbose, // verbose output information
23
24
cli_version, // get version
@@ -29,29 +30,45 @@ enum class option {
29
30
cli_dump_global, // get global symbol information
30
31
cli_dump_local, // get local variables' information
31
32
33
+ /* language server */
32
34
cli_dump_lsp, // get godel frontend json dump
33
35
cli_dump_lsp_file_indexed, // use indexed file name in json dump
36
+ cli_dump_lsp_only_schema, // only dump schema
34
37
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
40
41
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 */
41
47
cli_enable_for_opt, // switch for optimization on
42
48
cli_enable_let_opt, // switch let optimization on
43
49
cli_enable_ir_merge, // switch ir merge on
44
50
cli_enable_self_constraint_opt, // switch self constraint optimization on
51
+ cli_enable_join_reorder, // switch join reorder optimization on
45
52
cli_disable_remove_unused, // switch unused method deletion off
46
53
cli_disable_do_schema_opt, // switch do schema optimization off
47
54
cli_souffle_debug_dump, // switch souffle debug mode on
48
55
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
51
56
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 */
52
63
cli_souffle_json_output, // switch souffle json output on
53
64
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
55
72
};
56
73
57
74
struct info_setting {
@@ -94,12 +111,12 @@ const std::unordered_map<std::string, option> options = {
94
111
{" --dump-local" , option::cli_dump_local},
95
112
{" --dump-lsp" , option::cli_dump_lsp},
96
113
{" --lsp-dump-use-indexed-file" , option::cli_dump_lsp_file_indexed},
114
+ {" --lsp-dump-only-schema" , option::cli_dump_lsp_only_schema},
97
115
{" --color-off" , option::cli_color_off},
98
116
{" --lexer-dump-token" , option::cli_lexer_dump_token},
99
117
{" --lexer-dump-comment" , option::cli_lexer_dump_comment},
100
118
{" --semantic-only" , option::cli_semantic_only},
101
119
{" --semantic-pub-check" , option::cli_semantic_pub_check},
102
- {" --semantic-no-else" , option::cli_semantic_no_else},
103
120
{" --opt-for" , option::cli_enable_for_opt},
104
121
{" -Of" , option::cli_enable_for_opt},
105
122
{" --opt-let" , option::cli_enable_let_opt},
@@ -108,13 +125,29 @@ const std::unordered_map<std::string, option> options = {
108
125
{" -Oim" , option::cli_enable_ir_merge},
109
126
{" --opt-self-constraint" , option::cli_enable_self_constraint_opt},
110
127
{" -Osc" , option::cli_enable_self_constraint_opt},
128
+ {" --opt-join-reorder" , option::cli_enable_join_reorder},
129
+ {" -Ojr" , option::cli_enable_join_reorder},
111
130
{" --disable-remove-unused" , option::cli_disable_remove_unused},
112
131
{" --disable-do-schema-opt" , option::cli_disable_do_schema_opt},
113
132
{" --souffle-debug" , option::cli_souffle_debug_dump},
114
133
{" --souffle-slow-transformers" , option::cli_souffle_slow_transformers},
115
134
{" --enable-souffle-profiling" , option::cli_enable_souffle_profiling},
116
135
{" --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}}
118
151
};
119
152
120
153
typedef std::unordered_map<option, std::string> configure;
@@ -123,6 +156,7 @@ std::ostream& welcome(std::ostream&);
123
156
std::ostream& version (std::ostream&);
124
157
std::ostream& help (std::ostream&);
125
158
void report_invalid_argument (const std::string&);
159
+ void dump_configure (const configure&);
126
160
configure process_args (const std::vector<std::string>&);
127
161
128
162
}
0 commit comments