Factor out constant creation for Polynomial SMT strings