def _resolve(self, trial:int) -> bool:
    """Attempts to resolve variable. Return true if expression tree under
this Variable changes at all.

:param trial: how many times _resolve() has been called by the originating
    :class:`Variable`? Only updates stuff if in a new trial."""
    if self.trial >= trial or self.resolved or self.expr == None: return False
    # try to resolve dependencies first
    changed = self.expr.a._resolve(trial) or self.expr.b._resolve(trial)
    self.trial = trial
    if self.expr.resolved: self._value = self.expr.value; changed = True
    return changed