Integrating algorithm-level design and system-level design through specification synthesis