Finite state machines, graphs and trees in MetaPost
