Sat4j maxsat does not pick the right reader with an arbitrary extension
When a new user of sat4j tries to solve a partial weighted maxsat problem, it is likely that the extension used may not be the expected wcnf.
In that case, the default solver is the cnf one, which will wrongly interpret the content of the file, i.e. will treat the first number, the weight, as a literal.
There are several ways to solve this:
- do not use the extension to decide of the reader
- display an error message if the wncf extension is seen by the classical Dimacs reader.
The latter is probably the best option.