Pennsylvania constitution
Article I: declaration of rights
Section 17

No ex post facto law, nor any law impairing the obligation of contracts, or making irrevocable any grant of special privileges or immunities, shall be passed.