Building design-time and run-time knowledge for QoS-based component assembly