Querying the Semantic Web via Rules