Formal verification and validation of convex optimization algorithms for model predictive control