Declarative mesh subdivision using topological rewriting in MGS