Bills of attainder, ex-post facto laws and laws impairing the obligation of contracts are contrary to the first principles of the social compact, and to every principle of sound legislation.