Automated specification and task allocation methods for single and multimode embedded applications