Self-stabilization with four-state machines