1

I can explain to whatever depth is necessary, but the long story short is that my project uses Z3's optimizer to find the maximal solution to what is effectively a SAT problem with weights associated to the boolean variables. Separately to that, another part of my project effectively implements a rule-based saturation engine, which I've lately been considering rewriting using the fixedpoint solver. I thought I could consider the two parts of the problem separately, but it turns out that there is a chicken-and-egg issue where the rule engine requires the solution to the SAT instance in order for its input and output to be correct and meaningful, and that the SAT instance itself is derived from the output of the rule engine. Therefore, I thought I might try to combine Fixedpoint and Optimize. Is this possible? Does it even make sense?

Syzygy
  • 1,754
  • 1
  • 9
  • 12
  • Do you have any quantifiers in your HORN model? Because optimization doesn't work with quantified assertions. – alias Sep 14 '19 at 18:40
  • I'm new to Datalog and the HORN solver. My rule-based saturation engine effectively makes use of "quantifiers" over a finite domain, though it wasn't clear to me from the Z3 tutorial whether I would need explicit quantifiers (e.g. the McCarthy 91 function using `declare-rel` and `rule` doesn't have quantifiers in it, whereas the `SMT-LIB` version does use quantifiers). Does that make a difference? I could effectively instantiate all of the quantifiers if necessary, given the finite domain. – Syzygy Sep 14 '19 at 19:08
  • 1
    Your best bet is to try it out and see what you get. Keep in mind that the optimization engine is standalone, not incremental, and usually doesn't play all that well with all the myriad of theories. (For instance sequences and optimization don't mix all that well.) But without actually knowing your exact problem it's hard to suggest anything. Is there a way you can create a "small" instance of the problem and see what happens? I'd be interested in seeing what you get. – alias Sep 14 '19 at 19:21

0 Answers0