<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 24, 2016, at 6:59 AM, Vassil Vassilev <<a href="mailto:v.g.vassilev@gmail.com" class="">v.g.vassilev@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi all,<br class="">  I just want to resend a few things from our internal discussion here for the record. I will summarize them:<br class="">  * Raphael contacted me early (1-2 months before GSoC started) to express his interest in the copy-paste project. He wanted to continue the development of our prototype (done by Kirill in GSoC 2015).<br class="">  * Raphael learned from Kirill and me the current state of the project and the current implementation deficiencies (this section of his proposal includes our feedback).<br class="">  * Raphael started playing with the implementation early and had a few good ideas how to further improve the code-clone hashing.<br class="">  * Raphael also proposed to try to feed back as much as possible to clang's mainline (something that we didn't have time to do last year).<br class="">  * Raphael has good experience with relevant projects such as his work on WebAssembly.<br class=""><br class="">  If you are interested in more technical details please let us know.<br class=""><br class="">  I find this proposal very reasonable and the candidacy very strong. From the CV and the proposal I think the candidate can do what he are suggests and I'd be happy to mentor him. I'd be happy to hear Anna's comments on his proposal.<br class=""></div></div></blockquote><div><br class=""></div><div>Hi Vassil and Raphael,</div><div><br class=""></div><div>Sorry for the delay, I just got to reading your proposal. Below are some comments.</div><div><br class=""></div><div>If I understand correctly, you are proposing to:</div><div> 1) Add another stand-alone tool + a library that performs cross-translation unit clone detection on AST-level.</div><div> 2) Add a checker to the Clang Static Analyzer that performs (the same?) clone detection but limited to a single translation unit.</div><div><br class=""></div><div>How much code reuse will there be between the two? Will the stand-alone tool be built on top of the checker? I did not get that feeling from the proposal, especially, since the stand-alone tool will be completed first. It seems that all of the goals mentioned in the proposal except for the cross translation unit analysis could be done in the static analyzer. So why not start with that? I think it would be very beneficial for the project to have <i class="">some</i> clone detection committed <i class="">in tree</i>, immediately available to all of the existing users of the static analyzer! </div><div><br class=""></div><div>One of the obstacles in contributing the existing checker to the analyzer is issue reporting. Have you considered reporting the subsequent clones as a note on the first clone? The clones are related and it looks like the current output does not highlight that. (The static analyzer does not support notes right now, so you'd need to extend that functionality.)</div><div><br class=""></div><div><div class="">I am very apprehensive about adding yet another analysis tool to the clang ecosystem. Having clang-tidy, the Clang Static Analyzer + yet another tool would be quite confusing to the user. The most user friendly approach is to have a single tool that highlights all the problems the users have in their code. I do acknowledge that it would not be possible to make the clone checker scale to cross translation unit analysis since we do not currently have the infrastructure to support that. However, building the stand-alone tool on top of the checker would allow turning it into a cross-translation unit checker once the infrastructure is added to the static analyzer.</div><div class=""><br class=""></div><div class="">Have you looked into CodeChecker and the new scan-build.py projects? They do rely on using the compilation database, which is something you plan on doing as well. Can you reuse scan-build.py instead of writing your own build interposition? The goal of CodeChecker is to collect and display static analysis reports generated by all clang-based tools, specifically, both clang-tidy and the Clang Static Analyzer are already supported. It would be valuable if the new stand-alone tools would be incorporated into the same workflow. This way the users could have a single point of entry when they look for bugs.</div><div class=""><br class=""></div><div class="">CodeChecker incorporates a nice bug viewing UI. Integrating clone reporting into that UI would be great. However, you might need to extend/modify both the reporting and the UI to make it look great.</div><div class=""><br class=""></div><div class="">What do you think?</div><div class="">Anna.</div></div><blockquote type="cite" class=""><div class=""><div class="">--Vassil<br class="">On 23/03/16 03:37, Raphael Isemann via cfe-dev wrote:<br class=""><blockquote type="cite" class="">Hi everybody,<br class=""><br class="">just wanted to post my GSoC proposal for feedback:<br class=""><br class=""><a href="https://docs.google.com/document/d/1hY_EUIqeQ6cAYaIqrePWvcy6XmkMv5BoxrfskEv5Tl0/edit?usp=sharing" class="">https://docs.google.com/document/d/1hY_EUIqeQ6cAYaIqrePWvcy6XmkMv5BoxrfskEv5Tl0/edit?usp=sharing</a><br class=""><br class="">Feel free to comment on the document if you think something should be improved.<br class="">I also try to idle in the IRC channel from now on if someone prefers<br class="">that. My nickname there is also "teemperor".<br class=""><br class="">Cheers,<br class=""><br class="">Raphael Isemann<br class="">_______________________________________________<br class="">cfe-dev mailing list<br class="">cfe-dev@lists.llvm.org<br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></body></html>