resolve_var(+Name, -Var, +State0, ?State)[private]
Resolve a variable. If State0 == State and it concerns a new variable the variable is bound to '$null$'.