potassco / flatzingo

:flamingo: A flatzinc frontend for clingcon
MIT License
6 stars 1 forks source link

Failed Minizinc unit tests #40

Open MaxOstrowski opened 2 years ago

MaxOstrowski commented 2 years ago

Minizinc unit tests of the same hash fail to unknown cause.

MaxOstrowski commented 2 years ago

This is due to output bevaviour. For some tests the expected output is:

x = 10;
----------

but we output

x = 10;
----------
%%%mzn-stat: models=1
%%%mzn-stat: time=0.038
==========

The last line states that the search was complete. For clasp, a search for 1 model only is complete, for minizinc, it is not. Currently I would need to parse the input (time costly) to check for optimization statements to make a correct decision for the output. Maybe using the python interface of clingcon can help determine the actual output status...

Edit: Models : 1+ the + could be used to determine search is not yet complete. Unfortunately, the asserting tests are all trivial for preprocessing s.t. clasp already can determine that there exists only exactly one model.

Fazit: I do not know how to fix this, the output format of minizinc is hard to produce given the output of such a "clever" system such as clasp.