<div dir="ltr">If you are interested in general program analysis, I recommend you the book &quot;Principles of Program Analysis&quot; ]<a href="http://www.amazon.com/Principles-Program-Analysis-Flemming-Nielson/dp/3540654100">http://www.amazon.com/Principles-Program-Analysis-Flemming-Nielson/dp/3540654100</a>]. It&#39;s very complete, and covers the most important kind of analyses that you can do (data-flow, constraint-based, abstract interpretation and type-and-effect systems - the latter is the nearest to Haskell).<div>

<br></div><div>If you are interested in analyses that infer relations such as the one shown above, you can check at size and cost analyses. Here are some pointers:</div><div>- RAML [<a href="http://raml.tcs.ifi.lmu.de/">http://raml.tcs.ifi.lmu.de/</a>] is based on ML, and includes in its types information about the memory used by each function,</div>

<div>- The PhD thesis of Vasconcelos [<a href="http://www.ncc.up.pt/~pbv/research/PB_Vasconcelos_PhD_thesis.pdf">http://www.ncc.up.pt/~pbv/research/PB_Vasconcelos_PhD_thesis.pdf</a>] uses types with sizes to infer relations between the sizes of the arguments in a call. It uses Haskell, so it may be the most relevant one,</div>

<div>- In my group we&#39;ve done some work about size and resource analysis [<a href="http://arxiv.org/abs/1308.3940">http://arxiv.org/abs/1308.3940</a>]. It&#39;s Prolog-based, but the ideas are general and could be applied to your case.</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/9/10 Ian Ross <span dir="ltr">&lt;<a href="mailto:ian@skybluetrades.net" target="_blank">ian@skybluetrades.net</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Not specifically about Haskell, but I read some lecture notes on this topic yesterday (by Michael Schwartzbach, PDF here: <a href="http://lara.epfl.ch/web2010/_media/sav08:schwartzbach.pdf" target="_blank">http://lara.epfl.ch/web2010/_media/sav08:schwartzbach.pdf</a>).  The notes do a good job of explaining how you set up lattices for various kinds of analyses, and how calculating fixed points over those lattices can yield various sorts of interesting information.  Most of the examples are based on a simple imperative language, but much of the analysis is applicable to Haskell as well.</div>


<div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On 10 September 2013 13:15, Maarten Faddegon <span dir="ltr">&lt;<a href="mailto:haskell-cafe@maartenfaddegon.nl" target="_blank">haskell-cafe@maartenfaddegon.nl</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear list,<br>
<br>
I am interested in learning more about static analysis of Haskell code. Specifically of the relation between arguments of recursive and non-recursive calls.<br>
<br>
For example if we look at the ++ function from Prelude:<br>
<br>
        (++) []     ys = ys<br>
        (++) (x:xs) ys = x : xs ++ ys<br>
<br>
amongst others, we could infer the relations:<br>
<br>
        ys_i+1     = ys_i<br>
        (x:xs)_i+1 = xs_i<br>
<br>
Searching the web I found several tools (HLint, Haskabelle, Sourcegraph), but I am interested in the theory behind this. If you could recommend a paper or a book on this topic I would be grateful.<br>
<br>
Thanks,<br>
  Maarten Faddegon<br>
______________________________<u></u>_________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Ian Ross   Tel: <a href="tel:%2B43%280%296804451378" value="+436804451378" target="_blank">+43(0)6804451378</a>   <a href="mailto:ian@skybluetrades.net" target="_blank">ian@skybluetrades.net</a>   <a href="http://www.skybluetrades.net" target="_blank">www.skybluetrades.net</a>
</font></span></div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>