Modeling Swarm Systems and Formal Design Methods