Programming Sensor Networks Using Abstract Regions