Specify explicitly that repeated monomials in input files are not expected
Fixes #202 .
A note about this has been added in the README file as well as in the tutorial msolve-tutorial.tex.
Couldn't we at least throw an error when this happens? The current behavior of msolve, which exits with a segmentation fault for arbitrary input, really worries me...
Couldn't we at least throw an error when this happens? The current behavior of msolve, which exits with a segmentation fault for arbitrary input, really worries me...
What input do you have in mind, that causes a segmentation fault? (for the one in the linked issue, I thought it would just take the last encountered occurrence of the repeated monomial... ?)
The easiest one I can think of is to take the example in https://github.com/algebraic-solving/msolve?tab=readme-ov-file#input-file-format and remove the comma on the third line.
For this, the README file and the msolve-tutorial.pdf document both specify very clearly that polynomials should be separated by a comma. So we can consider that it is the responsability of the user to respect this requirement. If the user does not respect the specifications, then there are many many ways to trigger segmentation faults in C or with msolve...
This being said, any contribution to improve the file interface would be welcome, I suppose.