You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Please improve readability of compiler output #147
As author of a FlatZinc backend, I frequently read output of mzn2fzn and there are two things that make reading it harder than necessary:
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.
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.
I've pushed a fix so that variables with numeric ids will now be printed as X_INTRODUCED_n_ (with a trailing underscore).
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.
Activity
Print additional underscore after numeric id for X_INTRODUCED variabl…
guidotack commentedon Feb 27, 2017
informarte commentedon Mar 4, 2017
Thanks for the trailing underscore!
Print additional underscore after numeric id for X_INTRODUCED variabl…