Can a component change its port set?

Hi All,

I have a question concerning a component’s port set.
Are components allowed to change the number and types of their ports?
Or should the port set be fixed upon the component initialization?

Thanks.