The present paper gives the mathematical basis of a library of standard programs for solving optimal control problems with mixed constraints. The methods employed utilize reduction of the initial problem to a problem of nonlinear programming. The programs are designed to solve a wide class of problems including time-optimal problems, problems with moving righthand end, problems with non-di erentiable functionals, and optimization with respect to a control vector and control parameter, etc. The library is part of the uni ed package of applied programs, developed at the Computing Centre of the Academy of Sciences of the USSR, for solving problems of unconstrained minimization of functions of several variables, and nonlinear programming and optimal control problems.