A rule-based and imperative language for biochemical modeling and simulation