#!/bin/bash

# usage: naive.sh <program1.sm> <program2.sm>

# (C) Emilia Oikarinen 2005

prog1=$1
prog2=$2
DIR=../bin

if test -d tmp
then 
    true
else mkdir tmp
fi

models=tmp/test.models 
cat $prog1 | $DIR/smodels 0 > $models

choices=`/usr/bin/time -f "%U %S" -o tmp/test.times ./naive_test.sh $prog1 $prog2 $models`

time=`cat tmp/test.times | awk '{t=$1+$2}; {printf("%f",t)}'`
echo $time" "$choices