SUMMARYA mathematical programming formulation of strain-driven path-following strategies to perform shakedown and limit analysis for perfectly elastoplastic materials in an FEM context is presented. From the optimization point of view, standard arc-length strain-driven elastoplastic analyses, recently extended to shakedown, are identified as particular decomposition strategies used to solve a proximal point algorithm applied to the static shakedown theorem that is then solved by means of a convergent sequence of safe states. The mathematical programming approach allows: a direct comparison with other non-linear programming methods, simpler convergence proofs and duality to be exploited. Owing to the unified approach in terms of total stresses, the strain-driven algorithms become more effective and less non-linear with respect to a self-equilibrated stress formulation and easier to implement in the existing codes performing elastoplastic analysis. The elastic domain is represented avoiding any linearization of the yield function so improving both the accuracy and the performance. Better results are obtained using two different finite elements, one with a good behavior in the elastic range and the other suitable for performing elastoplastic analysis. The proposed formulation is compared with a specialized implementation of the primal-dual interior point method suitable to solve the problems at hand.