First of all, I would like to thank my two advisors, Fernando Silva and Lúıs Lopes. They have always been there when I needed them, providing guidance, support and a lot of patience over the last years. Their collaboration was essential and we always had fruitful discussions on the emerging ideas on this subject. I would like to thank the financial support of FCT that was allowed me to dedicate the initial 4 years pursuing this research (PhD grant SFRH/BD/19753/2004). I would also like to thank CRACS/INESC-Porto L.A. for support on the fifth year, allowing me to further improve my work and finish my PhD. I would like to thank Paul Watson and particularly Marcus Kaiser for receiving me so well in Newcastle University for 3 months. This stay...