#!/bin/bash

set -euo pipefail

if [[ ! -e L4_in.exa ]]; then
  echo "L4_in.exa not found, exiting"
  exit 1
fi
cpp -P L4_in.exa > o2_L4.exa
time java -XX:+UseG1GC -cp ../compiler_expl.jar Main ../settings.txt knowledge.txt ../platform.txt 0 2>&1 | tee o2_exploreConfs.log
grep -e 'found [0-9]* config' o2_exploreConfs.log | sed 's/.*found \([0-9]*\) config.*/\1/' > o2_nrConfs.txt
