A structured methodology for designing distributed algorithms for mobile entities