enthought / sat-solver

Default Repo description from terraform module
Other
3 stars 1 forks source link

Function to compute some minimal unsatisfiable subsets #219

Closed cournape closed 8 years ago

cournape commented 8 years ago

@noraderam

noraderam commented 8 years ago

Can you give an example of a minimal set with more than two elements?

noraderam commented 8 years ago

Can you give an example of a minimal set with more than two elements?

There are certainly simpler answers, but here's what I came up with:

        A 1.0-1; provides (X)
        B 1.0-1; provides (X, Y, Z)
        C 1.0-1; provides (Y)
        D 1.0-1; provides (Y, Z)
        P 1.0-1; depends (X)
        Q 1.0-1; depends (Y); conflicts (A ^= 1.0)
        R 1.0-1; depends (Z); conflicts (B ^= 1.0)
        requirements = [
            Requirement._from_string("P"),
            Requirement._from_string("Q"),
            Requirement._from_string("R"),

P, Q, R is a minimal unsatisfiable set

I think it would be worthwhile to include a test for a case like this

cournape commented 8 years ago

@noraderam how does that look now ?

noraderam commented 8 years ago

LGTM