Keep them in prison until they're no longer dangerous. If they're still dangerous, they stay. Seems pretty simple.
Also seems pretty expensive to me. Now, I'm fairly agnostic on the change in this thread, but I'm reminded of the statistic that Norway concentrates heavily on reform, and manages to make it so only 20% of the criminals it releases come back, while in the USA our convicts average 3 times as long in prison and come back for a subsequent tour at something like 60% of the time.
So let's say the US cost per prison-year is $X, and Norway's is $Y.
Take an example prisoner that would be sentenced to A in Norway.
Norway's cost: A*$Y*1.24(for recidivism)
USA's cost: A * 3 $X *1.96 (5.88)
In short: Unless Norway spends 5X as much per prisoner per year, they have a substantially cheaper system than we do, and I'm not even including extra police and court costs for the prisoners coming back.
If that means we gotta train them - get them to get their GED, provide some *realistic* occupational training, etc... So be it. I'm NOT for cutting our noses off to spite our face by saying 'They don't DESERVE IT! So we're going to spend $30k/year and suffer 3X the murder rate* in order to properly punish them!'
That being said, I don't think criminals deserve better treatment than non-criminals, so some sort of loan system would be good, or perhaps make them pay for training, but at the same time pay them a *realistic* wage while in prison. Or run a 'credit' system where they earn their training by putting hours into helping maintain the prison. Lots of options.
Same sort of deal with the unemployed - have some work camps where they can help with various tasks in exchange for earning, among other things, credits for training and such.
*Remember, 'most' murderers are already felons.