Reactive imperative programming with dataflow constraints