ipasir icon indicating copy to clipboard operation
ipasir copied to clipboard

Enhancement for ipasir.h

Open wadoon opened this issue 6 years ago • 5 comments

Hi Tomas,

I implemented an ipasir adapter for dlang.

I have several requests for enhancements:

  • [ ] The makefile should allow to build only minisat or picosat static objects.
  • [ ] The ipasir_signature should only return the signature (name + version) and not the statistics (seen for minisat). Here a separate extension would be nice: ipasir_statistics().
  • [ ] Currently it is only possible to link against one sat at the same time (w/o using ld). It would be nice to have a several ipasir-declaration foreach solver, e.g. ipasir_minisat_signature, and then I can configure ipasir.h to control to which ipasir_XXX_signature function the function ipasir_signature should point to.
#ifndef SOLVER
#error "..."
#endif

char* ipasir_signature() { return ipasir ## SOLVER ## signature ();} //not guarantee for syntax.

Usage:

#include "ipasir_minisat.h" // defines SOLVER as "minisat"
#include "ipasir.h" // defines SOLVER 
...

wadoon avatar Feb 08 '19 02:02 wadoon