[www] r232127 - Post a copy and paste GSoC project description. (patch by Vassil Vassilev)

Anna Zaks ganna at apple.com
Thu Mar 12 17:34:34 PDT 2015


Author: zaks
Date: Thu Mar 12 19:34:33 2015
New Revision: 232127

URL: http://llvm.org/viewvc/llvm-project?rev=232127&view=rev
Log:
Post a copy and paste GSoC project description. (patch by Vassil Vassilev)

Modified:
    www/trunk/OpenProjects.html

Modified: www/trunk/OpenProjects.html
URL: http://llvm.org/viewvc/llvm-project/www/trunk/OpenProjects.html?rev=232127&r1=232126&r2=232127&view=diff
==============================================================================
--- www/trunk/OpenProjects.html (original)
+++ www/trunk/OpenProjects.html Thu Mar 12 19:34:33 2015
@@ -4,6 +4,7 @@
 
 <ul>
   <li><a href="#what">What is this?</a></li>
+  <li><a href="#gsoc2015">Google Summer of Code 2015</a></li>
   <li><a href="#gsoc2014">Google Summer of Code 2014</a></li>
   <li><a href="#subprojects">LLVM Subprojects: Clang and VMKit</a></li>
   <li><a href="#improving">Improving the current system</a>
@@ -62,6 +63,92 @@ LLVM bug tracker</a>. See the <a href="h
 
 </div>
 
+<!-- *********************************************************************** -->
+<div class="www_sectiontitle">
+  <a name="gsoc2015">Google Summer of Code 2015 projects</a>
+</div>
+<!-- *********************************************************************** -->
+
+<div class="www_subsubsection">
+  <a name="target-desc">Copy-paste detection</a>
+</div>
+
+<div class="www_text">
+<p><b>Description of the project: </b>
+The copy-paste is a common programming practice. Most of the programmers start
+from a code snippet, which already exists in the system and modify it to match
+their needs. Easily, some of the code snippets end up being copied dozens of
+times. This manual process is error prone, which leads to a seamless
+introduction of new hard-to-find bugs. Also, copy-paste usually means worse
+maintainability, understandability and logical design.
+<a href="http://clang.llvm.org">Clang</a> and <a href="http://clang-analyzer.llvm.org/">
+clang's static analyzer</a> provide all the building blocks to build a generic
+C/C++ copy-paste detecting infrastructure. The infrastructure should be evolved
+alongside with useful features such as bug checkers and compiler diagnostics.
+</p>
+
+<p><b>Expected results: </b>
+  <ul>
+    <li>Add a copy-paste detecting infrastructure to LLVM. The infrastructure
+			should be developed in a feature-centric way.</li>
+    <li>Develop initial detection of slightly modified code - it should extend
+      the copy-paste infrastructure adding some semantic analysis.</li>
+    <li>Develop copy-paste oriented bug checkers - they should be added to
+      clang's static analyzer (see some examples below).</li>
+    <li>Develop thorough test suite.</li>
+    <li>Prepare a final poster of the work and be ready to present it.</li>
+  </ul>
+
+<p><b>Confirmed Mentor:</b> Vassil Vassilev</p>
+
+<p><b>How to contact the mentor:</b> vvasilev at cern.ch or
+   vassil_vassilev at hotmail.com</p>
+
+<p><b>Desirable skills:</b>
+   Advanced C++, Basic knowledge of Clang/Clang Static Analyzer</p>
+
+<p><b>What the student will learn:</b> Static analyzer, Clang, etc</p>
+<p><b>Further information:</b>
+   The developed copy-paste infrastructure could be used to build for building
+more advanced bug checkers. Some examples and possible applications are:
+  <ol>
+    <li>Here is an example where we could implement warning that both branches are the same:
+      <pre>
+        if (cond)
+          do_a();
+        else
+          do_a();
+      </pre>
+      A more realistic example (provided by Nick Lewycky) could be:
+      <pre>
+        #define num_cpus() (1)
+        #define max_omp_threads() (1)
+        int test8(int expr) {
+          if (expr)
+            return num_cpus();
+          else
+           return max_omp_threads();
+        }
+      </pre>
+      The implementation should be extremely efficient and with low false
+      positive rate, in order to end up in clang's mainline. Initial work done
+      by Nick could be found 
+      <a href="https://gist.github.com/vgvassilev/471feedc9de61a9590da">here.</a>
+    </li>
+    <li>Here is another example (by Marshall Clow):<br />
+      Code block #1 is about 50 lines of code, with references to a global
+      variable (global1, global1, global1, global1, global1).
+      <br />
+      Code block #2 is an obviously duplicated and edited block of code, with
+      references to (global2, global2, global2, global1, global2).
+      <br />
+      A diagnostics "Are you sure you don't mean 'global2' here?" would be great.
+    </li>
+  </ol></p>
+</p>
+
+</div>
+
 <!-- *********************************************************************** -->
 <div class="www_sectiontitle">
   <a name="gsoc2014">Google Summer of Code 2014 projects</a>





More information about the llvm-commits mailing list