Verification of Ad Hoc Networks with Node and Communication Failures