<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></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 Oct 13, 2014, at 8:55 AM, Gabor Kozar <<a href="mailto:kozargabor@fastmail.fm" class="">kozargabor@fastmail.fm</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<title class=""></title>
<div class=""><blockquote class=""><div class="">However, there will be no inheritance (i.e. the setting
'unix:Optimistic' is entirely distinct from the setting
‘unix.Malloc:Optimistic’).<br class=""></div>
</blockquote><div class=""> </div>
<div class="">I think inheritance like that could be useful in some situations.</div></div></div></blockquote><div><br class=""></div>The main reason is that we currently do not have a need for it and allowing inheritance requires a design for it. For example, what happens when a package adds an option? How would the checkers access it? If we were to allow dynamically loaded checkers how would they inherit it? What happens if a checker overrides a package option?</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div class=""> I
would expect such options to be inherited, i.e. if I set
'unix:Optimistic', then I expect this to be visible everywhere in the
'unix' package. Why are disallowing this?<br class=""></div>
<div class=""> </div></div></div></blockquote><div><br class=""></div>The package options will be visible to checkers; specifically, checkers could query the package options. For example, MallocChecker could call getOption(Optimistic, "unix") to check if the option has been set on the package. </div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="">
<div class="">(Sorry for the duplicate e-mail, sent the first from the wrong e-mail address.)<br class=""></div>
<div class=""> </div>
<div id="sig19426265" class=""><div class="signature">---<br class=""></div>
<div class="signature">Best regards,<br class=""></div>
<div class="signature"> </div>
<div class="signature">Gábor 'ShdNx' Kozár<br class=""></div>
<div class="signature"><a href="http://gaborkozar.me/" class="">http://gaborkozar.me</a><br class=""></div>
</div>
<div class=""> </div>
<div class=""> </div>
<div class="">On Mon, Oct 13, 2014, at 15:59, Gabor Kozar wrote:<br class=""></div>
<blockquote type="cite" class=""><blockquote class=""><div class="">However, there will be no inheritance (i.e. the setting 'unix:Optimistic' is entirely distinct from the setting ‘unix.Malloc:Optimistic’).<br class=""></div>
</blockquote><div class=""> </div>
<div class="">I think inheritance like that could be useful in some situations. I would expect such options to be inherited, i.e. if I set 'unix:Optimistic', then I expect this to be visible everywhere in the 'unix' package. Why are you proposing to disallow this?<br class=""></div>
<div class=""> </div>
<div class=""><div class="">---<br class=""></div>
<div class="">Best regards,<br class=""></div>
<div class=""> </div>
<div class="">Gábor 'ShdNx' Kozár<br class=""></div>
<div class=""><a href="http://gaborkozar.me/" class="">http://gaborkozar.me</a><br class=""></div>
<div class=""> </div>
</div>
<div class=""> </div>
<div class=""> </div>
<div class="">On Sat, Oct 11, 2014, at 01:17, Anna Zaks wrote:<br class=""></div>
<blockquote type="cite" class=""><div class="">Background & Problem:<br class=""></div>
<div class=""> </div>
<div class="">Clang has support for static analyzer options though "-analyzer-config”<br class=""></div>
<div class="">front-end option, which is followed by the option name and value:<br class=""></div>
<div class="">-analyzer-config <Option Name>=<Value><br class=""></div>
<div class="">This option is also available through scan-build.<br class=""></div>
<div class=""> </div>
<div class="">Currently, there is no way to pass command line options to specific<br class=""></div>
<div class="">checkers. We work around it by creating new checker kinds (for example,<br class=""></div>
<div class="">MallocPessimistic, MallocOptimistic).<br class=""></div>
<div class=""> </div>
<div class="">Proposed Solution:<br class=""></div>
<div class=""> </div>
<div class="">The proposal (partially authored and implemented by Aleksei Sidorin<br class=""></div>
<div class=""><a href="http://reviews.llvm.org/D3967" class="">http://reviews.llvm.org/D3967</a>) is to extend "-analyzer-config" to support<br class=""></div>
<div class="">checker-specific options as following:<br class=""></div>
<div class="">-analyzer-config <Full Checker Name / Package Name>:<Option<br class=""></div>
<div class="">Name>=<Value><br class=""></div>
<div class=""> </div>
<div class="">To avoid ambiguities with regular options, we should enforce the<br class=""></div>
<div class="">following:<br class=""></div>
<div class="">1) <Option Name> should be an identifier<br class=""></div>
<div class="">2) Checker names should be identifiers.<br class=""></div>
<div class="">3) Package names should be identifiers joined with '.’.<br class=""></div>
<div class="">4) <Full Checker Name> has the same form as package names.<br class=""></div>
<div class=""> </div>
<div class="">Specifying options on a package will be allowed. However, there will be<br class=""></div>
<div class="">no inheritance (i.e. the setting 'unix:Optimistic' is entirely distinct<br class=""></div>
<div class="">from the setting ‘unix.Malloc:Optimistic’). Each checker will be able to<br class=""></div>
<div class="">query options of its package when needed. For this, we propose changing<br class=""></div>
<div class="">the getOption API to work with package and checker names as well as<br class=""></div>
<div class="">CheckerBase.<br class=""></div>
<div class=""> </div>
<div class="">Comments and suggestions are welcome!<br class=""></div>
<div class="">Anna.<br class=""></div>
<div class=""><u class="">_______________________________________________</u><br class=""></div>
<div class="">cfe-dev mailing list<br class=""></div>
<div class=""><a href="mailto:cfe-dev@cs.uiuc.edu" class="">cfe-dev@cs.uiuc.edu</a><br class=""></div>
<div class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br class=""></div>
</blockquote><div class=""> </div>
<div class=""><u class="">_______________________________________________</u><br class=""></div>
<div class="">cfe-dev mailing list<br class=""></div>
<div class=""><a href="mailto:cfe-dev@cs.uiuc.edu" class="">cfe-dev@cs.uiuc.edu</a><br class=""></div>
<div class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br class=""></div>
</blockquote><div class=""> </div>
</div>
_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@cs.uiuc.edu" class="">cfe-dev@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></body></html>