In reply to dave_59:
Hi Dave ,
Thank you for your detailed answer , it was helpful . I have a few questions ::
(1) " You are not allowed to refer to a random array as a whole variable in a constraint. You must have a constant select, or use an iterative constraint like foreach or array.sum that gets unrolled unto a constant select "
I didn't get this part . Inside unique constraint I can constraint a whole unpacked array ( 1D as well as 2D )
The above statement was again encountered below ::
I thought that circular dependency is the reason the code fails so I edited the code as
a[i] == SUM(a[0:i-1]) ; // Changes in function too ( Only 1 Argument )
Since a is input to function in constraint , a will be solved first that is a.size() constraint . But I still get an error ::
ERROR :: Range must be bounded by constant expressions.
With class methods ( which may or may not be used in constraints ) can't I pass variable index range as input to a dynamic array ?