add tool to dump the pattern model