A tool for generating distributed cooperating software state machines