changed to ISO prolog standard (which gnuprologjava is based on), added constraints