conjure
conjure copied to clipboard
Type conversion from list comprehension to Set aborts model generation
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)