apply replacements to the name of refers to constraints