Distributed Reasoning in a Peer-to-Peer Setting: Application to the Semantic Web