#!/usr/bin/env bash
# by Mario Alviano

set -o pipefail     # Disable output buffering

if [ $# -ne 3 ]; then
    echo "This script must be invoked with three parameters!"
    exit
fi

MAXINT=$1
MAX_NESTING_LEVEL=$2    # NOTE: MAX_NESTING_LEVEL is not used in this version of DLV
OUTPUT_PREDICATES=$3

SCRIPTDIR=`dirname $0`
BIN=gringo-aspcomp2014
WASP=$SCRIPTDIR/wasp

$BIN --foobar="$OUTPUT_PREDICATES" | $WASP --competition-output
ECODE=$?

exit $ECODE
