You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -234,4 +234,23 @@ Seagull has a set of pre-defined template code for each language constructs in S
234
234
At compile time, SGL will populate these templates with information from the input specification to generate fully executable source code.
235
235
236
236
As of now, we only aim to generate test case generators in Java.
237
-
More target languages might be supported in the future.
237
+
More target languages might be supported in the future.
238
+
239
+
### Configuration File
240
+
Aside from the grammar file(s), Seagull also need a configuration file to work.
241
+
242
+
One assumption we have in the design of SGL is that we can rely on the target DBMS for symbol tables.
243
+
(Side note: it's not exactly that we have to do this, in-memory symbol tables implemented using SGL global variables can be achieved and is actually faster considering the IO overhead.
244
+
However, doing that will make the grammar file much more complicated since you have to explicitly book-keep everything.
245
+
Tester's discretion.)
246
+
To this end, have to send each statement to the DBMS for execution right after it is generated so that the symbols are actually there when we later query for it.
247
+
248
+
This has two implications: test case generators generated by SGL needs a way to talk to the target DBMS, and we can't just have a single start symbol as in "textbook" context-free grammars. Both of these are addressed using this configuration file.
249
+
250
+
The configuration file can optionally contain a JDBC connection string for the generator to establish a connection to the target DBMS.
251
+
This can also be passed in as a parameter when instantiating the fuzzer instead.
252
+
253
+
The configuration file must contain a series of "stages" that describe the sequence of rules to be generated.
254
+
For example, a test case must begin with a `CREATE DATABASE` stage, followed by some `CREATE TABLE`s, etc.
255
+
256
+
An example of the configuration file can be found at TODO.
0 commit comments