Synthesis of concurrent and distributed adaptors for component-based systems