Skip to content

Commit 17c4af4

Browse files
committed
Merge branch 'master' of github.com:PurdueDualityLab/memoized-regex-engine
2 parents 05f1953 + 5f729f7 commit 17c4af4

File tree

1 file changed

+51
-2
lines changed

1 file changed

+51
-2
lines changed

README.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Research paper is available [here](https://davisjam.github.io/publications/).
1111
| Item | Description | Location |
1212
|------|-------------|----------|
1313
| Simple regex engine | Source code for Cox's simple Thompson regex engine (baseline and variants) | src-simple/ |
14-
| Evaluation (semantics / performance) | Prototype evaluation. Test suite, benchmark suite | eval/ |
15-
| Prototype size measurements | measure-prototype-size/ |
14+
| Evaluation | Prototype evaluation. Test suite, benchmark suite | eval/ |
15+
| Prototype size measurements | Broken down by engine extensions, memoization, and test | measure-prototype-size/ |
1616

1717
## Configuration
1818

@@ -22,6 +22,55 @@ Set the following environment variables:
2222

2323
The file `.sample_config` has examples. You might run `. .sample_config`.
2424

25+
## Tests
26+
27+
Run the tests as follows:
28+
29+
```
30+
cd src-simple;
31+
make tests
32+
```
33+
34+
You can run semantic and performance tests separately. Use `make semtests` and `make perftests`.
35+
36+
The tests are defined in `src-simple/test`: `semantic-behav.txt` and `perf-behav.txt`.
37+
38+
## Using the engine
39+
40+
```
41+
cd src-simple;
42+
./re [your args here]
43+
```
44+
45+
The usage message gives details. You can also see example queries from the test suite.
46+
47+
The engine is instrumented.
48+
- You can watch progress by running the engine with the environment variable `MEMOIZATION_LOGLVL=debug`.
49+
- A JSON object is printed at the end with time and space measurements.
50+
51+
## Running evaluation
52+
53+
### Security study
54+
55+
This is Figure 4 plus prose.
56+
57+
- For Figure 4, run `eval/case-study-timeCost.py`.
58+
- For the security experiment described in the text, run `eval/measure-memoization-behavior.py --regex-file X --runSecurityAnalysis --trials 1 --out-file /tmp/out`. It prints a summary at the end.
59+
60+
### Effectiveness of selective memoization
61+
62+
This is Figure 5 plus prose.
63+
64+
- Run `eval/measure-phi-sizes.py --regex-file X --out-file /tmp/phiSizes.json` to collect data.
65+
- Set the globals in `eval/analye_phi_measurements.py` to analyze the data and generate the figure.
66+
67+
### Practical space costs
68+
69+
This is Figure 6 plus prose.
70+
71+
- Run `eval/measure-phi-sizes.py --regex-file X --queryPrototype --trials 1 --perf-pumps 20480 --max-attack-stringLen 20480 --out-file /tmp/SOSpaceCost.json` to collect data.
72+
- Set the globals in `eval/analye_dynamic_measurements.py` to analyze the data and generate the figure.
73+
2574
## Statement of origin
2675

2776
The simple and full regex engines are extensions of existing engines.

0 commit comments

Comments
 (0)