@@ -15,7 +15,7 @@ Module Name:
1515
1616Notes:
1717
18- - regex
18+ Regex
1919 Assume regexes are ground and for zstring.
2020 to repair:
2121 x in R
@@ -28,11 +28,29 @@ Module Name:
2828 - sample extension of x that is not in R
2929 - sample prefix of x in R, with extension not in R
3030
31- - sequences
32-
33- - use length constraints as tabu for updates.
34-
35- - alternate to lookahead strategy:
31+ next_tokens(R) = { a | exists s: as in R }
32+ delta(a, R) = derivative of R with respect to a.
33+ delta(s, R) = delta(s[n-1], delta(s[0..n-2], R))
34+ nullable(R) = epsilon in R
35+ empty(R) = R is empty
36+
37+ samples(x, R):
38+ yield choose(R)
39+ for i in 0..|x|-1 & delta(x[0..i], R) != empty:
40+ yield x[0..i]choose(delta(x[0..i], R))
41+
42+ choose(R):
43+ if nullable(R):
44+ return epsilon
45+ T = next_tokens(R)
46+ a = choose(T) use a bias on characters that make progress (skip *).
47+ return choose(delta(a, R))
48+
49+ Sequences
50+
51+ Use length constraints as tabu for updates.
52+
53+ Alternate to lookahead strategy:
3654 Lookahead repair based of changing leaves:
3755 With each predicate, track the leaves of non-value arguments.
3856 Suppose x is a leaf string used in a violated predicate.
@@ -51,6 +69,9 @@ Module Name:
5169 - label each eval subterm by a timestamp that gets set.
5270 - strval0 evaluates to strval1 if timestamp matches global timestamp.
5371
72+ Revert bias on long strings:
73+ - give preference to reset leaves that are assigned to long strings
74+ - bake in bias for shorter strings into equation solving?
5475--*/
5576
5677#include " ast/sls/sls_seq_plugin.h"
0 commit comments