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

Please improve readability of compiler output #147

informarte opened this Issue Feb 25, 2017 · 2 comments


None yet
2 participants

informarte commented Feb 25, 2017

As author of a FlatZinc backend, I frequently read output of mzn2fzn and there are two things that make reading it harder than necessary:

  1. Introduced variables have a number, e.g. X_INTRODUCED_22. So when searching for occurrences of this variable, we also find X_INTRODUCED_220, etc, unless one uses a regexp. This problem could be avoided by introducing leading 0s, e.g. X_INTRODUCED_0022, as mzn2fzn 1.6 did it.

  2. It seems to me that mzn2fzn introduces a new variable for each problem variable and then often uses the introduced variable instead of the problem variable. This behaviour makes it very hard to connect the FlatZinc model to the MiniZinc model. I remember that mzn2fzn 1.6 used the problem variables and that its output was way more readable.

guidotack added a commit that referenced this issue Feb 27, 2017

Print additional underscore after numeric id for X_INTRODUCED variabl…
…es, to make it easier to debug the generated FlatZinc. Fixes #147.

This comment has been minimized.


guidotack commented Feb 27, 2017

  1. I've pushed a fix so that variables with numeric ids will now be printed as X_INTRODUCED_n_ (with a trailing underscore).
  2. We will add functionality to generate a mapping from FlatZinc names to MiniZinc names soon (as a separate output, without modifying the generated FlatZinc). It should be very easy to write a little tool that applies the mapping to the generated FlatZinc as well.

This comment has been minimized.

informarte commented Mar 4, 2017

Thanks for the trailing underscore!

@guidotack guidotack closed this in b016530 Mar 16, 2017

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