#!/bin/bash
set -Eeuo pipefail
run=$(sed -n -e '/name/{s/.* = *//p}' driver.log)
version=$(sed -n -e '/.*Solver version: /{s///p}' run.err)
time=$(sed -n -e '/wall_clock_time/{s/.* = *//p}' driver.log)
formula_size=$(grep -cE '\s+0\s+0\s*$' run.log)
value=$(grep -cve '^\s*$' run.log)
bound=$(sed -n -e '/.*Proof size lower bound is /{s///p}' run.err)
code=0
if test -f driver.err; then
  code=$(sed -n -e '/exit_code/{s/.* = *//p}' driver.err)
fi
echo "$run,$version,$value,$bound,$time,$code"

