<?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>bug on Wonderings of a SAT geek</title>
    <link>https://www.msoos.org/tags/bug/</link>
    <description>Recent content in bug on Wonderings of a SAT geek</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <lastBuildDate>Wed, 18 Dec 2013 01:34:15 +0000</lastBuildDate>
    <atom:link href="https://www.msoos.org/tags/bug/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>On variable renumbering</title>
      <link>https://www.msoos.org/2013/12/on-variable-renumbering/</link>
      <pubDate>Wed, 18 Dec 2013 01:34:15 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=2198</guid> 
      <description>&lt;p&gt;Variable renumbering in SAT solvers keeps a mapping between the external variable numbers that is visible to the users and the internal variable numbers that is visible the to the system. The trivial mapping that most SAT solvers use is the one-to-one mapping where there is no difference between outer and internal variables. A smart mapping doesn&amp;rsquo;t keep track of all data related to variables that have been set or eliminated internally, so the internal datastructures can be smaller.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My SAT solver fuzzing setup</title>
      <link>https://www.msoos.org/2013/08/my-sat-solver-fuzzing-setup/</link>
      <pubDate>Sun, 25 Aug 2013 15:12:03 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=2023</guid> 
      <description>&lt;p&gt;Since the SAT solver &lt;a href=&#34;https://en.wikipedia.org/wiki/Fuzz_testing&#34;&gt;fuzzing&lt;/a&gt; &lt;a href=&#34;http://fmv.jku.at/papers/BrummayerLonsingBiere-SAT10.pdf&#34;&gt;paper&lt;/a&gt; by Brummayer, Lonsing and Biere, SAT solver fuzzing has been quite the thing in the SAT community. Many bugs have since been discovered in almost all SAT solvers, including those of this author. In this blog post I will detail my SAT fuzzing setup: what fuzzers I use and how I use them.&lt;/p&gt;
&lt;h3 id=&#34;my-fuzzers&#34;&gt;My fuzzers&lt;/h3&gt;
&lt;p&gt;The most obvious fuzzers to use are those present in the paper and accompanying &lt;a href=&#34;http://fmv.jku.at/fuzzddtools/&#34;&gt;website&lt;/a&gt;: CNFFuzz and FuzzSAT. These fuzzers randomly genereate high-quality structured problem instances. The emphasis here is on the word structured. Randomly generated instances, as the authors of the original paper note, do not excercise SAT solvers enough. SAT solvers are written with very specific problem types in mind: problems containing long chains of binary clauses, gates, etc.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CryptoMiniSat 3.3 released</title>
      <link>https://www.msoos.org/2013/07/cryptominisat-3-3-released/</link>
      <pubDate>Wed, 10 Jul 2013 18:52:36 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=1812</guid> 
      <description>&lt;p&gt;This is just a short note that CryptoMiniSat 3.3 has been &lt;a href=&#34;https://gforge.inria.fr/frs/?group_id=1992&#34;&gt;released&lt;/a&gt;. This is mainly a bugfix release. I have managed to make a fuzzer that simulates library usage of the system by interspersing the CNF with &amp;ldquo;c Solver::solve()&amp;rdquo; calls and then checking the intermediate solutions. Checking is either performed by verifying that all clauses are satisfied, or if the solution is UNSAT, by using a standard SAT solver (I use &lt;a href=&#34;http://fmv.jku.at/lingeling/&#34;&gt;lingeling&lt;/a&gt;). This turned up a surprising number of bugs. I have also fixed the web-based statistics printing which should now work without a hitch.&lt;/p&gt;</description>
    </item>
    <item>
      <title>GCC 4.5.2 at the SAT Competition&#39;13</title>
      <link>https://www.msoos.org/2013/04/gcc-4-5-2-at-sat-competition-201/</link>
      <pubDate>Fri, 26 Apr 2013 23:17:35 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=1700</guid> 
      <description>&lt;p&gt;(Note &lt;em&gt;update&lt;/em&gt; below)&lt;/p&gt;
