since the only valid sequence is (started = 0, ended = 0) -> (started = 1, ended = 0) -> (started = 1, ended = 1), isn't it more clear to use only one variable with symbolic values NOT_STARTED, STARTED, FINISHED, being slightly more readable (IMHO) and also disallowing the invalid (started = 0, ended = 1) state?