Add function WritePolyref and SummaryAttrTable