A Logic-Based Approach for Matching User Profiles