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

Out-of-bounds error in jp-encoding problem #74

Closed
informarte opened this Issue Jan 5, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@informarte

informarte commented Jan 5, 2016

In the 2014 MiniZinc challenge, there is the jp-encoding problem.

mzn2fzn 2.0.2 compiled it, but mzn2fzn 2.0.10 reports the following problem (for all instances):

MiniZinc: evaluation error: 
  jp-encoding.mzn:311:
  in call 'forall'
  in array comprehension expression
    with i = 164
  jp-encoding.mzn:312:
  in binary '->' operator expression
  jp-encoding.mzn:313:
  in binary '/\' operator expression
  jp-encoding.mzn:317:
  in binary '/\' operator expression
  in binary '<=' operator expression
  in array access
  array access out of bounds

Looking at the problem definition, there actually seems to be an issue in the last line:

%
% EUC-JP (CP51932)
% (A1-A8, AD, B0-F4, F9-FC), (A1-FE)
%
constraint forall (i in index_set(stream)) (
    byte_status[i] = b_euc1 ->
      ((161 <= stream[i] /\ stream[i] <= 168)
       \/ (173 = stream[i])
       \/ (176 <= stream[i] /\ stream[i] <= 244)
       \/ (249 <= stream[i] /\ stream[i] <= 252))
      /\ (161 <= stream[i+1] /\ stream[i+1] <= 254)
);

However, in issue #43, it was explained that in such a case the implication should evaluate to false.

So I am not sure whether this is a bug in mzn2fzn or in the problem definition. Please clarify! Thanks.

@guidotack guidotack closed this in d021e80 Feb 25, 2016

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