The introduction to this article covers a lot of edge cases right off the bat.
https://en.wikipedia.org/wiki/Ex_post_facto_law
https://en.wikipedia.org/wiki/Right_of_revolution
https://en.wikipedia.org/wiki/Right_of_revolution