Path: csiph.com!1.us.feeder.erje.net!feeder.erje.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: binary search debugging of compilers Date: Tue, 16 May 2023 23:52:10 -0700 (PDT) Organization: Compilers Central Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <23-05-012@comp.compilers> References: <23-05-003@comp.compilers> <23-05-005@comp.compilers> <23-05-006@comp.compilers> <23-05-008@comp.compilers> <23-05-011@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="18841"; mail-complaints-to="abuse@iecc.com" Keywords: debug, tools Posted-Date: 17 May 2023 13:01:56 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <23-05-011@comp.compilers> Xref: csiph.com comp.compilers:3468 On Monday, May 15, 2023 at 6:54:08 PM UTC-7, Kaz Kylheku wrote: (snip) > Say we have a basket of apples with a rotten smell emanating from it. > We can subdivide it, and smell one half and the other. If both halves > smell, we know we have two or more rotten apples and they ended up > in different halves. This doesn't matter. We just pick one half and > keep subdividing. But the algorithm described, at least as I remember it, doesn't test both halves. Sniffing two baskets doesn't take so long, but two tests might. I was suspecting that there were more efficient ways than doing both halves, though didn't try to figure out what they might be. > As long as we stay on the trail of the rotten scent, we will > get down to one rotten apple, and we can use that apple to analyze further: > what kind of mould or bacterium has infected it and so on. Probably > the other rotten apples have the same root cause. If they have different root > causes, we can do another search after fixing the one root cause we have found. I don't know apple statistics so well. If you suspect more than one from the beginning, As a binary search, it should be 50% probability on each test. If you see higher than 50% as the tests go on, it might look suspicious already.