<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>SAT on Wonderings of a SAT geek</title>
    <link>https://www.msoos.org/tags/sat/</link>
    <description>Recent content in SAT on Wonderings of a SAT geek</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <lastBuildDate>Sun, 01 Mar 2026 18:34:45 +0000</lastBuildDate>
    <atom:link href="https://www.msoos.org/tags/sat/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Ganak: The Making of a Versatile, High Performance Model Counter</title>
      <link>https://www.msoos.org/2026/03/ganak-the-making-of-a-versatile-high-performance-model-counter/</link>
      <pubDate>Sun, 01 Mar 2026 18:34:45 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=3631</guid> 
      <description>&lt;p&gt;Ganak (&lt;a href=&#34;https://github.com/meelgroup/ganak&#34;&gt;github&lt;/a&gt;), our propositional model counter, has won every single model counting competition track for the past two years. Perhaps it&amp;rsquo;s time to explain how that came about, and what are the ingredients of such a tool. Firstly, a propositional model counter is a tool that counts how many solutions there are to a set of boolean constraints of the form:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;a V b
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;b V -c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This set of constraints has the following possible solutions:&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Inprocessing API of CryptoMiniSat</title>
      <link>https://www.msoos.org/2023/10/the-inprocessing-api-of-cryptominisat/</link>
      <pubDate>Sun, 01 Oct 2023 14:08:37 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=3512</guid> 
      <description>&lt;p&gt;Many modern SAT solvers do a lot of what&amp;rsquo;s called inprocessing. These steps simplify the CNF into something that is easier to solve. In the compiler world, these are called &lt;a href=&#34;https://en.wikipedia.org/wiki/Rewriting&#34;&gt;rewritngs&lt;/a&gt; since the effectively rewrite (parts of) the formula to something else that retain certain properties, such as satisfiability. One of the most successful such rewrite rules for CNF is Bounded Variable Elimination (BVE, &lt;a href=&#34;https://fmv.jku.at/papers/EenBiere-SAT05.pdf&#34;&gt;classic paper here&lt;/a&gt;), but there are many others. These rewrites are usually done by modern SAT solvers in a particular order that was found to be working well for their particular use-case, but they are not normally accessible from the outside.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Checking Uniform-Like Samplers</title>
      <link>https://www.msoos.org/2022/06/checking-uniform-like-samplers/</link>
      <pubDate>Thu, 23 Jun 2022 09:53:56 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=3410</guid> 
      <description>&lt;p&gt;Uniform sampling is pretty simple: there are a set of solutions to a set of equations, and I want you to give me N solutions uniformly at random. Say, I have a set of equations that only has the solutions x=1&amp;hellip;6, and I ask you to give me solutions uniformly at random. In this case, if the system is not cheating, it should give me solutions exactly like a random dice would give: 1..6, each with the same probability of 1/6. Now, if you give me nothing but 1&amp;rsquo;s I&amp;rsquo;d be slightly confused, and eventually would think you may be trying to cheat.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CryptoMiniSat 5.6.3 Released</title>
      <link>https://www.msoos.org/2018/06/cryptominisat-5-6-3-released/</link>
      <pubDate>Mon, 11 Jun 2018 07:21:29 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=3166</guid> 
      <description>&lt;p&gt;The latest CryptoMiniSat, version 5.6.3 has been &lt;a href=&#34;https://github.com/msoos/cryptominisat/releases/tag/5.6.3&#34;&gt;released&lt;/a&gt;. This release marks the 12&#39;000th commit to this solver that has weathered more than I originally intended it to weather. It&amp;rsquo;s been an interesting ride, and I have a lot to thank &lt;a href=&#34;http://www.comp.nus.edu.sg/~meel/&#34;&gt;Kuldeep&lt;/a&gt; and &lt;a href=&#34;https://www.nscc.sg/&#34;&gt;NSCC&lt;/a&gt;&amp;rsquo;s ASPIRE-1 cluster for this release. I have burned over 200k CPU hours to make this release, so it&amp;rsquo;s a pretty well-performing release (out-performing anything out there, by a wide margin), though I&amp;rsquo;m working &lt;em&gt;very&lt;/em&gt; hard to make sure that neither I nor anyone else will have to burn anything close to that to make a well-performing SAT solver.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CryptoMiniSat 3.0 released</title>
      <link>https://www.msoos.org/2013/04/cryptominisat-3-0-released/</link>
      <pubDate>Mon, 01 Apr 2013 15:57:57 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=1541</guid> 
      <description>&lt;p&gt;CryptoMiniSat 3.0 has been &lt;a href=&#34;https://gforge.inria.fr/frs/?group_id=1992&#34;&gt;released&lt;/a&gt;. I could talk about how it&amp;rsquo;s got a dynamic, web-based statistics interface, how it has more than 80 options, how it uses no glues for clause-cleaning and all the other goodies, but unfortunately these don&amp;rsquo;t much matter if the speed is not up to par. So, here is the result for the &lt;a href=&#34;http://www.satcompetition.org/2009/&#34;&gt;2009 SAT Competition&lt;/a&gt; problems on a 1000s timeout with two competing solvers, &lt;a href=&#34;http://fmv.jku.at/lingeling/&#34;&gt;lingeling&lt;/a&gt; and &lt;a href=&#34;https://www.lri.fr/~simon/?page=glucose&#34;&gt;glucose&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;cryptoms_speed&#34; loading=&#34;lazy&#34; src=&#34;https://www.msoos.org/wordpress/wp-content/uploads/2013/04/lingeling-glucose-cryptoms.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;This of course does not mean that CryptoMiniSat is faster than the other solvers in general. In fact it is slower on a number of instances. What it means is that in general it&amp;rsquo;s OK and that&amp;rsquo;s good enough for the moment. It would be awesome to run the above experiment (or a similar one) with a longer timeout. Unfortunately, I don&amp;rsquo;t have a cluster to do that. However, if you have access to one, and would be willing to help with running the 3 solvers on a larger timeout, please do, I will post the updated graph here.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Visualizing SAT solving</title>
      <link>https://www.msoos.org/2012/06/visualizing-sat-solving/</link>
      <pubDate>Sat, 16 Jun 2012 13:02:55 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=1228</guid> 
      <description>&lt;figure&gt;&lt;a href=&#34;https://www.msoos.org/sat_visualization/&#34;&gt;
    &lt;img loading=&#34;lazy&#34; src=&#34;https://www.msoos.org/wordpress/wp-content/uploads/2012/06/sat_visualization_snapshot_small.png&#34;
         alt=&#34;Visualizing the solving of mizh-md5-47-3.cnf&#34;/&gt; &lt;/a&gt;&lt;figcaption&gt;
            &lt;p&gt;Visualizing the solving of mizh-md5-47-3.cnf&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Visualizing what happens during SAT solving has been a long-term goal of mine, and finally, I have managed to pull together something that I feel confident about. The system is fully explained in the &lt;a href=&#34;https://www.msoos.org/sat_visualization/&#34;&gt;liked&lt;/a&gt; &lt;a href=&#34;https://www.msoos.org/sat_visualization/&#34;&gt;i&lt;/a&gt; mage on the right, including how to read the graphs and why I made them. Here, I would like to talk about the challenges I had to overcome to create the system.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The variable speed of SAT solving</title>
      <link>https://www.msoos.org/2011/01/the-variable-speed-of-sat-solving/</link>
      <pubDate>Sun, 02 Jan 2011 22:37:46 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=588</guid> 
      <description>&lt;figure&gt;
    &lt;img loading=&#34;lazy&#34; src=&#34;https://www.msoos.org/wordpress/wp-content/uploads/2011/01/Attacking-Bivium-Using-SAT-Solvers.png&#34;
         alt=&#34;Timings from the article &amp;ldquo;Attacking Bivium Using SAT Solvers&amp;rdquo;. The authors didn&amp;rsquo;t seem to have randomised the problems enough: the time to solve should increase exponentially, but instead it goes up and down like a roller coaster&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;Timings from the article &amp;ldquo;Attacking Bivium Using SAT Solvers&amp;rdquo;. The authors didn&amp;rsquo;t seem to have randomised the problems enough: the time to solve should increase exponentially, but instead it goes up and down like a roller coaster&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;</description>
    </item>
    <item>
      <title>Optimisations, take two</title>
      <link>https://www.msoos.org/2010/06/optimisations-take-two/</link>
      <pubDate>Sat, 12 Jun 2010 19:50:00 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/wordpress/?p=14</guid> 
      <description>&lt;p&gt;I have talked about &lt;a href=&#34;http://msoos.blogspot.com/2010/04/optimisations.html&#34;&gt;optimisations&lt;/a&gt; before and I mentioned that there are a few left to describe. In this post I will talk about two of them.&lt;/p&gt;
&lt;p&gt;The first optimisation I would like to talk about concerns compilation flags. Somehow, everyone seems obsessed with them, like if they could somehow make a slow program fast. Alas, this is not the case. Firstly, and this is quite funny: the &lt;a href=&#34;http://gcc.gnu.org/&#34;&gt;gcc&lt;/a&gt; flag &amp;ldquo;&lt;a href=&#34;http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html&#34;&gt;-O3&lt;/a&gt;&amp;rdquo; usually turns on all extra flags that people tend to give. One should really ponder upon this when looking at desperate attempts to speed up code. However, there is exactly one flag-combo that is very-very useful besides &amp;ldquo;-O3&amp;rdquo;: it&amp;rsquo;s &amp;ldquo;-fprofile-generate&amp;rdquo; and &amp;ldquo;-fprofile-use&amp;rdquo;. To understand why these are useful, we must first understand that one of the challenges faced by an optimising compiler is to try to guess how many times a loop will be executed,and how many times a branch will be taken. Given a good set of guesses, the loop can be unwound (or not) and the branches can be taken by default (or not). If compiled with &amp;ldquo;-fprofile-generate&amp;rdquo;, the program generates such information on-the-fly, which later can be used by &amp;ldquo;-fprofile-use&amp;rdquo;. The speedup achieved with such an approach in the realms of DPLL-based SAT solvers is relatively high, in the order of ~5-10%. I believe many SAT solvers&amp;rsquo; binaries don&amp;rsquo;t use this trick, even though it&amp;rsquo;s cheap to use. I personally compile with &amp;ldquo;-fprofile-generate&amp;rdquo;, then run an example problem like &lt;a href=&#34;http://www.cril.univ-artois.fr/SAT09/results/bench.php?idev=29&amp;amp;idbench=71050&#34;&gt;UTI-20-10p1&lt;/a&gt; on it, and then recompile with &amp;ldquo;-fprofile-use&amp;rdquo;. An important aspect, by the way, is to execute your problem with a very typical scenario: strange or non-normal scenarios will produce spurious branching and loop data which will actually slow down the program most of the time instead of speeding it up.&lt;/p&gt;</description>
    </item>
    <item>
      <title>On failed literal probing</title>
      <link>https://www.msoos.org/2010/05/on-failed-literal-probing/</link>
      <pubDate>Mon, 17 May 2010 23:11:00 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/wordpress/?p=19</guid> 
      <description>&lt;p&gt;Apparently, there have been &lt;a href=&#34;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.24.6395&amp;amp;rep=rep1&amp;amp;type=pdf&#34;&gt;quite&lt;/a&gt; &lt;a href=&#34;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.25.1063&#34;&gt;some&lt;/a&gt; &lt;a href=&#34;http://www.eecs.umich.edu/%7Evaleria/research/publications/IWLS06SAT.pdf&#34;&gt;work&lt;/a&gt; done on failed literal probing, although I don&amp;rsquo;t think they have all been put into a common package yet.&lt;/p&gt;
&lt;p&gt;The idea is quite simple in its purest form: try to set variable &lt;code&gt;v1&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; and see if that fails. If it does, variable &lt;code&gt;v1&lt;/code&gt; must be &lt;code&gt;false&lt;/code&gt;. If it doesn&amp;rsquo;t fail, try the other way around: set it to &lt;code&gt;false&lt;/code&gt; and if that fails, it must be &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
