1. A method of solving a combinatorial optimization problem using dynamic programming, the method comprising: automating integration of bounds propagation into compilation of a dynamic program, by extracting bounds from partial results obtained during dynamic programming, and tightening the bounds throughout execution of the dynamic program.