I have a square and a set of line segments, I have to get the location of the square such that it intersects with the most possible number of line segments. I am using Z3 optimizer and C++. I am using a lot of implies and ite statements to calculate the intersection points of each line with the square. It generates the expected results but takes too long time so I am asking if using alot of implies, ite may affect the performane? Is there some configurations that I can use to speedup the execution time
I am not sure this is the best place to ask. Have you considered trying https://github.com/Z3Prover/z3/issues ? Also note that you will have to share your model in more detail, for people to be able to help.
You might also want to consider why specifically you have chosen to use an SMT solver. I am no expert, but i don't necessarily think an SMT solver is the best for this type of problem.
@Peter, Pure Boolean is the scope of SAT solver, whereas Z3 is an SMT solver, where the T stands for Theory. The theory involved in this thread seems to be non-linear real arithmetics, for which Z3 has some support. Also Z3 may be used not only for solving, but also for optimizing.
I agree that @Rehab should provide more details on how he expressed his problem in SMT language (or any other format supported by Z3).
@ David Déharbe I am well aware of what an SMT solver is :) My point was that SMT solvers are designed to be able to mix pure boolean with other theories, and i am questioning whether this particular problem needs a boolean part.