The law states that treason shall be 'punished' by death. [=that the punishment for treason is death]
I think that murderers should be 'punished' by/with life imprisonment.
His parents 'punished' him by taking away his allowance.