Programming Agents by Their Social Relationships: A Commitment-Based Approach