Programming with non-determinism in deductive databases