Skip to content

Please improve readability of compiler output #147

Closed

Description

@informarte

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.

Activity

  1. added a commit that references this issue on Feb 27, 2017
    f8fb376
  2. guidotack commented on Feb 27, 2017

    @guidotack
    Member
    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.
  3. informarte commented on Mar 4, 2017

    @informarte
    Author

    Thanks for the trailing underscore!

  4. added a commit that references this issue on Mar 16, 2017
    b016530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions