An abductive theory of scientific reasoning