[LLVMdev] Google Summer of Code

Vassil Vassilev
Mon, 09 Mar 2015 08:54:04 -0000

Hi Anton,
   (CC-ing the people who might be interested to review)
   I am attaching the patch.
Many thanks,
Vassil
On 04/03/15 23:00, Anton Korobeynikov wrote:
> Please provide a patch to Open Projects list.
>
> On Wed, Mar 4, 2015 at 8:25 PM, Vassil Vassilev <vvasilev at cern.ch>
wrote:
>> On 17/02/15 09:47, Anton Korobeynikov wrote:
>>> John,
>>>
>>> Yes, I'm taking care about application as usual.
>> I saw the the LLVM mentoring org was accepted. Congrats!
>> Anton, could you tell me what is the procedure of submitting a proposal
for
>> a project (I will be the mentor)?
>> Many thanks,
>> Vassil
>>
>>> On Tue, Feb 17, 2015 at 4:48 AM, Eric Christopher <echristo at
gmail.com>
>>> wrote:
>>>> I believe Anton was going to do so.
>>>>
>>>>
>>>> On Mon, Feb 16, 2015, 5:14 PM John Criswell <jtcriswel at
gmail.com> wrote:
>>>>> Dear All,
>>>>>
>>>>> Has someone registered LLVM as an organization for Google
Summer of Code
>>>>> 2015?  I'm interested in mentoring a GSoC student this
summer.
>>>>>
>>>>> -- John T.
>>>>>
>>>>> --
>>>>> John Criswell
>>>>> Assistant Professor
>>>>> Department of Computer Science, University of Rochester
>>>>> http://www.cs.rochester.edu/u/criswell
>>>>>
>>>>> _______________________________________________
>>>>> LLVM Developers mailing list
>>>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
>


--
--------------------------------------------
Q: Why is this email five sentences or less?
A: http://five.sentenc.es

-------------- next part --------------
Index: OpenProjects.html
==================================================================---
OpenProjects.html	(revision 231588)
+++ OpenProjects.html	(working copy)
@@ -4,6 +4,7 @@


What is this?
+ Google Summer of Code
2015
Google Summer of Code
2014
LLVM Subprojects: Clang and
VMKit
Improving the current
system
@@ -64,6 +65,87 @@

 <!-- ***********************************************************************
-->

+ Google Summer of Code 2015
projects
+
+<!-- ***********************************************************************
-->
+
+
+ Copy-paste detection
+
+
+
+ Description of the project:
+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, which leads to worse maintainability, understandability and logical
+design.
+
+Clang and <a
href="http://clang-analyzer.llvm.org/">
+clang's static analyzer provide all the building blocks to build
a generic
+C/C++ copy-paste detector.
+
+ Expected results: Develop a copy-paste detector and
integrate it into
+one of the existing tools. An ideal candidate would be clang static analyzer.
+Lay the foundations of detection of slightly modified code (semantic analysis
+required). Implement thorough test suite. Prepare a final poster of the work
+and be ready to present it.
+
+ Confirmed Mentor: Vassil Vassilev
+
+ How to contact the mentor: vvasilev at cern.ch or
+ vassil_vassilev at hotmail.com
+
+ Desirable skills:
+ Advanced C++, Basic knowledge of Clang/Clang Static Analyzer.
+
+ What the student will learn: Static analyzer,
Clang, etc
+ Further information:
+   Copy-paste infrastructure could be used to build other "goodies".
Some
+examples and possible applications are:
+
+ Detect issues in the control flow:
+
+        if (cond)
+          do_a();
+        else
+          do_a(); // here we could implement warning that both branches are the
same
+
+      A more realistic example (provided by Nick Lewycky) could be:
+
+        #define num_cpus() (1)
+        #define max_omp_threads() (1)
+        int test8(int expr) {
+          if (expr)
+            return num_cpus();
+          else
+           return max_omp_threads();
+        }
+
+      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.
+
+ Detect modified code snippets (example by Marshall
Clow):
+      Code block #1 is about 50 lines of code, with references to a global
+      variable (global1, global1, global1, global1, global1).
+
+      Code block #2 is an obviously duplicated and edited block of code, with
+      references to (global2, global2, global2, global1, global2).
+
+      A diagnostics "Are you sure you don't mean 'global2'
here?" would be great.
+
+ An example (provided by Sean McBride) that these
copy-pasto-s exist
+ even in LLVM/clang codebase:
+      <a
href="http://www.viva64.com/en/b/0108/">here.
+
+
+
+
+
+<!-- ***********************************************************************
-->
+
Google Summer of Code 2014
projects

 <!-- ***********************************************************************
-->