What are the goals of punishment and corrections?

What are the goals of punishment and corrections? Explain the rationale behind those goals. How does the concept of community corrections relate to these goals and rationale?

What do you think about the use of the death penalty as a form of punishment? Support by using one of the major ethical systems.