-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgcrsim.cfg
63 lines (48 loc) · 2.06 KB
/
gcrsim.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# This file contains parameters for gcrsim
# It uses a Perl format and it is included and evaluated
# by the main program.
# It contains parameters allowing to tune the simulation
# Tells to use or not the history of seen strings. If turned on,
# strings that were already considered are further ignored.
# There is no reason to turn it off, except for memory consumption reasons.
$history = 1;
# Print the details of rules' application for each step
$show_detailed_application = 0;
# Next two parameters define strings that are not printed to the
# output. However, these strings are considered by the simulator.
# Do not print strings longer than the below size.
$print_len = 16;
# Do not print strings that match the below regular expression
$print_skip = "\@"; # no skip
#$print_skip = "([a-z]).*\\1"; # skip printing strings with same letter repeated
# Next three parameters define strings that are removed from the next configuration.
# Ignore strings longer than the below size.
$add_skip_len = 16;
# Skip strings that match the below regular expression
$add_skip = "\@"; # no skip
# $add_skip = "(D.*){2}"; # Skip strings having D? repeated two times
# Next function permits to have a fine-tuning on the strings
# that have to be in the next configuration. It is called on every
# string and if the result is 0, then this string is eliminated.
# Arguments : string, component
# Below is the default behavior.
#sub filter_next($$){
# return 1;
#}
# A more complete example below. Please rename the function
# to filter_next in order to activate it.
sub filter_next2($$){
my ($s, $c) = @_;
# incrementing the component, as by default it starts from 0
$c++;
# If the string match RE below, they are ignored
return 0 if /(p.).*\1.*\1/;
return 0 if /(f.).*\1.*\1/;
return 0 if /p\d\d/;
return 0 if /f\d\d/;
# it is possible to add messages, e.g., when the string
# is terminal or has the needed form.
# The below example outputs the string if it is in component 1 and matches the corresponding RE
print "Terminal?: $s\n" if /^[\$ABY]+$/ and $c==1;
return 1;
}