From: "Albert D. Cahalan" <acahalan@cs.uml.edu>
To: esr@thyrsus.com
Cc: linux-kernel@vger.kernel.org (CML2), kbuild-devel@lists.sourceforge.net
Subject: Re: Why recovering from broken configs is too hard
Date: Thu, 3 May 2001 19:58:24 -0400 (EDT) [thread overview]
Message-ID: <200105032358.f43NwOB84159@saturn.cs.uml.edu> (raw)
In-Reply-To: <20010503034755.A27693@thyrsus.com> from "Eric S. Raymond" at May 03, 2001 03:47:55 AM
Eric S. Raymond writes:
> What you know, to start with, is (a) the configuration, (b) the
> constraints, (c) the shape of the menu tree, and (d) which constraints
> have failed. What you want to do is find a set of corrected
> configurations which fulfill all constraints and are in some sense
> "close" to the broken one you have.
You also know:
(e) the default config, with which you may compare the broken one
> The obvious thing to try is to start with the configuration you have
> and try mutating the variables that occur in the broken constraint(s).
> Of course, there are 3^n of these where n is the number of distinct
> variables, so this is going to blow up really fast; 3, 9, 27, 81, 243
> and we ain't even to six symbols yet. By the time we get to the
> twelve variables that could be linked by just *one* constraint, there
> are 531,441. Even if you can check 500 configurations a second it's
> going to take 16 minutes just to get a candidate list.
500/second seems very slow. Can't you do 1000 times that?
http://www.cs.bgu.ac.il/~omri/Humor/write_in_c.html
You could keep the bulk of your code in Python, and write a
separate config fixer in C.
> There's a third way. The cheap, dirty attack on the satisfaction
> problem is to use what's called a "stochastic" or "hill-climbing"
> algorithm. It's a less ambitious version of the brute-force search
> that essentially random-walks through the configuration
> space looking for valid ones.
>
> The problem with stochastic search is that (a) it's not guaranteed
> to find a model even if models exist, and (b) you can't predict its
> running time. Oops...
>
> Even assuming we could generate large numbers of candidate models
> quickly, I've been putting the word "close" in quotes because there's
> another nasty problem lurking here. "Close" is not well-defined in
> this space.
Procedure:
1. throw out all junk symbols (could try spell checking first)
2. mark non-default settings as read-only
3. add missing symbols as needed to meet constraints
4. add any additional missing symbols
5. mutate the config until it works... user may ^C when bored
Rules for mutation:
1. do not modify what the user set (see #2 above)
2. configs that differ little from the one you start with are more fit
3. configs that violate fewer constraints are more fit
4. option 'm' should be the most likely mutation
5. symbols that were missing should be most likely to mutate
6. fit configs breed with each other of course
This will fix common errors. Obviously it can't fix the case
of a user with non-default settings that conflict. That is
good, because I don't want a tool to disobey me.
The above ought to work well for a config file with only a
half dozen entries. List what you care about, and let the
tool make everything right.
next prev parent reply other threads:[~2001-05-03 23:58 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-03 7:47 Eric S. Raymond
2001-05-03 8:03 ` Jeff Garzik
2001-05-03 8:09 ` Eric S. Raymond
2001-05-03 8:29 ` Alexander Viro
2001-05-03 8:42 ` [kbuild-devel] " Greg Banks
2001-05-03 8:52 ` Eric S. Raymond
2001-05-03 8:45 ` Ingo Oeser
2001-05-03 9:14 ` Alexander Viro
2001-05-03 9:43 ` Eric S. Raymond
2001-05-03 9:56 ` Alan Cox
2001-05-03 10:00 ` Alexander Viro
2001-05-03 15:55 ` Eric S. Raymond
2001-05-03 18:36 ` Alexander Viro
2001-05-03 14:54 ` David Mansfield
2001-05-03 15:58 ` Eric S. Raymond
2001-05-03 18:13 ` John Stoffel
2001-05-03 9:32 ` Eric S. Raymond
2001-05-03 10:15 ` [kbuild-devel] " Keith Owens
2001-05-03 16:59 ` Eric S. Raymond
2001-05-03 17:48 ` Alan Cox
2001-05-03 18:30 ` Eric S. Raymond
2001-05-03 18:41 ` Alan Cox
2001-05-03 19:03 ` Device driver from kernel2.2.x to kernel2.4 jalaja devi
2001-05-04 1:39 ` Andrew Morton
2001-05-03 22:58 ` [kbuild-devel] Why recovering from broken configs is too hard Keith Owens
2001-05-03 19:20 ` Michal Jaegermann
2001-05-03 23:58 ` Albert D. Cahalan [this message]
2001-05-03 22:55 ` David Lang
2001-05-04 7:47 ` [kbuild-devel] " Eric S. Raymond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200105032358.f43NwOB84159@saturn.cs.uml.edu \
--to=acahalan@cs.uml.edu \
--cc=esr@thyrsus.com \
--cc=kbuild-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®