News for hackers. Stuff that matters.
Re:Modern SAT solvers: fast, neat and underused (2018) by klodolph on Friday May 26, 2023 @03:02PM (#36088297)
From this and Dart, I think one of the lessons here is that SAT solvers are the wrong technique for solving dependencies. SAT solvers find “better” solutions by some metric, but humans using package managers want something which is both simpler and faster.
Re:Modern SAT solvers: fast, neat and underused (2018) by nyrikki on Friday May 26, 2023 @03:22PM (#36088498)
As an example:

Schaefer's dichotomy theorem shows that, when possible, just make sure to use Horn clauses when possible.

Takes a bit of thinking but is superior to huristics or SAT solvers if you can refactor to allow for it.

Re:Modern SAT solvers: fast, neat and underused (2018) by xavxav on Friday May 26, 2023 @03:34PM (#36088618)
Wait, this is very relevant to some work I’ve been doing recently, how do you conclude that Horn clauses should be preferred from Schaefer’s theorem?
Re:Modern SAT solvers: fast, neat and underused (2018) by thomasahle on Friday May 26, 2023 @03:54PM (#36088795)
Isn't it just that Horn clauses are easy to understand, and they are guaranteed to be fast.
Re:Modern SAT solvers: fast, neat and underused (2018) by Karrot_Kream on Friday May 26, 2023 @04:02PM (#36088881)
Take a look at https://en.wikipedia.org/wiki/Boolean_satisfiability_problem... (based on Schaefer's "The complexity of satisfiability problems"). Horn clause satisfiability problems (HORN SAT) fall in P-c.
Re:Modern SAT solvers: fast, neat and underused (2018) by xavxav on Saturday May 27, 2023 @04:37AM (#36093047)
Oh right this is just Horn clauses, not CHCs
Re:Modern SAT solvers: fast, neat and underused (2018) by weavermarquez on Friday May 26, 2023 @04:07PM (#36088932)
Not sure if related, to Schaefer's theorem, but I dove into Answer Set Programming [1] recently, which follows this approach, enabling the use of fast-ish SMT solvers, which are a generalization of SAT solvers! Boolean/Propositional Logic is to Predicate Logic as SAT is to SMT. There's a very nice course about it from the developers of Potassco, one of the best open source Answer Set Programming framework [2].

The syntax looks like Prolog, but predicate negations are a first class citizen, avoids infinite loops.

Prolog's approach is like a depth first search through a search tree -- ASP is like a nondeterministic turing machine, exploring all branches simultaneously from the bottom up.

[1] https://en.wikipedia.org/wiki/Answer_set_programming

[2] https://www.youtube.com/playlist?list=PL7DBaibuDD9O4I05DiQfi...

Re:Modern SAT solvers: fast, neat and underused (2018) by tgamblin on Friday May 26, 2023 @08:36PM (#36091011)
Dart as in the language? Dart uses a SAT solver: https://github.com/dart-lang/pub/blob/master/doc/solver.md
Re:Modern SAT solvers: fast, neat and underused (2018) by taeric on Friday May 26, 2023 @08:55PM (#36091092)
My gut is that was the point? That Dart uses a SAT solver to no discernible advantage.

I will also note that this amuses me to no end. If you have enough dependencies that you need the speed of a SAT solver.... how many dependencies do you have? And why are they changing so dang much?

Re:Modern SAT solvers: fast, neat and underused (2018) by g8oz on Saturday May 27, 2023 @10:35AM (#36095154)
The ship of complexity has long sailed for many projects.
Re:Modern SAT solvers: fast, neat and underused (2018) by taeric on Saturday May 27, 2023 @03:48PM (#36097622)
I imagine most individual projects are still low enough in dependencies that you still have to try for that to be the slow part.