conjure icon indicating copy to clipboard operation
conjure copied to clipboard

powerSet is broken

Open SaadAttieh opened this issue 5 years ago • 1 comments

Two different models, two different reactions:

find s : set(minSize 2)  of int(1..10)
such that
forAll {i,j} in s . i + j = 5
Generating models for test.essence
conjure: This should never happen, sorry!

However, it did happen, so it must be a bug. Please report it to us!

Conjure is actively maintained, we will get back to you as soon as possible.
You can help us by providing a minimal failing example.

Also include the repository version for this build: 63ed6eb95 (2019-07-15 23:07:43 +0300)

Issue tracker: http://github.com/conjure-cp/conjure/issues


Type error, InComprehension:
i
{i, j}
int

CallStack (from HasCallStack):
  error, called at src/Conjure/Bug.hs:21:15 in conjure-cp-2.3.0-9cKphoUspwvCQYE9JpUQjl:Conjure.Bug
  bug, called at src/Conjure/Language/Expression.hs:402:26 in conjure-cp-2.3.0-9cKphoUspwvCQYE9JpUQjl:Conjure.Language.Expression

or more plainly:

find s: set (minSize 2) of int(1..10)
such that sum([1 | i <- powerSet(s)]) = 15

This one does not terminate after a minute of running. Stuck on generating models.

SaadAttieh avatar Aug 28 '19 10:08 SaadAttieh

apologies, ignore first error, typo in model. should be subsetEq. Second one still stands though.

SaadAttieh avatar Aug 28 '19 11:08 SaadAttieh