<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>LLVM on Adrien&#39;s Dashbook</title>
    <link>https://adrbqt.ch/tags/llvm/</link>
    <description>Recent content in LLVM on Adrien&#39;s Dashbook</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 09 Jun 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://adrbqt.ch/tags/llvm/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Implementing a Query Count Estimation</title>
      <link>https://adrbqt.ch/writings/llvm-query-estimator/llvm-query-estimator/</link>
      <pubDate>Fri, 09 Jun 2023 00:00:00 +0000</pubDate>
      <guid>https://adrbqt.ch/writings/llvm-query-estimator/llvm-query-estimator/</guid>
      <description>&lt;p&gt;&lt;em&gt;This paper was written under the supervision of Ph. D. candidates Solal Pirelli and Can Cebeci from DSLAB at EPFL and is available in PDF format on &lt;a href=&#34;https://github.com/abouquet27/BachelorProject/blob/main/project/Bachelor_report.pdf&#34; target=&#34;_blank&#34;&gt;this repository&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34; lang=&#34;&#34; xml:lang=&#34;&#34;&gt;&#xA;&lt;meta charset=&#34;utf-8&#34; /&gt;&#xA;&lt;meta name=&#34;generator&#34; content=&#34;pandoc&#34; /&gt;&#xA;&lt;meta name=&#34;viewport&#34; content=&#34;width=device-width, initial-scale=1.0, user-scalable=yes&#34; /&gt;&#xA;&lt;meta name=&#34;author&#34; content=&#34;Adrien Alain Bouquet&#34; /&gt;&#xA;&lt;style&gt;&#xA;    /* Warning */&#xA;    /* CSS for citations */&#xA;    div.csl-bib-body {}&#xA;&#xA;    div.csl-entry {&#xA;        clear: both;&#xA;        margin-bottom: 0em;&#xA;    }&#xA;&#xA;    .hanging-indent div.csl-entry {&#xA;        margin-left: 2em;&#xA;        text-indent: -2em;&#xA;    }&#xA;&#xA;    div.csl-left-margin {&#xA;        min-width: 2em;&#xA;        float: left;&#xA;    }&#xA;&#xA;    div.csl-right-inline {&#xA;        margin-left: 2em;&#xA;        padding-left: 1em;&#xA;    }&#xA;&#xA;    div.csl-indent {&#xA;        margin-left: 2em;&#xA;    }&#xA;&lt;/style&gt;&#xA;&lt;script defer=&#34;&#34; src=&#34;https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.js&#34;&gt;&lt;/script&gt;&#xA;&lt;script&gt;document.addEventListener(&#34;DOMContentLoaded&#34;, function () {&#xA;        var mathElements = document.getElementsByClassName(&#34;math&#34;);&#xA;        var macros = [];&#xA;        for (var i = 0; i &lt; mathElements.length; i++) {&#xA;            var texText = mathElements[i].firstChild;&#xA;            if (mathElements[i].tagName == &#34;SPAN&#34;) {&#xA;                katex.render(texText.data, mathElements[i], {&#xA;                    displayMode: mathElements[i].classList.contains(&#39;display&#39;),&#xA;                    throwOnError: false,&#xA;                    macros: macros,&#xA;                    fleqn: false&#xA;                });&#xA;            }&#xA;        }&#xA;    });&#xA;&lt;/script&gt;&#xA;&lt;link rel=&#34;stylesheet&#34; href=&#34;https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css&#34; /&gt;   &#xA;&lt;body&gt;&#xA;&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;When you’re trying to test code, symbolic execution is an effective&#xA;way of doing this by automatically generating tests and finding bugs.&#xA;However, its cost in terms of performance can be heavy due to path&#xA;explosion and this state explosion. To counter this problem, one&#xA;approach is to merge states obtained on different paths in order to&#xA;reduce the total exploration cost. However, merging two states can&#xA;potentially increase costs and therefore decrease performance rather&#xA;than the opposite. In order to determine which states to merge or not,&#xA;researchers at the Dependable Systems Lab (DSLAB) at the Ecole&#xA;Polytechnique Fédéral de Lausanne (EPFL) have published “Efficient State&#xA;Merging in Symbolic Execution” in 2012 &lt;span class=&#34;citation&#34; data-cites=&#34;kuznetsov_state_merging&#34;&gt;&lt;a&#xA;href=&#34;#ref-kuznetsov_state_merging&#34; role=&#34;doc-biblioref&#34;&gt;[1]&lt;/a&gt;&lt;/span&gt;,&#xA;in which they present two methods for reducing costs of state merging,&#xA;especially deployed on KLEE, a symbolic execution engine &lt;span class=&#34;citation&#34; data-cites=&#34;klee&#34;&gt;&lt;a&#xA;href=&#34;#ref-klee&#34; role=&#34;doc-biblioref&#34;&gt;[2]&lt;/a&gt;&lt;/span&gt;. The first one is a query count&#xA;estimation which computes the impact of each symbolic variable on solver&#xA;queries and indicates which one provides benefits to merge. The second&#xA;one is dynamic state merging which “interacts favorably with search&#xA;strategies in automated test case generation and bug finding tools”. In&#xA;this report, we will be working on an implementation of the query count&#xA;estimation based on its description. The goal of the report is first to&#xA;explain the implementation of the LLVM pass &lt;span class=&#34;citation&#34; data-cites=&#34;llvm&#34;&gt;&lt;a href=&#34;#ref-llvm&#34;&#xA;role=&#34;doc-biblioref&#34;&gt;[3]&lt;/a&gt;&lt;/span&gt; chosen to be as close as possible to&#xA;that described in the paper, and then to test its effectiveness and&#xA;robustness on different examples and the &lt;code&gt;GNU COREUTILS&lt;/code&gt;.&#xA;&lt;span class=&#34;citation&#34; data-cites=&#34;coreutils&#34;&gt;&lt;a href=&#34;#ref-coreutils&#34; role=&#34;doc-biblioref&#34;&gt;[4]&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
