A Logical Approach to Philosophy