Adding the DeterministicPrologQuery class