&lt;p&gt;Just a short note. All MiniSat-derived SAT solvers might give wrong results during the competition. No, MiniSat doesn&amp;rsquo;t have a bug. GCC has a giant &lt;a href=&#34;http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47365&#34;&gt;bug&lt;/a&gt;. Vegard reported this years ago &amp;ndash; I personally put about 12h tracking it down, &lt;a href=&#34;http://lists.gforge.inria.fr/pipermail/cryptominisat-devel/2011-January/000052.html&#34;&gt;posted it&lt;/a&gt; to the CryptoMiniSat mailing list, and &lt;a href=&#34;http://folk.uio.no/vegardno/&#34;&gt;Vegard&lt;/a&gt; took it up, stripped it down and reported it.&lt;/p&gt;
&lt;p&gt;This is a well-known bug, there is a thread about it on the &lt;a href=&#34;https://groups.google.com/forum/?fromgroups=#!topic/minisat/YHEWCFqxyFg&#34;&gt;MiniSat mailing list&lt;/a&gt; and I personally asked the competition organizers back in 2011 not to use the 4.5.2(or .3?) they wanted to use. I used to have code to check for this bug (there is a handy check attached to the bug report), but I removed it, though maybe I should add it back. It&amp;rsquo;s fixed in 4.5.4+, still present in 4.5.3 where Vegard&amp;amp;me found it. I hope I will be able to convince the organisers this time around, too :) By the way, the option you need to pass to gcc to avoid the bug is &amp;ldquo;-fno-tree-pre&amp;rdquo; &amp;mdash; though of course this turns off an optimisation and so slows down the final executable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Q-DIMM, an &#34;innovation&#34; by ASUS </title>
      <link>https://www.msoos.org/2012/05/q-dimm-an-innovation-by-asus/</link>
      <pubDate>Sun, 27 May 2012 14:55:40 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=1210</guid> 
      <description>&lt;p&gt;Lately, I have been having &lt;strong&gt;boot problems&lt;/strong&gt; with my computer: the system would sometimes fail to boot, and at other times, it displayed the wrong memory readings. I was puzzled, so I took a look. I have six memory DIMMs installed in an ASUS motherboard. Memory modules are usually retained in their slots using two latches:&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.msoos.org/wordpress/wp-content/uploads/2012/05/correct_latch.gif&#34;&gt;&lt;/p&gt;
