def standardize_variables(sentence, dic=None):
if dic is None: dic = {}<EOL>if not isinstance(sentence, Expr):<EOL><INDENT>return sentence<EOL><DEDENT>elif is_var_symbol(sentence.op):<EOL><INDENT>if sentence in dic:<EOL><INDENT>return dic[sentence]<EOL><DEDENT>else:<EOL><INDENT>v = Expr('<STR_LIT>' % next(standardize_variables.counter))<EOL>dic[sentence] = v<EOL>return v<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return Expr(sentence.op,<EOL>*[standardize_variables(a, dic) for a in sentence.args])<EOL><DEDENT>
Replace all the variables in sentence with new variables.
    >>> e = expr('F(a, b, c) & G(c, A, 23)')
    >>> len(variables(standardize_variables(e)))
    3
    >>> variables(e).intersection(variables(standardize_variables(e)))
    set([])
    >>> is_variable(standardize_variables(expr('x')))
    True