|
@@ -1,17 +1,29 @@
|
|
|
/* from the ACM TOSEM paper draft
|
|
|
- runs for scope 1 and 2, for scope 3 takes too long
|
|
|
+ runs for scope 1 and 2 (~16 sec),
|
|
|
+ for scope 3 it takes much longer.
|
|
|
+
|
|
|
+ The iteration limits <n..m> should be used to curb
|
|
|
+ traveling too far into the combinatorial ocean.
|
|
|
+
|
|
|
+ When ENSURE construct will be added to the Text_input
|
|
|
+ constraining the numbers of Get_char and Unget_char further,
|
|
|
+ the number of traces will drop significantly,
|
|
|
+ and hopefully will become affordable for scope 3.
|
|
|
+ Meanwhile, this example demonstrates that we should be
|
|
|
+ carefull with selecting limits for iterations,
|
|
|
+ to avoid going too far into combinatorial exploration without real need.
|
|
|
*/
|
|
|
|
|
|
SCHEMA lexer
|
|
|
|
|
|
-ROOT Text_Input: (* String_processing *);
|
|
|
- String_processing: Get_string (+ Unget_char +);
|
|
|
+ROOT Text_Input: (*<1..2> String_processing *);
|
|
|
+ String_processing: Get_string (+<1..2> Unget_char +);
|
|
|
Get_string: (+<2..3> Get_char +);
|
|
|
|
|
|
-ROOT Token_processing: (* Token_recognition *);
|
|
|
+ROOT Token_processing: (*<1..2> Token_recognition *);
|
|
|
Token_recognition: {+ RegExpr_Match +}
|
|
|
- (+ Unget_char +) Fire_rule;
|
|
|
- RegExpr_Match: (+ Get_char +);
|
|
|
+ (+<1..2> Unget_char +) Fire_rule;
|
|
|
+ RegExpr_Match: (+<2..3> Get_char +);
|
|
|
Fire_rule: [ Put_token ];
|
|
|
|
|
|
COORDINATE $t: Token_recognition FROM Token_processing,
|