&lt;p&gt;The point of these latches is to &lt;strong&gt;keep the memory modules in place&lt;/strong&gt; when the computer is moved around. They thus serve the same purpose as the screws for PCIe slots or the mounting holes for the CPU coolers. My motherboard, however, is made by ASUS, and it has a &amp;ldquo;feature&amp;rdquo; called Q-DIMM, which is supposed to ease the installation of memory modules when the system has the video card already installed. This &amp;ldquo;feature&amp;rdquo; is rather simple: the latch on the right is &lt;strong&gt;completely missing:&lt;/strong&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.msoos.org/wordpress/wp-content/uploads/2012/05/qdimm_kep1.jpeg&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>On hyper-binary resolution</title>
      <link>https://www.msoos.org/2012/05/on-hyper-binary-resolution/</link>
      <pubDate>Thu, 17 May 2012 09:34:01 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=1196</guid> 
      <description>&lt;p&gt;Hyper-binary resolution is actually quite straightforward, or at least appears to be. Let&amp;rsquo;s take the following example. The clauses in our database are the following:&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;-a V c
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-b V -c V g
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-b V -c V d
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-d V g
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s set &lt;code&gt;a&lt;/code&gt; to true, and see what happens. Immediately, &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;c&lt;/code&gt; get set to true through binary clauses. If we now propagate &lt;code&gt;g&lt;/code&gt; through the clause &lt;code&gt;-b V -c V g&lt;/code&gt;, we ought to do hyper-binary resolution straight away, and add the clause &lt;code&gt;-a V g&lt;/code&gt; -- some call this &lt;a href=&#34;http://fmv.jku.at/biere/talks/Biere-Dagstuhl09-talk.pdf&#34;&gt;lazy hyper-binary resolution&lt;/a&gt;. Good, one more binary clause!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Implicit binary clauses</title>
      <link>https://www.msoos.org/2010/10/implicit-binary-clauses/</link>
      <pubDate>Wed, 27 Oct 2010 22:14:57 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=508</guid> 
      <description>&lt;p&gt;I have lately been trying to get CryptoMiniSat to use implicit binary clauses. The idea is that since binary clauses are very trivial (just two literals), and they don&amp;rsquo;t really need to keep state (like clause activity), they don&amp;rsquo;t really need to be stored at a separate location. Instead, they can be stored &lt;a href=&#34;https://www.msoos.org/propagating-faster&#34;&gt;directly&lt;/a&gt; in the watchlists. There are a number of advantages and disadvantages that come with this approach.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.msoos.org/wordpress/wp-content/uploads/2010/10/implicit_bin_clauses1.png&#34;&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.msoos.org/wordpress/wp-content/uploads/2010/10/implicit_bin_clauses1.png&#34;&gt;&lt;/a&gt; The main advantage is a notable reduction of memory usage and memory fragmentation. The first is obvious: since we don&amp;rsquo;t allocate space for binary clauses separately, the memory usage of the program should go down. This is especially true since SAT problems usually contain a huge number of binary clauses. The secondary benefit, that of reduced memory fragmentation is not really that much of an advantage if someone uses, e.g. the &lt;a href=&#34;http://www.boost.org/doc/libs/release/libs/pool/doc/&#34;&gt;boost pool&lt;/a&gt; library.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Documenting CryptoMiniSat</title>
      <link>https://www.msoos.org/2010/09/documenting-cryptominisat/</link>
      <pubDate>Wed, 29 Sep 2010 16:59:36 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/?p=466</guid> 
      <description>&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.msoos.org/wordpress/wp-content/uploads/2010/09/documentation.jpg&#34;&gt;Documenting code is not always so much fun. However, in order for the code to be extended by others, documentation needs to exist. Since I conceived &lt;a href=&#34;https://www.msoos.org/cryptominisat2&#34;&gt;CryptoMiniSat&lt;/a&gt; as a program to be extended by others, documentation was a must. So now, after investing about 2 weeks into documentation, it is finally ready. All major classes have been documented, along with all major functions and internal data structures. The number of comment lines I added is around a thousand, all in the Doxygen format. A preliminary HTML version is available &lt;a href=&#34;https://www.msoos.org/documentation/cryptominisat/index.html&#34;&gt;here&lt;/a&gt;. I hope the quality of the documentation will improve with time, and that others might correct and add more documentation as they update the program.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why programs fail</title>
      <link>https://www.msoos.org/2010/05/why-programs-fail/</link>
      <pubDate>Sat, 29 May 2010 18:18:00 +0000</pubDate>
       <guid isPermaLink="false">http://www.msoos.org/wordpress/?p=16</guid> 
      <description>&lt;p&gt;I just bought the &lt;a href=&#34;http://www.whyprogramsfail.com/&#34;&gt;book&lt;/a&gt; with the title of the blogpost by Andreas Zeller. Essentially, it&amp;rsquo;s about debugging, where the author analyses the chain of program defect leading to infected program state, finally leading to program failure. I bought the book because while working with CryptoMiniSat, I have encountered so many bugs that they could fill a book.&lt;/p&gt;
&lt;p&gt;The problem with chasing bugs in CryptoMiniSat is that SAT solvers employ a very optimised algorithm that makes a lot of decisions per second, so recording all interesting events makes for a very big dump file. I have per-module verbosity settings, so if I can narrow down what module(s) are causing the failure, there is less debug output to go through, but sometimes I still have to wade through 10-20GB dumps to see how the program state got infected.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
