<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Pipe Dream: Static Analysis for Ruby</title>
	<atom:link href="http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-for-ruby/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-for-ruby</link>
	<description>(permanently in beta)</description>
	<lastBuildDate>Mon, 09 Jan 2012 20:21:24 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: anonymous</title>
		<link>http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-for-ruby/comment-page-1#comment-5134</link>
		<dc:creator>anonymous</dc:creator>
		<pubDate>Fri, 10 Sep 2010 00:50:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-in-ruby#comment-5134</guid>
		<description>That&#039;s called Soft Typing (Static typing + Type inference + allowing indeterminable types to be checked at runtime).</description>
		<content:encoded><![CDATA[<p>That&#8217;s called Soft Typing (Static typing + Type inference + allowing indeterminable types to be checked at runtime).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matisse Enzer</title>
		<link>http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-for-ruby/comment-page-1#comment-5105</link>
		<dc:creator>Matisse Enzer</dc:creator>
		<pubDate>Sun, 11 Jul 2010 04:18:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-in-ruby#comment-5105</guid>
		<description>You probably already know this but the Perl community scoffed at the idea of a static code analyzer for Perl, that is, until Adam Kennedy produced PPI (http://search.cpan.org/dist/PPI/) which led to the creation of Perl::Critic (http://search.cpan.org/dist/Perl-Critic/ or http://perlcritic.com/)

So, there is hope for doing something like this in Ruby.</description>
		<content:encoded><![CDATA[<p>You probably already know this but the Perl community scoffed at the idea of a static code analyzer for Perl, that is, until Adam Kennedy produced PPI (<a href="http://search.cpan.org/dist/PPI/" rel="nofollow">http://search.cpan.org/dist/PPI/</a>) which led to the creation of Perl::Critic (<a href="http://search.cpan.org/dist/Perl-Critic/" rel="nofollow">http://search.cpan.org/dist/Perl-Critic/</a> or <a href="http://perlcritic.com/)" rel="nofollow">http://perlcritic.com/)</a></p>
<p>So, there is hope for doing something like this in Ruby.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ned Konz</title>
		<link>http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-for-ruby/comment-page-1#comment-4851</link>
		<dc:creator>Ned Konz</dc:creator>
		<pubDate>Thu, 02 Jul 2009 14:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-in-ruby#comment-4851</guid>
		<description>Actually, this kind of type inference can be taken pretty far. Look at Traits (for Squeak), (http://doi.acm.org/10.1145/1119479.1119483) which is a simple system that does just the kind of analysis you&#039;re talking about (and allows automatic refactoring based on this analysis, or Moose http://moose.unibe.ch/ which is an ambitious system that does many kinds of analysis on software.</description>
		<content:encoded><![CDATA[<p>Actually, this kind of type inference can be taken pretty far. Look at Traits (for Squeak), (<a href="http://doi.acm.org/10.1145/1119479.1119483" rel="nofollow">http://doi.acm.org/10.1145/1119479.1119483</a>) which is a simple system that does just the kind of analysis you&#8217;re talking about (and allows automatic refactoring based on this analysis, or Moose <a href="http://moose.unibe.ch/" rel="nofollow">http://moose.unibe.ch/</a> which is an ambitious system that does many kinds of analysis on software.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-for-ruby/comment-page-1#comment-3792</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Mon, 30 Jun 2008 19:56:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-in-ruby#comment-3792</guid>
		<description>coderrr is right, there&#039;s a fairly hard limit on what is possible with pure runtime analysis.  Ruby&#039;s highly dynamic nature actually makes this easier than it would otherwise be (subbing in a new implementation of Object.new, for example), but there&#039;s really no way around the issue of side-effects.  It is for this reason that I think that some sort of static analysis is really the only way to improve on the situation, due to the fact that static analysis doesn&#039;t have the concern associated with external side-effects.  The obvious problem being that you can&#039;t really guarantee much about the code.  ActiveRecord is a good example of a library which relies upon external conditions (a database) to define what object structure is going to look like.  Clever, but very frustrating from the perspective of stability assurance.</description>
		<content:encoded><![CDATA[<p>coderrr is right, there&#8217;s a fairly hard limit on what is possible with pure runtime analysis.  Ruby&#8217;s highly dynamic nature actually makes this easier than it would otherwise be (subbing in a new implementation of Object.new, for example), but there&#8217;s really no way around the issue of side-effects.  It is for this reason that I think that some sort of static analysis is really the only way to improve on the situation, due to the fact that static analysis doesn&#8217;t have the concern associated with external side-effects.  The obvious problem being that you can&#8217;t really guarantee much about the code.  ActiveRecord is a good example of a library which relies upon external conditions (a database) to define what object structure is going to look like.  Clever, but very frustrating from the perspective of stability assurance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: coderrr</title>
		<link>http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-for-ruby/comment-page-1#comment-3788</link>
		<dc:creator>coderrr</dc:creator>
		<pubDate>Mon, 30 Jun 2008 17:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-in-ruby#comment-3788</guid>
		<description>@matthew: I&#039;ve thought about runtime analysis before a little, by no means thoroughly.  But the problem is that you have no idea what code is safe to run.  The analysis may exercise some code which deletes a whole directory of files.  For example you may think you&#039;re just resolving a class and enumerating its methods.  But when that class is resolved maybe it makes a connection to a database and resets some state somewhere.  Seems like dangerous and unpredictable stuff to do especially when you&#039;re dealing with 3rd party libs.

Maybe some sort of guided analyzer would work where you show it safe paths or maybe just dangerous paths to exclude from the analysis.  This would still be work for the developer but could be easier than writing tests.

It would be nice to see more attempts in this area forsure.</description>
		<content:encoded><![CDATA[<p>@matthew: I&#8217;ve thought about runtime analysis before a little, by no means thoroughly.  But the problem is that you have no idea what code is safe to run.  The analysis may exercise some code which deletes a whole directory of files.  For example you may think you&#8217;re just resolving a class and enumerating its methods.  But when that class is resolved maybe it makes a connection to a database and resets some state somewhere.  Seems like dangerous and unpredictable stuff to do especially when you&#8217;re dealing with 3rd party libs.</p>
<p>Maybe some sort of guided analyzer would work where you show it safe paths or maybe just dangerous paths to exclude from the analysis.  This would still be work for the developer but could be easier than writing tests.</p>
<p>It would be nice to see more attempts in this area forsure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matthew</title>
		<link>http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-for-ruby/comment-page-1#comment-3787</link>
		<dc:creator>matthew</dc:creator>
		<pubDate>Mon, 30 Jun 2008 16:21:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/pipe-dream-static-analysis-in-ruby#comment-3787</guid>
		<description>Even in the case of Eclipse&#039;s Java support, there are certain situations that only indicate you might be making a mistake, like when you use an enum in a switch block but don&#039;t use all values, or a missing serialVersionUID.  A method call that falls down into method_missing is maybe a similar situation.

I&#039;m thinking that runtime analysis might be the way to go though, especially in Ruby where you can attach methods to instances and classes at will.  Resolving the ordering of these things seems too tough at a purely source code level, but at runtime you can verify which methods are available on an instance.  Then maybe you could use the data from that analysis and insert it back into the source code viewer, kind of like some code coverage tools do.</description>
		<content:encoded><![CDATA[<p>Even in the case of Eclipse&#8217;s Java support, there are certain situations that only indicate you might be making a mistake, like when you use an enum in a switch block but don&#8217;t use all values, or a missing serialVersionUID.  A method call that falls down into method_missing is maybe a similar situation.</p>
<p>I&#8217;m thinking that runtime analysis might be the way to go though, especially in Ruby where you can attach methods to instances and classes at will.  Resolving the ordering of these things seems too tough at a purely source code level, but at runtime you can verify which methods are available on an instance.  Then maybe you could use the data from that analysis and insert it back into the source code viewer, kind of like some code coverage tools do.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

