The stability and evolution of the solar system