Commit e7bd548
authored
Memoization in Lex, in particular for the computation of find longest match (#149)
* new implementation of find longest match, ready for memoization, with memoization. TODO: add a lex version that uses this one
* fix verification
* fix verification and FIX REGEX SPEC which didn't use itself recursively properly
* new maxPrefix and lex using v2
* fix compilation
* move import out of specific to verification
* fix benhcmark commented out imports
* fix bugs in the implementation, mainly calling old version of functions in recursive call positions
* update, try to verify on the CI
* fix 2 verif issues
* fix verif
* update
* new versions with memoization only for derivatives for V2
* new hashing function + random json to test + profiling script example
* add a and a*b lexer
* less threads
* implement and prove equivalent a tailrec version of longest match that will be memoized, called findLongestMatchZipperSequenceV3
* greater timeout
* bigger heap
* bigger heap
* new tailrec version of find longest match with memoization, implemented up to the lexMem interface
* changes to new caches for lexMem
* remove useless import
* use res instead of head.res which is ghost
* allow to pass initial cache sizes
* add heuristic memoizing only 1/10 if the input is larger than 1MB
* use 512 as array length in the balance conc
* new benchmark for a a*b
* better script for profiling
* parameterize the cache tradefoff (threshold and fraction k)
* catch up on benchmark branch
* catch up benhcmark branch
* ds store
* catch up on benchmark branch
* format
* remove weird workaround of lazy val
* remove commented out code
* benhcmark results and analysis from benchmark branch
* remove smt files
* from benchmarks
* bring all as ressource to this branch
* change constants for caching to be computed within the cache class
* add greater than 0 condition for cache rate
* benchmark data to match the other branch
* update benchmarks
* newline
* res files
* data
* new readme
* remove raw data1 parent 8864d30 commit e7bd548
File tree
452 files changed
+888389
-88126
lines changed- .github/workflows
- data-structures/maps/mutablemaps/src/main/scala/com/mutablemaps/map
- lexers/regex/verifiedlexer
- benchmark_results
- flex
- 2026-01-12
- 2026-01-13
- 2026-01-15
- 2026-01-21
- 2026-01-25
- 2026-01-27
- from_coqlex/Comparison
- AAStarB
- Lexers/CoqLex
- data
- results
- CoqLex
- Verbatim
- JSON/results/ZipLex
- latest
- flex
- raw
- results_07.10.2025
- results_08.10.2025
- results_23.09.2025
- results_25.09.2025
- results_30.09.2025
- flex_benchmarks
- src/main/scala/com/ziplex
- benchmark
- res/as
- example
- lexer
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
452 files changed
+888389
-88126
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
45 | | - | |
| 43 | + | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
5 | 15 | | |
6 | 16 | | |
7 | | - | |
| 17 | + | |
8 | 18 | | |
9 | 19 | | |
10 | 20 | | |
| |||
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
28 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
29 | 61 | | |
30 | 62 | | |
31 | 63 | | |
32 | 64 | | |
33 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
34 | 83 | | |
35 | 84 | | |
36 | 85 | | |
37 | | - | |
| 86 | + | |
38 | 87 | | |
39 | 88 | | |
40 | 89 | | |
41 | 90 | | |
42 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
43 | 94 | | |
44 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
45 | 104 | | |
46 | 105 | | |
47 | 106 | | |
48 | | - | |
| 107 | + | |
49 | 108 | | |
50 | 109 | | |
51 | 110 | | |
| |||
55 | 114 | | |
56 | 115 | | |
57 | 116 | | |
58 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
59 | 120 | | |
60 | 121 | | |
61 | 122 | | |
62 | | - | |
| 123 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| |||
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
46 | 56 | | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
53 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
54 | 68 | | |
55 | 69 | | |
56 | 70 | | |
| |||
59 | 73 | | |
60 | 74 | | |
61 | 75 | | |
62 | | - | |
| 76 | + | |
0 commit comments