#! /bin/bash

WORKINGDIR=${WORKINGDIR:=''}
CLINGO=${CLINGO:='clingo'}
COLOURLP=${COLOURLP:='colour.lp'}
RESULT=${RESULT:=''}

WORKINGDIR=`dirname $0`

$WORKINGDIR/$CLINGO $WORKINGDIR/$COLOURLP $1 <(echo $2) 2> /dev/null | grep -q "^Answer"

# output result
if [ $? = 0 ]; then
  echo "OK"
  exit 0
else
  echo "NOK"
  exit 0
fi



