I think there are too many possible risks of programming the vehicle to do anything except stop dead in an emergency situation - you rapidly get into very complex programming with all kinds of failure modes - e.g. what if the problem was a faulty sensor? The vehicle might try to avoid a non-existent threat by crashing into something else. Stopping is the safe thing to do. If you want to react, you rapidly have to make lots of moral decisions like (The Trolley Problem).
Briefly sounding a horn in an unexpected emergency stop situation is probably a good idea, particularly if it's a white noise type thing, rather than a siren, so that other road users can localise it's source quickly.