Skip to content

Conflict set is too small when solver enforces the single instance restriction #2843

Closed

Description

@sebright

Here is a test case where the solver can't find a solution:
sebright@2b4d027

targets: A, B
constraints: 
  stanzas A test (unknown source)
  stanzas B test (unknown source)
  stanzas C test (unknown source)
  stanzas D test (unknown source)
  stanzas D test (unknown source)
  stanzas E test (unknown source)
preferences: 
strategy: PreferLatestForSelected
[__0] trying: 0.A-1.0.0 (user goal)
[__1] next goal: 0.D (dependency of 0.A-1.0.0)
[__1] rejecting: 0.D-2.0.0 (conflict: 0.A => 0.D==1.0.0)
[__1] trying: 0.D-1.0.0
[__2] trying: 0.C-1.0.0 (dependency of 0.A-1.0.0)
[__3] trying: 1.B-1.0.0 (user goal)
[__4] next goal: 1.D (dependency of 1.B-1.0.0)
[__4] rejecting: 1.D~>0.D-1.0.0 (conflict: 1.B => 1.D==2.0.0)
[__4] trying: 1.D-2.0.0
[__5] trying: 1.B-1.0.0:-flagA
[__6] trying: 1.B-1.0.0:-flagB
[__7] next goal: 1.C (dependency of 1.B-1.0.0:-flagB)
[__7] rejecting: 1.C~>0.C-1.0.0 (dependencies not linked: cannot merge {*1.D-2.0.0} and {*0.D-1.0.0}; conflict set: 0.D, 1.C, 1.D)
[__7] rejecting: 1.C-1.0.0 (multiple instances)
[__5] fail (backjumping, conflict set: 0.C, 0.D, 1.C, 1.D)
[__4] rejecting: 1.D-1.0.0 (multiple instances)
[__2] fail (backjumping, conflict set: 0.C, 0.D, 1.B, 1.C, 1.D)
[__0] fail (backjumping, conflict set: 0.A, 0.C, 0.D, 1.B, 1.C, 1.D)

I think that both conflict sets at level 7 should contain the variables flagA and flagB, because those flags are responsible for B's dependency on C.

Activity

  1. 23Skidoo commented on Sep 27, 2015

    @23Skidoo
    Member
  2. kosmikus commented on Oct 11, 2015

    @kosmikus
    Contributor

    /cc @edsko

  3. self-assigned this
    on Mar 5, 2016
  4. kosmikus commented on Mar 5, 2016

    @kosmikus
    Contributor

    I will try to look at this and understand the issue. Does not necessarily mean I can fix it without @edsko's help.

  5. edsko commented on Mar 12, 2016

    @edsko
    Contributor

    Going to take a look at this now.

  6. edsko commented on Mar 12, 2016

    @edsko
    Contributor

    @GrayJay You're absolutely right, thank you for the detailed bug report! Thinking about what the right fix is, should have a PR soon.

  7. assigned and unassigned on Mar 12, 2016
  8. sebright commented on Mar 13, 2016

    @sebright
    CollaboratorAuthor

    @edsko Thanks!

  9. added a commit that references this issue on Mar 28, 2016
    bf37c99
  10. sebright commented on Apr 23, 2016

    @sebright
    CollaboratorAuthor

    Fixed by #3357.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions