TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Modern SAT solvers: fast, neat and underused (2018)

226 点作者 weird_user将近 2 年前

19 条评论

ur-whale将近 2 年前
<a href="https:&#x2F;&#x2F;archive.is&#x2F;zE6eQ" rel="nofollow">https:&#x2F;&#x2F;archive.is&#x2F;zE6eQ</a>
tgamblin将近 2 年前
Love this article and the push to build awareness of what modern SAT solvers can do.<p>It&#x27;s worth mentioning that there are higher level abstractions that are <i>far</i> more accessible than SAT. If I were teaching a course on this, I would start with either Answer Set Programming (ASP) or Satisfiability Modulo Theories (SMT). The most widely used solvers for those are clingo [0] and Z3 [1]:<p>With ASP, you write in a much clearer Prolog-like syntax that does not require nearly as much encoding effort as your typical SAT problem. Z3 is similar -- you can code up problems in a simple Python API, or write them in the smtlib language.<p>Both of these make it easy to add various types of optimization, constraints, etc. to your problem, and they&#x27;re much better as modeling languages than straight SAT. Underneath, they have solvers that leverage all the modern CDCL tricks.<p>We wrote up a paper [2] on how to formulate a modern dependency solver in ASP; it&#x27;s helped tremendously for adding new types of features like options, variants, and complex compiler&#x2F;arch dependencies to Spack [3]. You could not get good solutions to some of these problems without a capable and expressive solver.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;potassco&#x2F;clingo">https:&#x2F;&#x2F;github.com&#x2F;potassco&#x2F;clingo</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;Z3Prover&#x2F;z3">https:&#x2F;&#x2F;github.com&#x2F;Z3Prover&#x2F;z3</a><p>[2] <a href="https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;2210.08404" rel="nofollow">https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;2210.08404</a>, <a href="https:&#x2F;&#x2F;dl.acm.org&#x2F;doi&#x2F;abs&#x2F;10.5555&#x2F;3571885.3571931" rel="nofollow">https:&#x2F;&#x2F;dl.acm.org&#x2F;doi&#x2F;abs&#x2F;10.5555&#x2F;3571885.3571931</a><p>[3] <a href="https:&#x2F;&#x2F;github.com&#x2F;spack&#x2F;spack">https:&#x2F;&#x2F;github.com&#x2F;spack&#x2F;spack</a>
评论 #36093275 未加载
评论 #36091392 未加载
评论 #36090251 未加载
CalChris将近 2 年前
&gt; ... modern SAT solvers are fast, neat and criminally underused by the industry.<p>Modern SAT solvers are fast, neat and criminally <i>undertaught</i> by the universities. Seriously, why isn&#x27;t this taught at the undergraduate level in CS70 [1] discrete math type courses or CS170 [2] analysis of algorithms type courses?<p>[1] <a href="https:&#x2F;&#x2F;www2.eecs.berkeley.edu&#x2F;Courses&#x2F;CS70&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www2.eecs.berkeley.edu&#x2F;Courses&#x2F;CS70&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;www2.eecs.berkeley.edu&#x2F;Courses&#x2F;CS170&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www2.eecs.berkeley.edu&#x2F;Courses&#x2F;CS170&#x2F;</a>
评论 #36088755 未加载
评论 #36089043 未加载
评论 #36089280 未加载
评论 #36088257 未加载
评论 #36093017 未加载
jjoonathan将近 2 年前
I seem to recall that a poorly scaling sat solver in conda-forge broke so badly in 2020 that it shifted the tectonic plates underneath the entire academic python ecosystem away from conda and towards pip.<p><pre><code> Solving Environment | &#x2F; - | \</code></pre>
评论 #36088276 未加载
评论 #36088297 未加载
评论 #36087935 未加载
评论 #36088088 未加载
评论 #36091966 未加载
评论 #36089623 未加载
hackandthink将近 2 年前
Compiling Scala without a SAT solver is probably too difficult.<p>The CNF Converter is a gem.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;scala&#x2F;scala&#x2F;blob&#x2F;v2.13.5&#x2F;src&#x2F;compiler&#x2F;scala&#x2F;tools&#x2F;nsc&#x2F;transform&#x2F;patmat&#x2F;Solving.scala#L50">https:&#x2F;&#x2F;github.com&#x2F;scala&#x2F;scala&#x2F;blob&#x2F;v2.13.5&#x2F;src&#x2F;compiler&#x2F;sca...</a>
评论 #36092530 未加载
c0balt将近 2 年前
Just wanted to shoutout Armin Biere, one of the top contributors in this field: <a href="https:&#x2F;&#x2F;github.com&#x2F;arminbiere">https:&#x2F;&#x2F;github.com&#x2F;arminbiere</a><p>He has a few open source SAT solvers and tooling that provide good and proven examples on modern SAT solver techniques.
wenc将近 2 年前
Conda uses a SAT solver. It is still very slow on degenerate cases and I’m not sure if work to replace it with Microsoft’s SAT solver has started.<p><a href="https:&#x2F;&#x2F;www.anaconda.com&#x2F;blog&#x2F;understanding-and-improving-condas-performance" rel="nofollow">https:&#x2F;&#x2F;www.anaconda.com&#x2F;blog&#x2F;understanding-and-improving-co...</a>
scg将近 2 年前
Mirror: <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20230108202435&#x2F;https:&#x2F;&#x2F;codingnest.com&#x2F;modern-sat-solvers-fast-neat-underused-part-1-of-n&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20230108202435&#x2F;https:&#x2F;&#x2F;codingnes...</a>
yarg将近 2 年前
Has there been any effort to formalise the subset of NP that lends itself to SAT resolution (is there something between x^n and n^x)?<p>For example, what are the defining characteristics of a graphs for which the travelling salesman problem is resolvable without resorting to brute force?
bertman将近 2 年前
Related post (and highly recommended!) from yesterday:<p>The Silent (R)evolution of SAT <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36079115" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36079115</a>
fsckboy将近 2 年前
SAT? I had to look it up, so...<p>Boolean satisfiability problem<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Boolean_satisfiability_problem" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Boolean_satisfiability_problem</a><p>&quot;In logic and computer science, the Boolean satisfiability problem (sometimes called propositional satisfiability problem and abbreviated SATISFIABILITY, SAT or B-SAT) is the problem of determining if there exists an interpretation that satisfies a given Boolean formula. In other words, it asks whether the variables of a given Boolean formula can be consistently replaced by the values TRUE or FALSE in such a way that the formula evaluates to TRUE.&quot;
评论 #36089461 未加载
AdieuToLogic将近 2 年前
&gt; As an example, the often-talked-about dependency management problem, is also NP-Complete and thus translates into SAT[2][3], and SAT could be translated into dependency manager.<p>This reminds me of make[0] and of being made aware that make[0] is a SAT solver. I think it was when I attended a conference. Unfortunately I cannot find an authoritative source to quote, so will rely on, and be grateful to, the HN community to correct me should this be wrong.<p>0 - <a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;make&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;make&#x2F;</a>
abecedarius将近 2 年前
FWIW, here&#x27;s a little console-mode puzzle game of SAT problems, if you want to solve some manually. The &quot;board&quot; is not exactly like the example table in the post, since that one was for Sudoku in particular. This grid represents variables as rows and clauses as columns.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;darius&#x2F;sturm&#x2F;blob&#x2F;master&#x2F;satgame.py">https:&#x2F;&#x2F;github.com&#x2F;darius&#x2F;sturm&#x2F;blob&#x2F;master&#x2F;satgame.py</a> (Python 2)
rojeee将近 2 年前
This brings back memories. In early 2000s, I wrote my undergrad thesis on a survey of SAT solving techniques. I believe the most capable general solver at the time was called DPLL and used a backtracking approach. My key insight at the time was that if you knew the &quot;shape&quot; of the SAT problem (you had domain specific insight) then you could take some shortcuts by using a custom algorithm. Eg this clause is always false and reduce the search space.
comfypotato将近 2 年前
But what do you mean “fast”? If your problem ends up on the steep side of the exponential curve, it’s going to take a while to solve.<p>I had a lot of fun making my own CDCL solver in Rust, and I’ve really enjoyed messing with Z3 for some theoretical computer science. On all of my explorations, there was a very tangible problem size beyond which the solve time was unusable.<p>In the case of Z3 with most real world problems, the typical problem size is beyond this limit.
评论 #36088634 未加载
joko42将近 2 年前
There was a time when people thought SAT and formal logic is the way to building AI. Now you don&#x27;t hear anything about it. I wonder what happened?
评论 #36089688 未加载
评论 #36089949 未加载
评论 #36089560 未加载
andrepd将近 2 年前
And they&#x27;ve only evolved since then! Take a look at SAT COMP, to see the year-on-year evolution of the field.
justicz将近 2 年前
I really love the clarity + practicality of this article. Super well-written.
api将近 2 年前
Does&#x27;t Rust use a SAT solver for aspects of its type system?