A Formal Framework for Analyzing the Behavior of BeeHive