#!/bin/bash

sed s/cbmc-kInduction.15-01-27_1342.logfiles/cbmc-kInduction.logfiles/ $1 > table.html
sed -i s/esbmc-kInduction.15-01-19_1756.logfiles/esbmc-kInduction.logfiles/ table.html
sed -i s/cpachecker-kInduction.15-01-26_2242.logfiles/cpachecker-kInduction.logfiles/ table.html 
sed -i s/cpachecker-kInduction-no-inv.15-01-26_1933.logfiles/cpachecker-kInduction-no-inv.logfiles/ table.html 
sed -i s/cpachecker-kInduction-static-0-1.15-01-28_1618.logfiles/cpachecker-kInduction-static-0-1.logfiles/ table.html 
sed -i s/cpachecker-kInduction-static-16-2.15-01-28_1717.logfiles/cpachecker-kInduction-static-16-2.logfiles/ table.html 
sed -i s/cpachecker-kInduction-static-16-2-no-widening.15-01-29_0206.logfiles/cpachecker-kInduction-static-16-2-no-widening.logfiles/ table.html
sed -i s/cpachecker-kInduction-unsound-no-inv.15-01-26_2327.logfiles/cpachecker-kInduction-unsound-no-inv.logfiles/ table.html
sed -i s/cpachecker-predicate.15-01-29_1038.logfiles/cpachecker-predicate.logfiles/ table.html

# Normalize link targets
sed -i 's/href="\.\.\/\.\.\/cbmc\//href="/' table.html
sed -i 's/href="\.\.\/\.\.\/esbmc\//href="/' table.html
sed -i 's/href="\.\.\/\.\.\/cpachecker-kInduction-static\//href="/' table.html
sed -i 's/href="\.\.\/\.\.\/cpachecker-kInduction\//href="/' table.html
sed -i 's/href="\.\.\/\.\.\/cpachecker-kInduction-unsound\//href="/' table.html
sed -i 's/href="\.\.\/\.\.\/cpachecker-predicate\//href="/' table.html
