An imperative language of self-modifying graphs for biological systems