Replace symbols with variables in policy