Prolog implementation of Model Theory