> Is there some fantastic tool/library which already does everything I want? Have you looked into model checkers like Spin, which was developed for the very purpose of exhaustively checking protocols? See spinroot.com Doug McIlroy