From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_05,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e35df5667f98fd98 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-05 04:23:20 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!rutgers!cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!pipex!logica.co.uk!jibc!barrington From: barrington@logica.com (Jardine Barrington-Cook) Subject: Re: Bug in code for Priority Queue Message-ID: Sender: news@carmen.logica.co.uk (News Manager Account) Nntp-Posting-Host: 158.234.63.209 Organization: Logica X-Newsreader: Trumpet for Windows [Version 1.0 Rev A] References: Date: Thu, 5 Jan 1995 12:23:20 GMT Date: 1995-01-05T12:23:20+00:00 List-Id: In article 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: >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