1

I have a satisfiability problem written in C++ with Z3, and I'm trying to translate it to SMT-LIB2 which I'm then feeding into CVC4 to solve.

When I print the Z3_solver for the problem (using Z3_solver_to_string()), I believe it's printing in the Z3_PRINT_SMTLIB_FULL form, not Z3_PRINT_SMTLIB2_COMPLIANT (CVC4 throws a Parse Error: unexpected token '(').

I see in the API there's a method called Z3_set_ast_print_mode() to get ASTs in the right SMT-LIB form, but is there a way to do this for the Z3_solver type? Is the solver even the right thing to print here, or should I be printing one of the nodes and sending that to CVC4?

Malte Schwerhoff
  • 12,684
  • 4
  • 41
  • 71
  • 2
    Stack-overflow works the best if you post "actual" code segments people can take a look and play with. See here: https://stackoverflow.com/help/minimal-reproducible-example Please post a code sample illustrating the issue where CVC4 is complaining about the input it receives. – alias Jun 25 '20 at 23:59

0 Answers0