Ab initio simulations of semiconductor surfaces and interfaces