From: barrington@logica.com (Jardine Barrington-Cook)
Subject: Re: Bug in code for Priority Queue
Date: Thu, 5 Jan 1995 12:23:20 GMT
Date: 1995-01-05T12:23:20+00:00 [thread overview]
Message-ID: <barrington.39.000C63EE@logica.com> (raw)
In-Reply-To: D1us76.Gp@inmet.camb.inmet.com
In article <D1us76.Gp@inmet.camb.inmet.com> stt@dsd.camb.inmet.com (Tucker Taft) writes:
>Newsgroups: comp.lang.ada
>Path: logica.co.uk!pipex!howland.reston.ans.net!gatech!bloom-beacon.mit.edu!uhog.mit.edu!news.mathworks.com!noc.near.net!inmet!dsd!stt
>From: stt@dsd.camb.inmet.com (Tucker Taft)
>Subject: Bug in code for Priority Queue
>Message-ID: <D1us76.Gp@inmet.camb.inmet.com>
>Sender: news@inmet.camb.inmet.com
>Organization: Intermetrics, Inc.
>Date: Tue, 3 Jan 1995 23:35:29 GMT
>Lines: 246
>Brian Hanson of Cray (brh@cray.com) kindly pointed out a bug
>in the code for a priority queue I posted several weeks ago,
>which arose during my effort to create a stand-alone
>priority queue package from a version that was embedded
>in something else. So much for reuse by transcription ;-).
>In any case, here is a description of the bug and the fix...
[.. real code cut out...]
There is a logical problem with the use of priority queues for warning
messages, which I would like to publicise. I have seen this problem twice, and
once was in an aircraft audio alarm system.
When putting an element of priority "n" onto a prioritorised warning queue, it
is essential to search the lower priority queues for the same warning at a
lower severity - if you do not do this the resulting warnings to the operator
can be very misleading.
In a UK Television broadcast of the 1983 election results this caused
two succesive headline messages to appear in the form:
"4th recount at Molesly North" followed by
"3rd recount at Molesly North".
In the aircraft audio warning case the results were of the form:
"Warning: aircraft below 30 meters"
"Warning: aircraft below 40 meters"
(the aircraft was still descending, and below 30 meters)
I for one would be very happy never to see this problem again.
Jardine Barrington-Cook ! "...See worlds on worlds compose one universe
Space Division - Logica ! observe how system into system runs..."
...personal opinions, !
subject to change... ! A. Pope - from "An Essay on Man", 1773
prev parent reply other threads:[~1995-01-05 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-01-03 23:35 Bug in code for Priority Queue Tucker Taft
1995-01-05 12:23 ` Jardine Barrington-Cook [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox