Maybe you should play with heuristics to get a good enough solution quickly. Or change solver to something more appropriate for what you are modelling
Programmer Humor
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
- If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.
Based on my other comment, do you have any in mind that would be more appropriate?
I think a "constraint propagation" based solver should work well. So you can try using minizinc and play with the solvers it gives you. Using gecode and heuristics it can get very fast (try using relax_and_reconstruct, together with restart_luby and indomain_random, to obtain a simple LNS. Or you can use Google's OR tools solver, that is based on ILP and is very fast, and can run multithreaded.
You can also go fully ILP, and model your problem in ampl, and try some free (e.g. glpk) or commercial (e.g. gurobi) ILP solver.
I doubt it helps, but there's always SMT solvers (e.g. cvc5), which I don't think can be faster but is surely easier to model than a pure SAT. And there's also ASP solvers like clingo (clasp+gringo), that are purely logic based and implement common-sense-reasoning.
What, specifically, are you trying to solve?
For each operation my CPU's ALU can do, I need to find a bit mask that turns it on only for the desired set of 8 bit opcodes. The bit mask is of the form [01_].[01_][01_][01_][01_][01_][01_][01_][01_] where 0 and 1 mean the bit has to match and _ means it doesn't matter. The bit before the . is the xor of all the other bits in the opcode.
The solver has to figure out both which opcodes represent each instruction and what bit masks are needed to give them the desired operations.
I'm just excited that Z3 has a parallel mode now. Last time I was using it much, it was only single core.