Files
2026-06-24 13:47:14 +02:00

49 lines
916 B
Markdown

## Instructions
### Build
```bash
docker build -t reducer .
```
### Get a shell into the container
```bash
docker run -it -v "$(pwd)/queries:/reducer/queries" reducer
```
### Reduce
To reduce an individual query, run:
```bash
reducer --query <query-to-minimize> --test <oracle-script>
```
By default, the reducer overwrites the original query. For example, the following command:
```bash
reducer --query queries/query1/original_test.sql --test queries/query1/test.sh
```
overwrites `original_test.sql` with the reduced query.
To write the reduced query to a new file instead, run:
```bash
reducer --query <query-to-minimize> --test <oracle-script> --output <output-file>
```
e.g.
```bash
reducer --query queries/query1/original_test.sql --test queries/query1/test.sh --output queries/query1/reduced.sql
```
To reduce all the queries without overwriting any of them, run:
```bash
./reduce_all.sh
```