Abstract Dynamic Programming