retrospective legislation

Aka ex post facto laws. Laws defining behaviour upon which one can be held criminally liable or responsible in civil court or otherwise liable for payment (such as taxation), even when that behaviour may have happened before the enactment of said laws. While constitutionally denied in the U.S. as it violates the traditional concept of the rule of law, it is prevalent in autocracies, and still known to occasionally happen in some democracies.