TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Z3 Theorem Prover released under MIT license

304 pointsby dahliaabout 10 years ago

15 comments

tompabout 10 years ago
Amazing!<p>When I was prototyping a programming language with support for <i>contracts</i> (or <i>refined types</i>, e.g. `x : int if x &gt; 0`), I tested a few different SMT solvers, including AltErgo, CVC and Yices (these seemed to be the most used open source solvers).<p>However, none of them were nearly as useful as Z3. In particular, they had no concept of a <i>stack</i> that allows the user to define different assertions <i>locally</i>, and then cancel them later. Without the stack, one would need to restart the solver and re-declare all variables (with all their constraints) for every function call with a constraint, compared to a single SMT script for each function verified in Z3.<p>Also, Z3 supports much more theories, in particular it supports non-linear integer arithmetics (which is an undecidable, incomplete theory), either by using some heuristics, or by translating the statements into the theory of real arithmetics (which is complete and decidable).
panicabout 10 years ago
For one example of why Z3 is cool, check out this application to &quot;peephole&quot; compiler optimizations: <a href="http://blog.regehr.org/archives/1170" rel="nofollow">http:&#x2F;&#x2F;blog.regehr.org&#x2F;archives&#x2F;1170</a><p>Also take a look at the &quot;licensing&quot; section to see why switching to the MIT license is a big deal. Even open source software projects like LLVM have had to worry about whether using Z3 was OK or not. Now they don&#x27;t any more!
pavpanchekhaabout 10 years ago
I&#x27;m working with Z3 now, and it&#x27;s been a real joy. One of the biggest advances in programming languages in recent years, perhaps. Glad to see it open-sourced and moved to Github.
评论 #9274833 未加载
评论 #9272814 未加载
评论 #9272697 未加载
tsomctlabout 10 years ago
Note that the Z3 source code has been available for a while, but a commercial license was $10,000.
评论 #9273344 未加载
评论 #9273275 未加载
hokkosabout 10 years ago
I hope they will open source Microsoft.Automata too, it was very useful for a project where I had to generate samples of strings that had to conform to multiple regex :<p><a href="http://research.microsoft.com/en-us/projects/automata/" rel="nofollow">http:&#x2F;&#x2F;research.microsoft.com&#x2F;en-us&#x2F;projects&#x2F;automata&#x2F;</a>
评论 #9273621 未加载
tluyben2about 10 years ago
Great project by MS research: good to see they picked a great license! See <a href="http://rise4fun.com" rel="nofollow">http:&#x2F;&#x2F;rise4fun.com</a> for more great projects like that.
jrapdx3about 10 years ago
z3 is something I didn&#x27;t know about until encountering it here. Spent the last few hours playing with the solver, it&#x27;s quite interesting especially since I&#x27;ve had a fair amount of exposure to Scheme. Felt right at home after getting it up and running.<p>Glitch-free compiling and installing under FreeBSD. The only problem was finding documentation. Rise4fun.com is mentioned in another post, the exact URL for getting started is <a href="http://rise4fun.com/Z3/tutorial/guide" rel="nofollow">http:&#x2F;&#x2F;rise4fun.com&#x2F;Z3&#x2F;tutorial&#x2F;guide</a>. Also, very useful information here-- <a href="http://www.smt-lib.org/" rel="nofollow">http:&#x2F;&#x2F;www.smt-lib.org&#x2F;</a>
harperleeabout 10 years ago
Could please someone informed explain how is this more restricted to only prove theorems, instead of being a more general prolog-like system?<p>From the Microsoft Research page, I read:<p>&gt; <i>Z3 is a high-performance theorem prover being developed at Microsoft Research. Z3 supports linear real and integer arithmetic, fixed-size bit-vectors, extensional arrays, uninterpreted functions, and quantifiers. Z3 is integrated with a number of program analysis, testing, and verification tools from Microsoft Research.</i><p>And with my current knowledge (which is low on the matter) I can&#x27;t reconcile arithmetic, arrays, quantifiers, etc. with general program verification...
评论 #9272721 未加载
评论 #9272701 未加载
评论 #9272809 未加载
cslabout 10 years ago
I&#x27;ve used model checkers before, but never SMT solvers. Looks really cool!<p>Anyway, here&#x27;s a great post on solving a Project Euler problem using Z3&#x2F;SMT-lib, which may be inspiring for other novices like myself:<p><a href="http://blogs.teamb.com/craigstuntz/2014/07/07/38818/" rel="nofollow">http:&#x2F;&#x2F;blogs.teamb.com&#x2F;craigstuntz&#x2F;2014&#x2F;07&#x2F;07&#x2F;38818&#x2F;</a>
1risabout 10 years ago
This is really huge.<p>Maybe Idris or Coq integrate Z3.
评论 #9273389 未加载
评论 #9273504 未加载
评论 #9273431 未加载
fugykabout 10 years ago
You can try Z3 online here: <a href="http://rise4fun.com/Z3/" rel="nofollow">http:&#x2F;&#x2F;rise4fun.com&#x2F;Z3&#x2F;</a>
cjdrakeabout 10 years ago
This is a really great library. Thanks to Microsoft :).
fit2ruleabout 10 years ago
Could someone who knows about these things, compare Z3 with the Google or-tools? (<a href="https://code.google.com/p/or-tools/" rel="nofollow">https:&#x2F;&#x2F;code.google.com&#x2F;p&#x2F;or-tools&#x2F;</a>)<p>Pro&#x27;s&#x2F;Con&#x27;s of the two?
frikabout 10 years ago
I heard Microsoft uses provers to check (automated verification) third party kernel mode device drivers. Is that the Z3 proofer? I searched on Google and got several results but the meaning of the term &quot;kernel&quot; is overloaded and means different things in operating systems and proofers&#x2F;solvers.
评论 #9272766 未加载
评论 #9272752 未加载
评论 #9272742 未加载
bbcbasicabout 10 years ago
I wonder, does Code Contracts use Z3?
评论 #9273399 未加载