widen method

AbstractState<D> widen(
  1. AbstractState<D> other
)

Implementation

AbstractState<D> widen(AbstractState<D> other) {
  final result = <String, D>{};
  final allVars = {..._values.keys, ...other._values.keys};

  for (final v in allVars) {
    // Use getForJoin for consistent handling of missing variables
    final thisVal = getForJoin(v);
    final otherVal = other.getForJoin(v);
    result[v] = thisVal.widen(otherVal);
  }

  return AbstractState(_defaultValue, result);
}