A knowledge-driven framework for synthesizing designs from modular components