Instantiating ship layout using string diagram