[darcs-users] Delta Debugging
David Roundy
droundy at abridgegame.org
Tue May 25 11:08:31 UTC 2004
On Mon, May 24, 2004 at 10:23:44AM -0400, Andrew Pimlott wrote:
> > I imagine implementing something like
> >
> > latest_working_version :: FilePath -> (IO ()) -> (IO Bool) -> IO PatchSet
> >
> > where the first argument is the location of a repository (a PatchSet could
> > be given instead, but we might want to throw away and reread the patches to
> > save memory), the second argument is an initialization function, and the
> > third is the actual test.
>
> I think the initialization function should be IO Bool--that tells you
> whether (eg) your compile succeeded, mostly solving the problem of
> distinguishing between the target bug and compile errors.
I think you're misinterpreting the meaning of my two IO args. The
initialization wouldn't be run for each test--it would only be run once on
a "known-good" version. It is for things like autoconf and configure that
you don't want to keep rerunning (since they're slow). Of course, it would
still be useful to have it return a Bool, since then you wouldn't need to
require that the user specify a known-good version.
I think Kenn's suggestion that the test itself return IO (Maybe Bool)
sounds like the best way to deal with distinguishing between compile errors
and "the real bug".
> Also, hopefully this is obvious, but the third argument should be
> user-specifiable, because you often want to run a small test case, not
> the entire test suite.
Yes, of course.
--
David Roundy
http://www.abridgegame.org
More information about the darcs-users
mailing list