Logic for Knowledge Representation and Reasoning