[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] Semeai stuff

From: Heikki Levanto
Subject: Re: [gnugo-devel] Semeai stuff
Date: Wed, 30 Jan 2002 20:18:58 +0100
User-agent: Mutt/1.2.5i

On Wed, Jan 30, 2002 at 06:41:19AM -0800, Daniel Bump wrote:
> We ended up with a string with a nonzero
> attack code, a nonzero defend code, and defense
> PASS. This is an inconsistent state that caused
> a crash later in the program.

I haven't followed this debugging, but this comment suggests a simple
remedy: Write down all assumtions of the internal consistency of the data
structures, in one long asserion, protected by its own #ifdef symbol. When
ever something mysterious happens, enable these, and add more until you find
the inconsistent data. When done, disable, and leave them in the code. The
only costs are a slightly less readable code, and the time to write those
tests. The later is quickly earned home, in reduced debugging time. The
former we can live with.

The mysterious changes in regression results indicate that something else
may be wrong somewhere. Maybe a liberal application of such assertions would
pinpoint something strange?


Heikki Levanto  LSD - Levanto Software Development   <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]