PrologOperator translation from PtrMan's gnuprolog code