Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Forced/automatic USE flag constraints (codename: ENFORCED_USE)
Date: Mon, 12 Jun 2017 19:17:31
Message-Id: 1497295036.1575.10.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] Forced/automatic USE flag constraints (codename: ENFORCED_USE) by Alexis Ballier
1 On pon, 2017-06-12 at 11:08 +0200, Alexis Ballier wrote:
2 > On Sun, 11 Jun 2017 18:05:18 +0200
3 > Alexis Ballier <aballier@g.o> wrote:
4 >
5 > > I think this handles all the cases. I'll try to update the repo with
6 > > that algo.
7 >
8 > I've updated my fork. It'd be good to merge it and rebase solve() on
9 > top of the output of to_impl.convert_to_implications if you're happy
10 > with it.
11 >
12 > $ time python3 classify.py requsel
13 > Stats:
14 > Parse error: 0
15 > Good: 8334
16 > Need topo sort: 152
17 > Cyclic: 43
18 >
19 > real 0m1.874s
20 > user 0m1.869s
21 > sys 0m0.005s
22 >
23 >
24 >
25 > It works better, no more parse error, and only 43 problematic cases.
26
27 Thanks for doing it. It's certainly an interesting case study. I've
28 merged it and pushed the result.
29
30 However, I personally think it's only going to work against your case.
31 You can clearly see now how complex the code has become. Even
32 in the pseudo-ocaml you presented it already is complex. Now imagine
33 having to retype it in cleartext suitable for the PMS.
34
35 I've actually started typing the initial specification yesterday [1].
36 As you can see, banning the extra constraints has made the algorithms
37 much simpler. In particular:
38
39 1. You do not have to define 'falsify' for anything other than pure
40 flags -- which makes it easy to inline it.
41
42 2. ||, ??, ^^ groups are only flat lists of flags -- which makes
43 reordering and processing them trivial.
44
45 3. The algorithm is recursive only on USE-conditional groups. This makes
46 it trivial to make it iterative. Optimizations become trivially
47 possible.
48
49 Nevertheless, feel free to play with the full implementation. If you're
50 interested, you can play with the complex cases more. In particular, I'm
51 wondering whether nsolve will actually consider most of them solvable.
52
53 As for the results, I think it is the point where we start preparing
54 pull requests with REQUIRED_USE changes to see whether the developers
55 agree with such changes.
56
57 [1]:https://wiki.gentoo.org/wiki/User:MGorny/GLEP:ReqUse
58
59 --
60 Best regards,
61 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies