I would like to modify the attribute of an Object.
For example, I would like to specify the args
attribute of CallPattern latter:
CallPattern the_pattern{IsOp("cast"), {}};
the_pattern->args.push_back(IsWildcard());
But this is not allowed since (I think) args is eventually reached via a const ptr.
So is there a way to modify attribute of an “Object”? This requirement may be essential when we define a graph with cycle. (computation graph can not have cycle, but a powerful pattern matching graph should have!)