avoid stack overflows in graph matching
normalize symbolic expressions
cleanup
minimal tests for graph matching