-
Notifications
You must be signed in to change notification settings - Fork 52
Theory behind ZZ #12
Comments
Hi,
the user code is translated into SSA form [1], which is mathematical expressions instead of imperative statements. these expressions are then mixed with assertions that need to be held (such as must-not-overflow). The SMT solver will then try to find counterexamples under which the code will violate the assertions. If none are found, the code is fine. i'd say the major difference to other into-SMT mechanisms is that the SMT form is actually Q_UFBV which means it emulates a concrete machine behaviour rather than an abstract set, including overflow and rounding errors.
it doesn't and cannot check if your program will ever finish. [2]
it does derive from that idea, yes. similar to dafny.
i think you're reffering to the haskell thing?
zz feeds everything you type into the SSA, so the SMT solver can sometimes derive the nessesary quantifiers, but it will SSA is fundamentally undecidable and the SMT solver will need help from the user alot. The link on liquidhaskell you posted is very interesting. i will dig further into it and see what can be learned from it [1] https://en.wikipedia.org/wiki/Static_single_assignment_form |
Could you elaborate? SSA graph may have cycles, so it's possible to walk it infinitely. I guess you can reach some kind of fixed point while evaluating, allowing to solve in cycles? |
ah yes, there's some tricks:
|
hopefully i understand the question correctly. path conditions are implemented as if-this-then expression to every following temporal assignment so
becomes
btw you can inspect the SMT by looking into the files in target/ssa/* |
Maybe looking into the Verified Concurrent C Compiler from Microsoft could be interesting. They used Z3 as SMT solver and hoare calculus using First Order Logic for assertions. They even had an interesting model for concurrent access from different threads. IIRC they used it to verify Hyper-V. |
Chiming in here (hello Arvid! long time no see :) ), this project also reminds me strongly of FramaC, which allows proving pretty high level properties on your code. FramaC is however still quite immature (or was when I used it 1 year ago) and messy at times... It's a very active project though, so maybe it's more stable now! |
Adrieeen! i'd suggest a catch up meeting but covid so nope. frama looks a lot more complete than what zz has at this point. unfortunately the code has a messy license, so that's not something that's reusable, but the associated papers sure are something i want to read. |
The README is extremely vague on this. How does it actually work?
Specifically, I have the following questions:
The text was updated successfully, but these errors were encountered: