A Systematic Approach to Programming and Verifying Attribute-Based Communication Systems