nmanthey / riss-solver

sequential and parallel SAT solver
GNU Lesser General Public License v2.1
8 stars 3 forks source link

using incorrect flags in coprocessor deletes the input CNF #14

Open max-waters opened 6 years ago

max-waters commented 6 years ago

Mis-spelling a flag when running coprocessor results in the input file being deleted. For example:

./coprocessor -TYPO -dimacs=preprocessed -enabled_cp3 -bve input

Resuls in this output:

c ERROR! Could not open file: -TYPO

And the file input is now empty!

conp-solutions commented 6 years ago

Hi,

yes, that is a known issue. For the tool it is hard to recognize whether a typo is a typo or whether it's an actual file name. I could teach Coprocessor to not accept files that start with a '-' as input, but that does not seem to be the right approach.

As an alternative, the output file could be opened later in the process. This would allow to ignore a few of the cases where the output file is erased by mistake.

Best, Norbert

PS: I moved the source here: https://github.com/conp-solutions/riss and will likely remove this repository soonish.