resolve real name for discrete and guard exprs