#!/bin/bash
set -Eeuo pipefail
run=$(sed -n -e '/name/{s/.* = *//p}' driver.log | sed -e "s/\"\$//" -e "s/^\"cadical_//")
time=$(sed -n -e '/wall_clock_time/{s/.* = *//p}' driver.log)
ref_proof_axioms=$(awk '{ print $1 }' run.log)
ref_proof_derived=$(awk '{ print $2 }' run.log)
duplicates=$(awk '{ print $4 }' run.log)
rat_steps=$(awk '{ print $3 }' run.log)
code=0
if test -f driver.err; then
  code=$(sed -n -e '/exit_code/{s/.* = *//p}' driver.err)
fi
echo "$run.cnf,$ref_proof_axioms,$ref_proof_derived,'$duplicates',$rat_steps,$time,$code"

