This paper introduces SelfWISE, a framework for enabling wireless sensor networks to be programmed in a self-stabilizing manner. The framework eases the formal specification of algorithms by abstracting from low-level details such as wireless channel and hardware-specific characteristics. SelfWISE consists of a language for expressing self-stabilizing algorithms, a runtime environment for simulating algorithms in wireless sensor networks, and supporting tools. The hereby applied transformation of formally described algorithms into the simulation environment preserves the self-stabilizing properties. Development, evaluation, and debugging of self-stabilizing algorithms is considerably facilitated by utilizing SelfWISE.