Moved utility algorithms out of org.kframework.parser.concrete2.