replace all sub graphs which matched subA with subB in g
source not stored for this graph (policy: none)