Closed acieroid closed 3 years ago
Thanks for reporting this. Unfortunately, I haven't been following development in smtlib in the last few years. But here are some of my thoughts.
Generally, I have tried to follow the official SMT-LIB standard (http://smtlib.cs.uiowa.edu/language.shtml) for how to implement the parsers. If the standard has moved on to removing model, then I think the best is to just update the library and remove model (without backward-compatibility). If that's a Z3-specific extension, then probably we should support both the standard and a Z3-specific parser. If that's a Z3-specific extension, it's also possible that they have a flag to behave in an SMT-LIB-complient way, if that's the case the best is probably to run them in this mode.
That's all theoretical because I haven't checked the latest developments in Z3/SMT-LIB. I'll try to take a look when I have some time.
Actually it's much simpler than that, https://github.com/regb/scala-smtlib/pull/39/commits should be handling both cases fine.
Thank you for taking the time to fix it!
System info:
Using the latest commit of scala-smtlib, models are not annotated with the
model
symbol anymore, for example a model return by the latest z3 is the following:While on older version, it was:
No unit test is currently broken because they use hard-coded models. The fix is quite simple in essence: removing lines 130 to 133 of
ParserCommandResponses
is enough to get responses to parse again. This has to be mirrored in the printer too.However, properly fixing it probably requires dealing with both the old and the new format.