libminizinc
libminizinc copied to clipboard
Option to pass fzn via stdin instead of temp file
Adds a flag (--use-stdin) to the MZN-FZN plugin to pass the fzn to a solver directly via stdin instead of writing to a temp file and passing the name of the file
Thanks for the contribution, this is something I'd like to incorporate. At the moment, it looks like the solver can either accept stdin or a file, right? I would prefer it if we could introduce a standard solver command line flag --use-stdin
so that solvers know what to expect. That way, a solver can signal in their configuration file that they support the option, and the MiniZinc driver can automatically choose to send the FlatZinc via stdin. And please change the MiniZinc command line option to --pipe-flatzinc
, because --use-stdin
could be confused as meaning the compiler input rather than output. The driver could then automatically activate --pipe-flatzinc
whenever the solver signals support for the --use-stdin
option.