#!/bin/bash
file=$1
shift

fti2=../4ti2/4ti2gmp.exe
frobby=../bin/frobby

./frobgrob $file 2> /dev/null > /dev/null

cat $file.out.gro $file.out.lat|$frobby lata 2>/dev/null > /dev/null
f=$?

if [ $f == 2 ]; then echo "not generic"; exit 0; fi
if [ $f != 0 ]; then echo "found counterexample"; cat $file.out.gro $file.out.lat|$frobby lata > $file.ana; exit $f; fi
echo generic
exit 0;
