<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9179864086817828776</id><updated>2011-07-28T20:22:38.314-07:00</updated><title type='text'>Summer of Code</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-8796163248811937940</id><published>2007-08-26T23:57:00.000-07:00</published><updated>2007-08-28T14:44:55.339-07:00</updated><title type='text'>Summary</title><content type='html'>&lt;h3&gt;   Project Description &lt;/h3&gt; &lt;h2&gt; &lt;/h2&gt; &lt;p&gt;   FieldStat is a tool for scanning a collection of application binaries in order to understand how a particular set of classes and methods are being used in practice.&lt;/p&gt;One main purpose of the tool is to support prioritizing unit test coverage based on &lt;span style="font-style: italic;"&gt;API usage data&lt;/span&gt; observed in practice.  Developers can view how often and how many applications use certain types and method calls in relation to unit test coverage and difficulty of testing.&lt;br /&gt;This shares similar goals with clean room software engineering in that a reliability model is based on statistical likelihood of occurring.  That is, place more testing effort in more likely occurring scenarios.&lt;br /&gt;&lt;p&gt;The tool relies on the Mono.Cecil assembly to process CIL byte-code instructions.&lt;/p&gt;&lt;h3&gt; &lt;/h3&gt;  &lt;h3&gt;   &lt;b&gt;Delivered&lt;/b&gt; &lt;/h3&gt;&lt;span style="text-decoration: underline; font-weight: bold;"&gt;Planned&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Get up to speed with Cecil.&lt;/li&gt;&lt;li&gt;Extract call graph.&lt;/li&gt;&lt;li&gt;Identify and isolate mono framework calls. &lt;/li&gt;&lt;li&gt;Implement CodeRank algorithm.&lt;/li&gt;&lt;li&gt;Integrate with MonoCov.&lt;/li&gt;&lt;li&gt;Test and Refine application.&lt;/li&gt;&lt;li&gt;Documentation: User manual, design docs, touch-up comments &lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold; text-decoration: underline;"&gt;Extra&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Command Line and Graphics Interface&lt;/li&gt;&lt;li&gt;Export Data&lt;/li&gt;&lt;li&gt;Include other statistics such as application usage count, method complexity.&lt;/li&gt;&lt;li&gt;Plugin Architecture&lt;/li&gt;&lt;li&gt;Plugin for finding Design Fragments (Set of reoccurring system calls)&lt;/li&gt;&lt;li&gt;(External) Improve Mono.Cecil tool to have better support for reconstructing statements and message chain bad code detector.&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="font-size:100%;"&gt;Components&lt;/span&gt;&lt;br /&gt;&lt;/span&gt; &lt;/h1&gt; &lt;h3&gt;&lt;span style="font-size:180%;"&gt;   &lt;/span&gt;Application Repository&lt;/h3&gt;Understanding how API calls are used in practice requires sampling actual software.  Unfortunately, access to business software is limited; however, many open source applications offer a good starting point.&lt;br /&gt;&lt;br /&gt;Over 500 projects were downloaded from the code.google.com project. The projects were selected based on the label: Mono or CSharp. In addition, 2 projects from a company were included. The projects were manually built, or a binary distribution was acquired. Some projects had to be excluded due to immaturity(not building), misclassification, and lacking the appropriate resources to build the project.&lt;h3&gt;&lt;span style="font-size:130%;"&gt;Coverage Data&lt;br /&gt;&lt;/span&gt;&lt;/h3&gt;The &lt;span style="font-size:130%;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="text-decoration: underline;font-family:arial;" &gt;&lt;span style="font-weight: bold;"&gt;monocov&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; tool gathers statement coverage information from the run-time execution of a Mono application.  The statement coverage can be gathered in the following manner.&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;In the mono distribution mcs/class/corlib directory:&lt;br /&gt;&lt;/span&gt;&gt; make run-&lt;span style="color: rgb(0, 0, 102);"&gt;test&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;RUNTIME_FLAGS=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"--profile=monocov:outfile=corlib.cov,+[mscorlib]"&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&gt; monocov --export-xml&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;/tmp/corlib-cov corlib.cov&lt;br /&gt;&lt;br /&gt;However, the generated xml file was intended for presentation, not importing.  Instead,&lt;br /&gt;a new export option is introduced.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;/span&gt;&gt; monocov --export-fieldstat&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt;/tmp/corlib-cov corlib.cov&lt;br /&gt;&lt;a href="http://www.mono-project.com/Code_Coverage"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;h3&gt;Scanners and Analysis&lt;br /&gt;&lt;/h3&gt;FieldStat uses a visitor/collector pattern for gathering statistics.  A &lt;span style="font-style: italic;"&gt;visitor&lt;/span&gt; class walks the assemblies, classes, and methods.  To gather statistics, a &lt;span style="font-style: italic;"&gt;collector &lt;/span&gt;class is registered with the visitor and is notified when a particular a node of interest is visited.  For instance, a collector can be notified whenever a system call is encountered.&lt;br /&gt;&lt;br /&gt;Some default collectors included in FieldStat.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;AppStat&lt;/span&gt; - Simply counts the number of system calls used per application.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;CodeRank&lt;/span&gt; - Build's an application's call tree and calculates the associated code rank of each application method.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;TypeCount&lt;/span&gt; - Counts the number of times a system type and system method is statically called in an application.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Running the Tool&lt;/h3&gt;The simpliest way run FieldStat is to specify the directory containing the coverage information (the -export-fieldstat output from monocov).&lt;br /&gt;&lt;br /&gt;&gt; FieldStat --coverage-path="../../../Data/Coverage Data/coverage_output" FieldStat.exe&lt;br /&gt;&lt;br /&gt;This would output the Results.xml files in the &lt;span style="color: rgb(51, 102, 255);"&gt;output/&lt;/span&gt; directory.&lt;br /&gt;&lt;br /&gt;The file can be read with a XML parser or with the &lt;span style="color: rgb(255, 153, 0);"&gt;DataTable.ReadFile&lt;/span&gt;( file ) call.&lt;br /&gt;&lt;br /&gt;A record is as follows:&lt;br /&gt;&lt;br /&gt;&amp;lt;results&amp;gt;&lt;br /&gt;&amp;lt;type&amp;gt;&lt;span style="color: rgb(0, 153, 0);"&gt;System.IO.Path&lt;/span&gt;&amp;lt;/type&amp;gt;&lt;br /&gt;&amp;lt;method&amp;gt;&lt;span style="color: rgb(0, 153, 0);"&gt;GetFileNameWithoutExtension&lt;/span&gt; (&lt;span style="color: rgb(0, 204, 204);"&gt;string&lt;/span&gt;)&amp;lt;/method&amp;gt;&lt;br /&gt;&amp;lt;length&amp;gt;&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;&amp;lt;/length&amp;gt;&lt;br /&gt;&amp;lt;frequency&amp;gt;&lt;span style="color: rgb(255, 0, 0);"&gt;2&lt;/span&gt;&amp;lt;/frequency&amp;gt;&lt;br /&gt;&amp;lt;rankedfrequency&amp;gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0.30&lt;/span&gt;&amp;lt;/rankedfrequency&amp;gt;&lt;br /&gt;&amp;lt;appfrequency&amp;gt;&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;&amp;lt;/appfrequency&amp;gt;&lt;br /&gt;&amp;lt;coverage&amp;gt;&lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;&amp;lt;/coverage&amp;gt;&lt;br /&gt;&amp;lt;/results&amp;gt;&lt;br /&gt;&lt;h3&gt;Screenshots&lt;/h3&gt;   &lt;h2&gt; &lt;/h2&gt;  &lt;h1&gt;&lt;span style="font-size:130%;"&gt;Plugins and Future Directions&lt;/span&gt;&lt;/h1&gt; &lt;span style="font-size:130%;"&gt;Plugin System&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Plugins can be created by dropping in a &lt;span style="color: rgb(51, 153, 153);"&gt;&lt;/span&gt; file named &lt;span style="color: rgb(51, 153, 153);"&gt;*Plugin.dll&lt;/span&gt; into the &lt;span style="color: rgb(51, 153, 153);"&gt;Plugins/ &lt;span style="color: rgb(0, 0, 0);"&gt;directory.  &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Design Fragments&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An example plugin is included in the source code as the DesignFragmentPlugin project.&lt;br /&gt;&lt;br /&gt;A &lt;span style="font-style: italic;"&gt;design fragment&lt;/span&gt; is a pattern or common usage of a framework.  This plugin attempts to detect candidates for design fragments by looking at common sequences of calls.  This then in turn could be used to improve the framework, or serve as documentation or snippets in how to use the framework.&lt;br /&gt;&lt;br /&gt;For example, the following series of calls was found to occur 10 times in the application repository.  It looks like the user is trying to format a date in a particular way:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;System.DateTime.get_Day ()&lt;br /&gt;System.Int32.ToString ()&lt;br /&gt;System.DateTime.get_Month ()&lt;br /&gt;System.DateTime.get_Year ()&lt;br /&gt;System.Int32.ToString ()&lt;br /&gt;System.String.get_Length ()&lt;br /&gt;System.String.Concat (string,string)&lt;br /&gt;System.String.get_Length ()&lt;br /&gt;System.String.Substring (int,int)&lt;br /&gt;System.String.Concat (System.String[])&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The plugin is written as follows:&lt;br /&gt;&lt;br /&gt;using FieldStat.DataCollection;&lt;br /&gt;using FieldStat.CodeModel;&lt;br /&gt;&lt;br /&gt;public class DesignFragmentPlugin : AbstractPlugin&lt;br /&gt;{&lt;br /&gt;    public override void ComputeResults(Results results, ICollection files, Hashtable htBin)&lt;br /&gt;     {&lt;br /&gt;           Visit scan = new Visit();&lt;br /&gt;          scan.Collectors.Register("DesignFragment", new DesignFragmentCollector());&lt;br /&gt;&lt;br /&gt;          scan.DoScan( files, htBin);&lt;br /&gt;          MyCollector seqs = (MyCollector)scan.Collectors["DesignFragment"];&lt;br /&gt;          &lt;span style="color: rgb(0, 153, 0);"&gt;// Process Results ...&lt;br /&gt;&lt;/span&gt;         }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class DesignFragmentCollector : AbstractCollector&lt;br /&gt;{&lt;br /&gt;    public override void OnMethodBody(MethodBody body)&lt;br /&gt;    {&lt;br /&gt;        ArrayList seq = GetSystemCallSequences(body);&lt;br /&gt;        if (seq.Count &gt; 3)&lt;br /&gt;        {&lt;br /&gt;            sequences.Add(EncodeSequenceCalls( seq ));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    ....&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;SystemSignature&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This plugin extracts the system calls made in an application.  Then the resulting system call signature is compared against the other application's signatures.  The results can be clustered to find common type of applications.  It may also be used to judge the implementation of a well-known type of application.  For example, many irc clients have been written.  How divergent is yours from the other known clients?  Maybe you should have taken advantage of a different architecture that you were not aware of.  (Plugin under development)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-8796163248811937940?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/8796163248811937940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=8796163248811937940' title='42 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/8796163248811937940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/8796163248811937940'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/08/summary.html' title='Summary'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>42</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-4479555465546396946</id><published>2007-08-20T09:52:00.000-07:00</published><updated>2007-08-20T10:00:08.822-07:00</updated><title type='text'>Done. (Sorta)</title><content type='html'>Yesterday I finished implementing all the features that I had planned (and more).&lt;br /&gt;&lt;br /&gt;Some of those features:&lt;br /&gt;&lt;br /&gt;* New CodeRank metric where the use of a system call is weight by that function's code rank.&lt;br /&gt;&lt;br /&gt;* Provide a non-graphics interface to using tool.&lt;br /&gt;&lt;br /&gt;* Provide the ability to write custom plugins for collecting data and creating reports from unit test data and example application repository.&lt;br /&gt;&lt;br /&gt;* Enhanced the grid view to visualize coverage information.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_tdNwO66oILw/RsnHN4mKdQI/AAAAAAAAAIU/ALxV3rONsgc/s1600-h/Consolecoverage.PNG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_tdNwO66oILw/RsnHN4mKdQI/AAAAAAAAAIU/ALxV3rONsgc/s320/Consolecoverage.PNG" alt="" id="BLOGGER_PHOTO_ID_5100827094318478594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I also have a couple more ideas for plugins and how to use the data, but first I want to check in my code and make sure there is sufficient documentation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-4479555465546396946?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/4479555465546396946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=4479555465546396946' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/4479555465546396946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/4479555465546396946'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/08/done-sorta.html' title='Done. (Sorta)'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_tdNwO66oILw/RsnHN4mKdQI/AAAAAAAAAIU/ALxV3rONsgc/s72-c/Consolecoverage.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-6201141498001104125</id><published>2007-08-03T22:50:00.000-07:00</published><updated>2007-08-04T09:13:21.269-07:00</updated><title type='text'>Introducing PopTrees (Detecting Message Chains)</title><content type='html'>I introduce a PopTree as a simple abstraction over CIL and demonstrate how they can be used to find Message Chains.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;Detecting Message Chains.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;Message chains violate the Law of Dementor[1] by accessing a long series of other object's Methods and Properties.  Detecting Message Chains violations in CIL involves understanding the local structure of statements.  A large subset of instructions can occur in the context of a passing values to a method call.  This means understanding the structure of message chains entails understanding much of the CIL instructions used in passing arguments.  In addition, the instructions have to be understood to tell the difference between a sequence of method calls and a chain of method calls.&lt;br /&gt;&lt;br /&gt;The problem is that there isn't good support for representing the instructions as more complex statements.  Usually this is done ad hoc for the purpose of a person's analysis.  Some code in Cecil.FlowAnalysis.ActionFlow has attempted to provide some abstractions over CIL; however, it only implemented a small subset of the instructions.  In addition, the design tried prematurely canonicalizing the instruction tree making it difficult to extend to the full instruction set.&lt;br /&gt;&lt;br /&gt;Instead, I introduce the concept of a PopTree.  A PopTree roughly corresponds to a statement in the original source code.  A PopTree is constructed by simulating the instruction stream to push and pop various values on a state machine.  An instruction 'owns' another instruction if it pops it's value off the stack.  A post-order transversal should closely correspond to the original AST.  The hardest part was examining the spec to see how many pops and pushes an given instruction causes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Algorithm&lt;/span&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public PopTreeList Build( ICollection instructions )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    foreach (Instruction i in instructions)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        PopTree p = new PopTree(i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        int pops = InstructionInfo.Pops(i,_machineStack.Count);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        if (pops &gt; _machineStack.Count)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            // can happen with exception blocks whose support is flaky.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            //Console.WriteLine("Attempting to pop more than machine has: " + i.OpCode.ToString() + " " + i.Operand);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            return null;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        for (int x = 0; x &lt;&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            p.Consume(Pop());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        if (InstructionInfo.Pushes(i))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            Push(p);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;            _popTreeList.Add(p);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    return _popTreeList;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CODE&lt;/span&gt;:&lt;br /&gt;     m1( a1() ).m2( a2() ).m3( a3() )&lt;br /&gt;     &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CIL&lt;/span&gt;:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ld this  ; push [this]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;dup      ; push [this]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;call a1  ; pop [this] -&gt; push [value]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;call m1  ; pop [this] pop [value] -&gt; push [obj]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ld this  ; push [this]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;call a2  ; pop [this] -&gt; push [value2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;call m2  ; pop [obj] pop[value2] -&gt; push [obj2]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ld this  ; push [this]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;call a3  ; pop [this] -&gt; push [value3]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;call m3  ; pop [obj2] pop [value3] -&gt; push [obj3]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;POP TREE&lt;/span&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;               [m3]&lt;br /&gt;          [m2]    [a3]&lt;br /&gt;       [m1]   [a2]    [this] &lt;br /&gt;  [this]  [a1]   [this] &lt;br /&gt;             [this]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;As an example, I have written an scanner that can find message chains in source code.  This works decently well.  However, I have to fix the Cecil.FlowGraph.ControlFlow model so that it can properly handle more advanced control flow -- that way things will work on real-world assemblies.&lt;br /&gt;&lt;br /&gt;Another thing that should be easy is to determine all the variables used in the context of an if statement.  This should make doing branch coverage and other analysis needing to get predicates easier to perform.&lt;br /&gt;&lt;br /&gt;[1] http://en.wikipedia.org/wiki/Law_of_Demeter&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-6201141498001104125?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/6201141498001104125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=6201141498001104125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/6201141498001104125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/6201141498001104125'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/08/introducing-poptrees-detecting-message.html' title='Introducing PopTrees (Detecting Message Chains)'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-5251686301882813962</id><published>2007-07-27T15:57:00.001-07:00</published><updated>2007-07-27T15:59:36.639-07:00</updated><title type='text'>Stats</title><content type='html'>Percentage Used Methods Covered: 0.2572512&lt;br /&gt;&lt;br /&gt;Of the system methods used in the wild, about 75% of them are uncovered/ no unit tests.&lt;br /&gt;&lt;br /&gt;Top10 Frequent Uncovered Methods:&lt;br /&gt;&lt;br /&gt;System.Type.GetTypeFromHandle(runtimetypehandle)[9666],&lt;br /&gt;System.Runtime.InteropServices.UCOMIConnectionPoint.Unadvise (int)[5629],&lt;br /&gt;System.Runtime.InteropServices.UCOMIConnectionPoint.Advise (object,int&amp;amp;)[5509],&lt;br /&gt;System.String.get_Length ()[4866],System.Object.GetType ()[2976],&lt;br /&gt;System.Runtime.InteropServices.GCHandle.Alloc (object,gchandletype)[2744],&lt;br /&gt;System.Runtime.InteropServices.GCHandle.AddrOfPinnedObject ()[2708],&lt;br /&gt;System.String.get_Chars (int)[1751],System.Type.get_FullName ()[1706],&lt;br /&gt;System.Data.DataRow.get_Item (string)[1590]&lt;br /&gt;&lt;br /&gt;Top10 Types Used:&lt;br /&gt;&lt;br /&gt;System.Windows.Forms.Control: 39031,&lt;br /&gt;System.String: 37039,&lt;br /&gt;System.Collections.ArrayList: 33015,&lt;br /&gt;System.Threading.Monitor: 29379,&lt;br /&gt;System.Type: 15596,&lt;br /&gt;System.Collections.IEnumerator: 12835,&lt;br /&gt;System.Runtime.InteropServices.UCOMIConnectionPoint: 11138,&lt;br /&gt;System.Collections.Hashtable: 10776,&lt;br /&gt;System.Delegate: 10191,&lt;br /&gt;System.Runtime.InteropServices.GCHandle: 10056&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-5251686301882813962?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/5251686301882813962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=5251686301882813962' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/5251686301882813962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/5251686301882813962'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/07/stats.html' title='Stats'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-6438540427011191845</id><published>2007-07-27T14:21:00.000-07:00</published><updated>2007-07-27T14:34:47.427-07:00</updated><title type='text'>Correctness+Completeness</title><content type='html'>My last work focused on feasibility and demonstrating the concept.  This time I focused on correctness and completeness.  For example, the analysis didn't distinguish overloads.  Plus I suspected that only some of the coverage data was being joined with the usage data.  I also worked on some minor enhancements like getting the class library method length.&lt;br /&gt;&lt;br /&gt;Turns out the monocov tool outputted the method name without any parameters if it didn't have coverage data.  I was only matching against ones without coverage.  If it did have coverage data, it would generate a name like:&lt;br /&gt;   MethodName (string,byte[],System.Data.DataTable)&lt;br /&gt;&lt;br /&gt;I have my tool match this same format so that it could work with the overloads.  Unfortunately, this results in some custom code because the output shortens certain types like:&lt;br /&gt;  String.String-&gt; string&lt;br /&gt;  String.Int32[] -&gt; int[]&lt;br /&gt;  System.Object -&gt; object&lt;br /&gt;so I had to do the same.&lt;br /&gt;&lt;br /&gt;Currently there is still a problem if the type is a reference (System.String&amp;amp;)&lt;br /&gt;&lt;br /&gt;I also fixed monocov so that it would be consistent in how it would output method names without coverage data.  Otherwise, it would just repeat the same method name for output.&lt;br /&gt;I also fixed a bug in my simplified exporter that would use the same class name if more than one class was in the source file.  While I was in monocov, I also added the feature to be able to export the length of the method.&lt;br /&gt;&lt;br /&gt;Now that I can generate much more sound results, I will be calculating some statistics and be posting them shortly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-6438540427011191845?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/6438540427011191845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=6438540427011191845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/6438540427011191845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/6438540427011191845'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/07/correctnesscompleteness.html' title='Correctness+Completeness'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-1255758259738263864</id><published>2007-07-13T12:41:00.001-07:00</published><updated>2007-07-14T12:32:24.504-07:00</updated><title type='text'>Surprised?</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Unit Testing Effective?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Apparently there is an opposite correlation between methods used in the field, and unit testing coverage.  That is, the methods that the unit test cover, were not used in the field.  The methods that were used, had no coverage.&lt;br /&gt;&lt;br /&gt;A larger sampling and verification of the results is necessary, however it is an interesting result so far.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Data Collection Methods&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Over 500 projects were downloaded from the code.google.com project.  The projects were selected based on the label: Mono or CSharp.  In addition, 2 projects from a company were included.  The projects were manually built, or a binary distribution was acquired.  Some projects had to be excluded due to immaturity(not building), misclassification, and lacking the appropriate resources to build the project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Results&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For this run, only 35 of the projects were included in these results.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_tdNwO66oILw/RpfVeYJ4AwI/AAAAAAAAAFY/1GSovgxjhAk/s1600-h/FieldStatReport.PNG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_tdNwO66oILw/RpfVeYJ4AwI/AAAAAAAAAFY/1GSovgxjhAk/s320/FieldStatReport.PNG" alt="" id="BLOGGER_PHOTO_ID_5086769021994926850" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The information shown includes the type.method and corresponding:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Frequency across all applications.&lt;/li&gt;&lt;li&gt;Number of applications that the type.method appears in.&lt;/li&gt;&lt;li&gt;Coverage for that type.method.  (1  = 100%, 0.50 = 50%, 0 = 0%, -1 = no test data)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Note: Coverage data was not collected for Managed.Windows.Form at this time.&lt;br /&gt;&lt;br /&gt;One thing I think would help would be to display the &lt;span style="font-style: italic;"&gt;(lines of code, complexity of method)&lt;/span&gt; in order to estimate how hard the method is to test or if it is worth testing.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Viewing the Results Yourself&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I uploaded the results here:&lt;br /&gt;&lt;a href="http://groups.google.com/group/mono-soc-2007/web/FieldStatResults.xml"&gt;http://groups.google.com/group/mono-soc-2007/web/FieldStatResults.xml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can get the mono student projects from here&lt;br /&gt;&lt;tt&gt;svn checkout &lt;b&gt;&lt;i&gt;http&lt;/i&gt;&lt;/b&gt;://mono-soc-2007.googlecode.com/svn/trunk/ mono-soc-2007&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Compile from source or run the executable (Relies on WindowForms) under the directory:&lt;br /&gt;christopher/FieldStat/FieldStat/bin/Release/FieldStat.exe&lt;br /&gt;&lt;br /&gt;You can easily load the results under the Results tab using the(Import Results) button.  Load the xml file on the web, or in christopher/FieldStat/Data/Results/FieldStatResults.xml&lt;br /&gt;&lt;br /&gt;The default sort is on AppFrequency, you can resort on the other fields by clicking the columns.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Lessons and Design Issues&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;My original focus was initially just on accurately getting usage results from one executable and comparing that to the coverage data.  However, I soon realized whenI was working with real data that the real challenge was with dealing with many applications and how the information varies across them.  There are some interesting emergent problems.  For instance, an application uses the log4net library.  Is that treated as part of the application?  What if several applications are linking that library.&lt;br /&gt;&lt;br /&gt;The collection of the applications for sampling field data should be a project in itself.  There should be easy automated way to scan code.google.com, sourceforge, etc and gather executables as samples.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-1255758259738263864?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/1255758259738263864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=1255758259738263864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/1255758259738263864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/1255758259738263864'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/07/surprised.html' title='Surprised?'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_tdNwO66oILw/RpfVeYJ4AwI/AAAAAAAAAFY/1GSovgxjhAk/s72-c/FieldStatReport.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-200656450048605197</id><published>2007-07-03T23:13:00.000-07:00</published><updated>2007-07-03T23:30:10.808-07:00</updated><title type='text'>Prototype Complete</title><content type='html'>I was recently squirreled away in the Rocky Mountains of Canada, so I couldn't make updates over the wire.  However, I have successful completed the prototype mono coverage tool.&lt;br /&gt;&lt;br /&gt;So far, I have only ran the program on a small set of data and coverage data, so I cannot make any bold statements about any glaring mismatches in unit testing.  However, I do have some observations. &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Statements that are uncovered, tend to be paths for exceptional behavior.&lt;/li&gt;&lt;li&gt;I think more levels of coverage should be supported: Branch, conditionals, etc.&lt;/li&gt;&lt;li&gt;The monocov tool could use a good round of refactoring.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Some stumbling blocks included&lt;br /&gt;&lt;ul&gt;&lt;li&gt;extra hoops in building mono as a non-root user (prefixes, no ldconfig, etc) &lt;br /&gt;&lt;/li&gt;&lt;li&gt;The monocov tool's export was intended for pretty presentation, rather than exporting to other tools.&lt;/li&gt;&lt;/ul&gt;Outstanding tasks include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Frequency information isn't accounting for overloads.&lt;/li&gt;&lt;li&gt;Need to collect all coverage information and run the tool over several field binaries.&lt;/li&gt;&lt;/ul&gt;Phase 2 developments steps include implementing CodeRank to weight the frequency, and introducing an alternative user interface for viewing the data.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-200656450048605197?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/200656450048605197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=200656450048605197' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/200656450048605197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/200656450048605197'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/07/prototype-complete.html' title='Prototype Complete'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-882972084169973493</id><published>2007-06-22T13:41:00.000-07:00</published><updated>2007-06-22T13:47:39.775-07:00</updated><title type='text'>Mono Test Coverage</title><content type='html'>I'm in the process of collecting profile data from the various unit tests on Mono code.&lt;br /&gt;That way I can pipe the profile data through monocov, and then spit out the coverage data and associate it with frequency information collected from the field.&lt;br /&gt;&lt;br /&gt;The current coverage tool, Monocov, isn't written/distributed in a very Windows friendly manager.  In addition, I have a feeling that Mono could use a good streamline process for their unit tests.  It appears they used to run a webserver that was updated with test suite status about 2 years ago, but since have stopped.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-882972084169973493?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/882972084169973493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=882972084169973493' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/882972084169973493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/882972084169973493'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/06/mono-test-coverage.html' title='Mono Test Coverage'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-1438922203608964661</id><published>2007-06-11T23:31:00.000-07:00</published><updated>2007-06-11T23:51:04.483-07:00</updated><title type='text'>Prototype Started...</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_tdNwO66oILw/Rm4-Wfqh6GI/AAAAAAAAABk/R9tGYmrUiAY/s1600-h/FieldStat.PNG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_tdNwO66oILw/Rm4-Wfqh6GI/AAAAAAAAABk/R9tGYmrUiAY/s320/FieldStat.PNG" alt="" id="BLOGGER_PHOTO_ID_5075062386271053922" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Since I did all I could with my ASE submission, I decided to take my previous hacks/scripts, and make an initial stab at a prototype.&lt;br /&gt;&lt;br /&gt;The protoype loads an assembly(s), and performs a scan to count references to system type method calls.  This scan is from a professionally developed C# application.  In this example, String.Concat is statically referenced 1148 times.  This started me thinking what other information could you use with a method usage profile?  Classification, bad call smells?&lt;br /&gt;&lt;br /&gt;My next step will be to associate this information with the unit test coverage tool.  Then, the prototype would have completed the full process.  However, there are several problems with the basic frequency metrics and straightforward tool.  (1) The calling context is not taken into account (which is related to dynamic usage is not static usage).  (2) The nature of the coverage data and Mono code structure is not accounted for.  (3) The presentation of information can use a more advanced task-oriented interface, report, and/or visualization options.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-1438922203608964661?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/1438922203608964661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=1438922203608964661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/1438922203608964661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/1438922203608964661'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/06/prototype-started.html' title='Prototype Started...'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_tdNwO66oILw/Rm4-Wfqh6GI/AAAAAAAAABk/R9tGYmrUiAY/s72-c/FieldStat.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-3469263260729260220</id><published>2007-06-10T21:18:00.000-07:00</published><updated>2007-06-10T21:24:47.273-07:00</updated><title type='text'>Status #2</title><content type='html'>I have been spending this week working on a conference paper deadline.  I had did some work up front before Google Summer of Code started in anticipation of this paper deadline.&lt;br /&gt;&lt;br /&gt;This coming week, I want to have a prototype that runs through the entire process of the tool.  The prototype will start with a simple user interface that allows selection and parameterization of the deployed executable.  Then it will run an method/type usage report and present the results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-3469263260729260220?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/3469263260729260220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=3469263260729260220' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/3469263260729260220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/3469263260729260220'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/06/status-2.html' title='Status #2'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-251663899330371523</id><published>2007-06-02T21:52:00.000-07:00</published><updated>2007-06-02T22:11:24.066-07:00</updated><title type='text'>Status</title><content type='html'>I have used a more robust way of identifying to which assembly a call belongs.  Rather than just the namespace, the signed key for the assembly can be accessed through the Context property.&lt;br /&gt;&lt;br /&gt;I imagine on the front end that one way a user would want to make a query on the types usage is something like: System.Text.* or System.*.&lt;br /&gt;&lt;br /&gt;I have talked with Alex Orso who has pointed out some related work in residual coverage testing.&lt;br /&gt;&lt;br /&gt;Furthermore, I have began setting up my testbed.  I've been trying to gather various Mono applications in the wild.  It is not as straight-forward as it sounds considering how diverse each project configuration is.  So any donations for Mono executables would  be accepted :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-251663899330371523?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/251663899330371523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=251663899330371523' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/251663899330371523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/251663899330371523'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/06/status.html' title='Status'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-2902526476828014422</id><published>2007-05-28T07:18:00.000-07:00</published><updated>2007-05-28T08:39:31.479-07:00</updated><title type='text'>Thoughts after ICSE</title><content type='html'>I've just returned from ICSE May 18th-May 26th.  I had the chance to attend several workshops and talks and meet with several people.&lt;br /&gt;&lt;br /&gt;One interesting thing discussed during the Mining Software Repository workshop was several ways of correlating defect density with software modules.  One simple metric with high correlation was importing a package or namespace.  In Eclipse, a class importing the 'compiler' package has a 71% chance of containing a bug.  This is likely due to some concepts being more error-prone and show up when importing the package.&lt;br /&gt;&lt;br /&gt;One discussion I had with Jon Cook was the difference between run-time usage frequency versus static frequency.  We concluded that CodeRank or (some other static analysis) would potentially try to approximate what the distribution of run-time frequency would be against the static call sites.  Empirical evaluation would be needed to confirm how well something like CodeRank approximates run-time distributions of usage.  If this turns out to not work well, then a backup plan would be to use instruction coverage or runtime profiles from programs such as &lt;span style="font-weight:bold;"&gt;gcov&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I will be talking with Alex Orso this week or next for his opinion.&lt;br /&gt;&lt;br /&gt;I also had some of my own thoughts about how to visualize the eventual output.&lt;br /&gt;This is an interesting visualization problem because a framework developer may want to see the distribution of types/methods across several deployed applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-2902526476828014422?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/2902526476828014422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=2902526476828014422' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/2902526476828014422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/2902526476828014422'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/05/thoughts-after-icse.html' title='Thoughts after ICSE'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-3318955966363295309</id><published>2007-05-18T07:40:00.000-07:00</published><updated>2007-05-18T07:47:05.169-07:00</updated><title type='text'>ICSE and Plan</title><content type='html'>I will be leaving today to attend the International Conference on Software Engineering.  My summer of code project will be one of the things on the agenda that I hope to get some feedback on.&lt;br /&gt;&lt;br /&gt;That said, I want to post within the next few days a more thorough development plan that includes more concrete milestones and deliverables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-3318955966363295309?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/3318955966363295309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=3318955966363295309' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/3318955966363295309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/3318955966363295309'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/05/icse-and-plan.html' title='ICSE and Plan'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-7370732890234298451</id><published>2007-05-14T21:16:00.000-07:00</published><updated>2007-05-14T21:31:20.490-07:00</updated><title type='text'>System Calls</title><content type='html'>Found a simple way to isolate system calls versus non-framework calls.&lt;br /&gt;&lt;br /&gt;In MSIL, a call instruction includes the fully qualified name.  Therefore, using Cecil you can do the following:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;if (i.OpCode == Mono.Cecil.Cil.OpCodes.Call)&lt;br /&gt;{&lt;br /&gt;    MethodReference rf = (MethodReference)i.Operand;&lt;br /&gt;    if (rf.DeclaringType.Namespace.StartsWith("System"))&lt;br /&gt;    {&lt;br /&gt;            systemCount++;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;            nonSystemCount++;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Currently considering what architecture is best for storing type/method call frequency which would be more complicated than simple system-calls frequency.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-7370732890234298451?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/7370732890234298451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=7370732890234298451' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/7370732890234298451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/7370732890234298451'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/05/system-calls.html' title='System Calls'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-3024264296350327675</id><published>2007-05-13T23:04:00.000-07:00</published><updated>2007-05-13T23:07:23.845-07:00</updated><title type='text'>Mono.Cecil</title><content type='html'>Downloaded and played around with Mono.Cecil.  The framework seems very similar with instrumentor code I've written using Rails.NET.  Wondering if I should try out a mini-project to get my hands more dirty with Cecil.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-3024264296350327675?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/3024264296350327675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=3024264296350327675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/3024264296350327675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/3024264296350327675'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/05/monocecil.html' title='Mono.Cecil'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9179864086817828776.post-71934766157636588</id><published>2007-05-09T10:20:00.000-07:00</published><updated>2007-05-09T10:21:08.346-07:00</updated><title type='text'>Day 1</title><content type='html'>Establishing blog for the purpose of tracking progress for my google summer of code project.&lt;br /&gt;&lt;br /&gt;This is the text of my abstract:&lt;br /&gt;&lt;br /&gt;Code coverage, typically referring to statement coverage, is a technique for estimating the adequacy of test cases. Achieving 100% code coverage is very difficult if not impossible. Prioritizing the development of new test cases to cover untested code requires an understanding of which criteria is most important. One criterion is to test code that is more likely to generate faults. Another criterion is to test code that is more frequently used from which it follows that code is more important and needs to be reliable.&lt;br /&gt;&lt;br /&gt;An approach for favoring the important but uncovered code involves an algorithm that is capable of ranking the importance of code. CodeRank is a technique that is similar in spirit with Google’s PageRank –- important methods link to other important methods. The CodeRank creates an ordered ranking of all the methods where each rating assigned to a method gives its relative percent importance. This rating can be scaled by other factors including call frequency.&lt;br /&gt;&lt;br /&gt;The delivered outcome will be a modified version of MonoCov that presents the code coverage criteria, but includes the option to rank the output by CodeRank. Future work would allow visualizing prioritized code coverage in a treemap representation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9179864086817828776-71934766157636588?l=gameweld-soc.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gameweld-soc.blogspot.com/feeds/71934766157636588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9179864086817828776&amp;postID=71934766157636588' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/71934766157636588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9179864086817828776/posts/default/71934766157636588'/><link rel='alternate' type='text/html' href='http://gameweld-soc.blogspot.com/2007/05/day-1.html' title='Day 1'/><author><name>Chris</name><uri>http://www.blogger.com/profile/06547792405281136265</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
