Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type conversion from list comprehension to Set aborts model generation #442

Open
semihalf-czekaj-maciej opened this issue Jul 17, 2019 · 0 comments

Comments

@semihalf-czekaj-maciej
Copy link

semihalf-czekaj-maciej commented Jul 17, 2019

The following code:

letting m be 3

letting S be {3,7}

find H : set (size 2) of int(0..m-1)
find a : int(8..15)
such that
	H = toSet([(a*x) % m | x <- S])

ends up in fatal error:

Generating models for bug1.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: d8d81ee (2019-06-29 10:27:39 +0300)

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


No representation matches this beast: set of ?

CallStack (from HasCallStack):
  error, called at src/Conjure/Bug.hs:21:15 in conjure-cp-2.3.0-6wU2ArK4uNvAPRrzGLsyfq:Conjure.Bug
  bug, called at src/Conjure/UI/Model.hs:1785:13 in conjure-cp-2.3.0-6wU2ArK4uNvAPRrzGLsyfq:Conjure.UI.Model

Few hints: simplifying the expression from toSet([(a*x) % m | x <- S]) to toSet([x % m | x <- S]) (removing multiplication in list expression) removes bug.
Replacing set with multiset also works well (no bug).

This issue is with version 2.3.0 and precompiled binary for Ubuntu 16.

$ conjure --version
Conjure: The Automated Constraint Modelling Tool
Release version 2.3.0
Repository version d8d81ee (2019-06-29 10:27:39 +0300)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant