Methodology for formal verification of routing protocols for ad hoc wireless networks