Logic For Programming, Artificial Intelligence, And Reasoning