Status of the string theory #4939
Replies: 10 comments 16 replies
-
Some comments: There are two string solvers are available. seq (default) and z3str3. First of all I do not advertise the seq solver as rock solid and certainly not scrutinized to the level of the arithmetic and bit-vector solvers. A good deal of the fuzz-bugs are about obscure corner cases, |
Beta Was this translation helpful? Give feedback.
-
I will be moving to unicode support pretty soon. It is currently being tested. Once it is turned on by default users can enter unicode characters in ASCII strings @mtrberzi - this is a good point to make sure theory_str works with the global option "unicode=true" from the command-line. |
Beta Was this translation helpful? Give feedback.
-
That is a great point. I will work on the Unicode support for an upcoming PR. This should not be too much work, but there are a few places where we assume ASCII in legacy code and I will need to go through and make sure this is done properly. |
Beta Was this translation helpful? Give feedback.
-
Unicode support is basically ready now.
It is clear that 2 breaks theory_str (it uses a character table and automata transitions based on 256 characters) There is also a module called "seq_char" that handles character reasoning. It is basically equality reasoning for character and uses lazy bit-blasting to ensure bounds and comparisons between characters. It would be wise to use this layer. It already provides a 40% or so speedup in QF_SLIA benchmark sets over the bit-vector encoding even as it switches from ASCII to unicode that in the limit require 18 bits instead of 8. I would therefore like to move on from the ASCII world and be SMTLIB2 compliant by default. Given the performance advantages, as well, I would flip the default for "unicode" from false to true by end of next week. |
Beta Was this translation helpful? Give feedback.
-
Sounds good. I'll make the Unicode port a priority. I'm under a deadline for paper submission but I should be able to make good progress in the next week or so. |
Beta Was this translation helpful? Give feedback.
-
Feel free to ask me to test things like the Python bindings! |
Beta Was this translation helpful? Give feedback.
-
@NikolajBjorner is there any plan to make I should be able to change the sort that is used for characters to the |
Beta Was this translation helpful? Give feedback.
-
A first class theory solver requires some more infrastructure and therefore cycles to implement. |
Beta Was this translation helpful? Give feedback.
-
That is strange, because I do initialize the character solver in smt_setup
when theory_str is set up. However, I am also invoking a subsolver with a
new smt::kernel. This is where the char assertions get solved. If the char
type is BV but I don't set the logic to QF_BV in the new kernel I don't get
a model at all. I tried QF_BVRE because it has both bitvectors and
sequences (therefore chars) but don't get a model this way either.
…On Thu, Jan 28, 2021, 1:10 AM Nikolaj Bjorner, ***@***.***> wrote:
(_ Char NNN) is the function that creates a constant of type Unicode.
It should not be mixed up with the SMTLIB2 version (_ char NNN), which
returns a String.
Regarding the first model issue: Maybe you want to add a line in
smt_setup.cpp to register theory_char whenever theory_str is registered.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4939 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHZE6BUHB6E6AWCJC35Y2LS4EEXBANCNFSM4VZUOFJA>
.
|
Beta Was this translation helpful? Give feedback.
-
Opened #4981 |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm working on program verification/bug-finding and would like to use z3 as part of that. It seems that arithmetic and bit vectors get a lot of attention, so was curious to hear how robust the string solver in z3 is. Are the soundness bugs in the tracker relatively obscure corner cases, or is the theory still a little immature?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions