#!/bin/bash
#
# Runs following the call convention described in
#
#   http://www.lri.fr/~marche/termination-competition/2007/rules.html
#
# and decides which version to use depending on the problem type
#
# First parameter:  Problem filename
# Second parameter: Maximum al/lowed CPU time (integer
# Third parameter:  For logic programs, an input query.
#
# Current working directory is the directory where containing this file.

if [ $# -lt 2 ]; then
    echo ERROR
    echo "Not enough parameters given"
    exit 1
fi

PROBLEM="$1"
TIMEOUT="$2"
QUERY="$3"

. resources/CONFIG

export PATH=./resources/bin/:$PATH
java $JAVAOPTS -Xmx3g -jar resources/aprove.jar $PROBLEM $TIMEOUT $QUERY
