Instructions
Build
docker build -t reducer .
Get a shell into the container
docker run -it -v "$(pwd)/queries:/reducer/queries" reducer
Reduce
To reduce an individual query, run:
reducer --query <query-to-minimize> --test <oracle-script>
By default, the reducer overwrites the original query. For example, the following command:
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:
reducer --query <query-to-minimize> --test <oracle-script> --output <output-file>
e.g.
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:
./reduce_all.sh