<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Here at CERT we've written some prototype tools that use YAML files to hold a minimal subset of the Clang parse tree. We then combine these files to perform cross-TU static analysis. We write out *only* the minimal information required for the particular static
analysis being performed, so it's a tiny subset of the entire parse tree. Of course, that's all a hack-around to enable the cross-TU analysis...
<div><br>
</div>
<div>We'd be rather disappointed if the YAML library suddenly (a) started supporting a limited set of output file kinds and (b) failed to provide a simple mechanism to add custom file kinds to that set.
<div><br>
</div>
<div>Dean F. Sutherland</div>
<div><a href="mailto:dsutherland@cert.org">dsutherland@cert.org</a></div>
<div><br>
<div>
<div>On Oct 15, 2013, at 11:32 AM, Sean Silva <<a href="mailto:chisophugis@gmail.com">chisophugis@gmail.com</a>></div>
<div> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Oct 14, 2013 at 11:33 PM, Shankar Easwaran <span dir="ltr">
<<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 10/14/2013 8:20 PM, Sean Silva wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Oct 14, 2013 at 8:41 PM, Michael Spencer <<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.com</a>>wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Oct 9, 2013 at 11:23 AM, Shankar Easwaran <<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
wrote:<br>
Hi,<br>
<br>
We have a whole bunch of readers(we would have some more too), and was<br>
thinking if we should have a vector of Readers, and have a function<br>
isMyFormat in each of them.<br>
<br>
Any reader that knows to handle, goes ahead and parses the file.<br>
<br>
On a side note, we currently use .objtxt as an figure out if the file is<br>
a YAML file or not. I have added FIXME's in the code, if we could some kind<br>
of magic (or) a better way to figure out if the file is YAML ?<br>
<br>
Thanks<br>
<br>
Shankar Easwaran<br>
<br>
--<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted<br>
by the Linux Foundation<br>
<br>
<br>
</blockquote>
So apparently I didn't reply all when I suggested this.<br>
<br>
For determining which YAML reader to use, we should use YAML tags. This<br>
allows multiple different types of input files in a single YAML stream.<br>
</blockquote>
</blockquote>
</div>
Agree.
<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
!archive<br>
<blah><br>
---<br>
!ELF<br>
<blah><br>
---<br>
!atoms<br>
<blah><br>
</blockquote>
</blockquote>
</div>
I think <blah> has to be a key value pair here, which could be represented as target:<triple>
<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
For differentiating between linker scripts and YAML, I agree that some<br>
form of comment magic is best.<br>
</blockquote>
</blockquote>
</div>
#!lld ? As lld would be interpreting this file ?
<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Since our YAML stuff is all internal anyway, wouldn't it be simpler to just<br>
hardcode the limited set of extensions we use for YAML files, and only do<br>
that with non-emulated drivers unless explicitly asked to do so?<br>
</blockquote>
</div>
That model would be difficult to maintain and we already have the YAML file as a avaialable form of an external output file (output-filetype=yaml).<br>
</blockquote>
<div><br>
</div>
<div>Do we actually have users that rely on that feature? Is the YAML format is stable enough for being exposed to users? It seems unwise to expose what is effectively a debug/testing format to users.</div>
<div><br>
</div>
<div>-- Sean Silva</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On a sidenote, All of the readers would have a validation function that would check the architecture, which makes extensions highly unmanageable.<br>
<br>
Thanks<span class="HOEnZb"><font color="#888888"><br>
<br>
Shankar Easwaran<br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>