<?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-28873279</id><updated>2011-11-28T01:40:11.988+01:00</updated><category term='Me'/><category term='Random Interesting Stuff'/><category term='PHP-Front'/><category term='codeQuality'/><category term='PHP-SAT'/><category term='Conference'/><category term='PhD'/><category term='Trivia'/><category term='php-tools'/><category term='Summer of Code'/><category term='Thesis'/><category term='Grammar Engineering Tools'/><category term='presentation'/><title type='text'>Bouwers &gt; Eric &gt; Blog</title><subtitle type='html'>&lt;i&gt;It is not pure, but it is practical...&lt;/i&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default?start-index=101&amp;max-results=100'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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>114</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-28873279.post-5412395124383751231</id><published>2011-08-28T16:49:00.002+02:00</published><updated>2011-08-28T17:13:31.636+02:00</updated><title type='text'>A last post?</title><content type='html'>It took some time to actually post it here, but I am very pleased to say that the paper &lt;a href="http://www.st.ewi.tudelft.nl/~bouwers/main/?page=publications""&gt;"Dependency Proﬁles for Software Architecture Evaluations"&lt;/a&gt; by Bouwers,  &lt;a href="http://homepages.cwi.nl/~arie/"&gt;van Deursen&lt;/a&gt; and &lt;a href="http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joost/"&gt;Visser&lt;/a&gt; has been accepted at the &lt;a href="http://www.cs.wm.edu/icsm2011/?page_id=281"&gt;Early Research Achievements&lt;/a&gt;-track of the &lt;a href="http://www.cs.wm.edu/icsm2011/"&gt;27th IEEE International Conference on Software Maintenance&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Before dumping the abstract I want to confess that I have given in and created a &lt;a href="http://twitter.com/#!/EricBouwers"&gt;twitter-account&lt;/a&gt;. As you might have noticed, my updates have been infrequently at best. This is mainly because it takes me a long time before I start writing. Let's see whether this twitter-thing makes this easier!&lt;br /&gt;&lt;br /&gt;Abstract: &lt;br /&gt;&lt;i&gt;In this paper we introduce the concept of a “dependency profile”, a system level metric aimed at quantifying the level of encapsulation and independence within a system. We verify that these profiles are suitable to be used in an evaluation context by inspecting the dependency profiles for a repository of almost 100 systems. Furthermore we outline the steps we are taking to validate the usefulness and applicability of the proposed profiles.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-5412395124383751231?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/5412395124383751231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=5412395124383751231' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5412395124383751231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5412395124383751231'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2011/08/last-post.html' title='A last post?'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-861451591274322163</id><published>2011-04-04T15:00:00.002+02:00</published><updated>2011-04-04T15:00:05.048+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PhD'/><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><title type='text'>WICSA 2011</title><content type='html'>And yet another publication to announce! I am very happy to tell you all that the paper "&lt;a href="http://www.st.ewi.tudelft.nl/~bouwers/main/?page=publications"&gt;Quantifying the Analyzability of Software Architectures&lt;/a&gt;" by Bouwers, Correia, &lt;a href="http://homepages.cwi.nl/~arie/"&gt;van Deursen&lt;/a&gt; and &lt;a href="http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joost/"&gt;Visser&lt;/a&gt; has been accepted at the &lt;a href="http://www.wicsa.net/"&gt;9th Working IEEE/IFIP Conference on Software Architecture&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;Abstract: &lt;br /&gt;&lt;i&gt;The decomposition of a software system into components is a major decision in any software architecture, having a strong influence on many of its quality aspects. A system’s analyzability, in particular, is influenced by its decomposition into components. But into how many components should a system be decomposed to achieve optimal analyzability? And how should the elements of the system be distributed over those components?&lt;br /&gt;In this paper, we set out to find answers to these questions with the support of a large repository of industrial and opensource software systems. Based on our findings, we designed a metric which we call Component Balance. In a case study we show that the metric provides pertinent results in various evaluation scenarios. In addition, we report on an empirical study that demonstrates that the metric is strongly correlated with ratings for analyzability as given by experts.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;(and yes, maybe twitter is not such a bad idea if I keep on writing these short posts :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-861451591274322163?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/861451591274322163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=861451591274322163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/861451591274322163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/861451591274322163'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2011/04/wicsa-2011.html' title='WICSA 2011'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-5660699234991430295</id><published>2011-03-02T13:28:00.000+01:00</published><updated>2011-03-25T13:36:11.176+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PhD'/><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><title type='text'>SQM 2011</title><content type='html'>Yes I know, it is a bit late. However, I am still very pleased that the paper &lt;a href="http://www.st.ewi.tudelft.nl/~bouwers/main/?page=publications#2011"&gt;Preparing for a Literature Survey of Software Architecture using Formal Concept Analysis&lt;/a&gt; by L. Couto, J.N. Oliveira, M.A. Ferreira and E. Bouwers has been accepted (and presented) at the &lt;a href="http://sqm2011.sig.eu/"&gt;Fifth International Workshop on Software Quality and Maintainability&lt;/a&gt;! &lt;br /&gt;&lt;br /&gt;The abstract:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;The scientific literature on Software Architecture(SA) is extensive and dense. With no preparation, surveying this literature can be a daunting task for novices in the field. This paper resorts to the technique of Formal Concept Analysis (FCA) in organizing and structuring such a body of knowledge. We start by surveying a set of 38 papers bearing in mind the following questions: “What are the most supported definitions of software architecture?”, “What are the most popular research topics in software architecture?”, “What are the most relevant quality attributes of a software architecture?” and “What are the topics that researchers point out as being more interesting to explore in the future?”. To answer these questions we classify each paper with appropriate keywords and apply FCA to such a classification. FCA allows us to structure our survey in the form of lattices of concepts which give evidence of main relationships involved. We believe our results will help in guiding a more comprehensive, in-depth study of the field, to be carried out in the future.&lt;br /&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-5660699234991430295?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/5660699234991430295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=5660699234991430295' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5660699234991430295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5660699234991430295'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2011/03/sqm-2011.html' title='SQM 2011'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-3175539338825336663</id><published>2011-01-02T14:04:00.008+01:00</published><updated>2011-01-09T11:14:51.146+01:00</updated><title type='text'>A new year, a new set of chances</title><content type='html'>At the end of the old year (or the start of the new year) there is usually some time to clean up the old stuff and get around to the things you keep postponing. &lt;br /&gt;&lt;br /&gt;In my case, I finally got around to put the slides of my &lt;a href="http://www.lac2010.nl/"&gt;Landelijk Architectuur Congres&lt;/a&gt; (National Architecture Congress) presentation &lt;a href="http://www.st.ewi.tudelft.nl/~bouwers/main/slides/2010lac.pdf"&gt;on-line&lt;/a&gt;. Currently the slides are in Dutch, but fortunately I got an invitation to present the work to an English audience. A nice chance (and 'stick-behind-the-door') for me to translate the slides.&lt;br /&gt;&lt;br /&gt;And although it might be a bit late (the deadline is just around the corner), the new year still offers you a chance to participate in the &lt;a href="http://www.sei.cmu.edu/community/td2011/"&gt;Second Workshop on Managing Technical Debt 2011&lt;/a&gt;, to be held on the 23th of May.&lt;br /&gt;&lt;br /&gt;It might be fun to try to explain what 'Technical Debt' is and why you should care about it, but I believe others already did this better than I could. So let me just point you to &lt;a href="http://pkruchten.wordpress.com/2010/11/20/technical-debt-workshop-paper-game-presentation/"&gt;this post of Philippe Kruchten&lt;/a&gt;, which contains all the information and links you need to get started. Looking forward to your contributions!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-3175539338825336663?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/3175539338825336663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=3175539338825336663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3175539338825336663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3175539338825336663'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2011/01/new-year-new-set-of-chances.html' title='A new year, a new set of chances'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-7405372629686903005</id><published>2010-10-03T16:15:00.004+02:00</published><updated>2010-10-03T16:40:01.270+02:00</updated><title type='text'>Attending LASER 2010</title><content type='html'>Today I managed to go through my notes of the 2010 edition of the &lt;a href="http://laser.inf.ethz.ch/2010/"&gt;LASER summerschool series&lt;/a&gt;. While doing this I realized that, apart from the fancy &lt;a href="http://www.hoteldelgolfo.it/"&gt;hotel&lt;/a&gt;, the good food, the nice people and the great weather, the trip also had a high educational value!&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.ipd.uni-karlsruhe.de/~tichy/"&gt;Walter Tichy&lt;/a&gt; explained several important aspects, which I need to take into account while designing my next empirical study.&lt;br /&gt;&lt;/li&gt;&lt;li&gt; In addition, &lt;a href="http://www.grise.upm.es/miembros/natalia/index.php"&gt;Natalia Juristo&lt;/a&gt; pointed out several things I will keep in mind during this design in order to make sure others can repeat it. &lt;/li&gt;&lt;li&gt;&lt;a href="http://menzies.us/"&gt;Tim Menzies&lt;/a&gt; gave a very good introduction into the ins and outs of data-mining (in such a way I actually want to try it out)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://se.ethz.ch/~meyer/"&gt;Bertrand Meyer&lt;/a&gt; (and his students) made me aware of some testing techniques I forgot about.&lt;/li&gt;&lt;li&gt;The presentation of &lt;a href="http://laser.inf.ethz.ch/2010/speakers.php#Bloch"&gt;Joshua Bloch&lt;/a&gt; was, for me, less relevant from a PhD point-of-view, but his thoughts about good API design are extremely interesting from a developers point of view. &lt;/li&gt;&lt;li&gt;It was really fun (and interesting) to hear &lt;a href="http://sunset.usc.edu/Research_Group/barry.html"&gt;Barry Boehm&lt;/a&gt; explain his research on estimation models and how empirical SE can be integrated into education.&lt;/li&gt;&lt;li&gt;Last but not least, the presentations of &lt;a href="http://www.cs.umd.edu/~basili/"&gt;Victor Basili&lt;/a&gt; contained a lot of stuff which I believe is relevant for what we are doing at &lt;a href="http://www.sig.eu"&gt;SIG&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Now, all we have to do is to figure out how we can free up some time to apply all that we learned :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-7405372629686903005?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/7405372629686903005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=7405372629686903005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7405372629686903005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7405372629686903005'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2010/10/attending-laser-2010.html' title='Attending LASER 2010'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-6544420617251752847</id><published>2010-09-18T13:32:00.006+02:00</published><updated>2010-09-18T14:33:53.220+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='codeQuality'/><category scheme='http://www.blogger.com/atom/ns#' term='PhD'/><title type='text'>A magazine article</title><content type='html'>This week I received some hard-copies of the &lt;a href="http://www.computer.org/portal/web/csdl/magazines/software#3"&gt;July/August issue&lt;/a&gt; of the &lt;a href="http://www.computer.org/portal/web/software/home"&gt;IEEE Software magazine&lt;/a&gt;. This issue contains an article called&lt;br /&gt; &lt;i&gt;&lt;a href="http://www.computer.org/portal/web/csdl/doi/10.1109/MS.2010.60"&gt;A Lightweight Sanity  Check for Implemented Architectures&lt;/a&gt; &lt;/i&gt;&lt;br /&gt;which is written by &lt;a href="http://www.st.ewi.tudelft.nl/~arie/"&gt;Arie van Deursen&lt;/a&gt; and yours truly.&lt;br /&gt;&lt;br /&gt;The article looks really great, it has multiple colours, pull-quotes, a side-bar and pictures! And although good looks are sometimes deceiving, this article also contains some pretty interesting content (if I do say so myself). &lt;br /&gt;&lt;br /&gt;As expected, it describes a check-list which can be used to get a quick overview of the state of the implemented architecture of a system. Such an overview helps in determining which parts of the architecture can be improved, or confirms that everything is in good shape. I believe that both outcomes are interesting, so I recommend everybody to give &lt;a href="http://www.sig.eu/en/liscia"&gt;LiSCIA&lt;/a&gt; a try!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-6544420617251752847?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/6544420617251752847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=6544420617251752847' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/6544420617251752847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/6544420617251752847'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2010/09/magazine-article.html' title='A magazine article'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-9155446008309845586</id><published>2009-11-19T20:59:00.005+01:00</published><updated>2009-11-22T18:19:41.762+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='codeQuality'/><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation'/><title type='text'>A 5 star system!</title><content type='html'>My presentation on JFall 2009 went very well, there was a big audience (they barely fit into the room) and there was lot's of interaction going on during the talk. People where asking critical questions and provided good comments.&lt;br /&gt;&lt;br /&gt;The topic seemed to make people pretty enthusiastic. Especially the examples of a really complex method, the biggest method and a method with a lot of parameters. &lt;br /&gt;&lt;br /&gt;In the presentation I answered the following two questions: 1) what is a 5-star system, and 2) how can I get one? The answer to the first question is: "a system that receives the highest rating in the &lt;a href="http://www.tuvit.de/english/Maintainability.asp"&gt;TUVit Trusted Product Maintainability Certification&lt;/a&gt;". I explained what this certificate entails and how the complete procedure works (something which is also summarized over &lt;a href="http://www.sig.nl/en/Services/Software%20Product%20Certification/Certification%20in%20Detail/"&gt;here&lt;/a&gt;). &lt;br /&gt;&lt;br /&gt;The second question is answered by the following mantra: "make sure that your code is &lt;i&gt;small, simple and specific&lt;/i&gt;".&lt;br /&gt;&lt;br /&gt;If you cannot make your code small, simple and specific, take a step back and look at the abstract picture (the overall design) of your project. Why does this design disallow you to make your code small, simple and specific? &lt;br /&gt;&lt;br /&gt;Can you model stuff differently? Is there a way to abstract over details that clutter your code? How can this type of functionality be grouped in a better way? Try to determine why the design (or your framework) is restricting you and solve that problem. The result will be a more maintainable system.&lt;br /&gt;&lt;br /&gt;Naturally, these answers are just the core of the talk, a more complete overview of the presentation is provided by the &lt;a href="http://adi.atosoriginblog.nl/2009/11/13/jfall-2009-5-sterren-project-wat-en-hoe/"&gt;Atos Application and Development blog&lt;/a&gt; (Dutch). For those interested, the slides can be found &lt;a href="http://www.st.ewi.tudelft.nl/~bouwers/main/slides/2009jfall.pdf"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;All and all a nice experience, on to JSpring 2010!?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-9155446008309845586?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/9155446008309845586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=9155446008309845586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/9155446008309845586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/9155446008309845586'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2009/11/5-star-system.html' title='A 5 star system!'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-297008989587717119</id><published>2009-10-11T14:54:00.003+02:00</published><updated>2009-10-11T15:05:43.155+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation'/><title type='text'>A 5 star system?</title><content type='html'>This week I received notice that my proposal for a presentation at the &lt;a href="http://www.nljug.org/jfall/"&gt;J-Fall 2009&lt;/a&gt; was accepted. So on the 11th of November I will be discussing what a 5-star system is and how to get it. For those of you who cannot wait to find out what it means to get stars for your system can take a quick look over &lt;a href="http://www.sig.nl/en/News%20%26%20publications/News/436.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The full abstract of the presentation can be found &lt;a href="http://www.nljug.org/pages/events/content/jfall_2009/sessions/00029/"&gt;here (in Dutch)&lt;/a&gt;. If you want to attend you should register yourself over &lt;a href="http://www.nljug.org/pages/events/content/jfall_2009/registration/?template=show_registration.html&amp;fs=1"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Hope to see you in &lt;a href="http://maps.google.nl/maps/place?cid=14230865904038599216&amp;q=%27t+spant+bussum+nederland&amp;hl=nl"&gt;Bussum!&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-297008989587717119?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/297008989587717119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=297008989587717119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/297008989587717119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/297008989587717119'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2009/10/5-star-system.html' title='A 5 star system?'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-1297649191215263532</id><published>2009-09-27T16:28:00.007+02:00</published><updated>2009-10-11T15:01:14.302+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PhD'/><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><category scheme='http://www.blogger.com/atom/ns#' term='presentation'/><title type='text'>I present, you present ....</title><content type='html'>Last week I was in Canada for the &lt;a href="http://icsm2009.cs.ualberta.ca/"&gt;ICSM 2009&lt;/a&gt; (combined with a very relaxing vacation btw) where I got to present my &lt;a href="http://ericbouwers.blogspot.com/2009/05/first-chapter.html"&gt;first paper of my PhD&lt;/a&gt;. The room was a filled with about 50 attendees and, even though I was a bit nervous, the presentation went pretty well. There where some interesting questions and comments, and even a small discussion that had to be taken off-line (which is now again &lt;a href="http://spoonfulofhacking.blogspot.com/2009/09/architecture-evaluation.html"&gt;on-line&lt;/a&gt;). &lt;br /&gt;&lt;br /&gt;During the rest of the ICSM I talked to various people about the presentation and the paper and it seems that the topic certainly appeals to several people. Which is good to know since I think I will be spending some more time in researching it. &lt;br /&gt;&lt;br /&gt;For those of you that are interested in the slides, please take a look at the &lt;a href="https://sites.google.com/site/ieeeicsm09/"&gt;slides page&lt;/a&gt; of the ICSM, or just follow the &lt;a href="https://sites.google.com/site/ieeeicsm09/home/icsmCriteria.pdf?attredirects=0"&gt;direct link&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;To be honest, these slides are not exactly the ones I used during the presentation. I cheated a little bit by splitting a slide 22 in two slides, just so that you can actual see the contents of a table. In the original version there was an animation that removes the numbers before showing the crosses, but this behavior is not transferred to the pdf-version of the slides. I can tell you from personal experience that it will increase your blood pressure if you notice this when you are giving your presentation. &lt;br /&gt;&lt;br /&gt;Anyhow, at least I learned now to check the pdf-version of my slides before I give I a presentation, just in case the laptop on which I made the presentation does not play nicely with the available beamer :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-1297649191215263532?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/1297649191215263532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=1297649191215263532' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1297649191215263532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1297649191215263532'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2009/09/i-present-you-present.html' title='I present, you present ....'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-4640736200339572772</id><published>2009-05-31T15:25:00.003+02:00</published><updated>2009-05-31T15:50:02.043+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PhD'/><title type='text'>A first chapter</title><content type='html'>Yesterday morning at about 5.48 am I received an email with the following message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;We are pleased to inform you that your paper, entitled &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Criteria for the Evaluation of Implemented Architectures&lt;span style="font-style:italic;"&gt;&lt;br /&gt;has been accepted for publication as a FULL RESEARCH PAPER in the conference proceedings. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The e-mail was send by the &lt;a href="http://icsm2009.cs.ualberta.ca/"&gt;ICSM 2009&lt;/a&gt; Research Program Co-Chairs. It also explained that out of the 162 research papers submitted, 35 were accepted as full research papers (21.6% acceptance ratio). A nice beginning of my PhD thesis :)&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Abstract:&lt;/h4&gt;Software architecture evaluation methods aim at identifying potential&lt;br /&gt;maintainability problems for a given architecture.  Several of these&lt;br /&gt;methods exist, which typically prescribe the structure of the&lt;br /&gt;evaluation process.  Often left implicit, however, are the concrete&lt;br /&gt;system attributes that need to be studied in order to assess the&lt;br /&gt;maintainability of implemented architectures.&lt;br /&gt;&lt;br /&gt;To determine this set of attributes, we have performed an empirical&lt;br /&gt;study on over 40 commercial architectural evaluations conducted during&lt;br /&gt;the past two years as part of a systematic ``Software Risk Assessment''. &lt;br /&gt;We present this study and we explain how the identified attributes can be&lt;br /&gt;projected on various architectural system properties, which provides an &lt;br /&gt;overview of criteria for the evaluation of the maintainability of implemented software architectures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-4640736200339572772?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/4640736200339572772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=4640736200339572772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4640736200339572772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4640736200339572772'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2009/05/first-chapter.html' title='A first chapter'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-7791115360617148983</id><published>2009-04-14T20:13:00.005+02:00</published><updated>2009-04-20T22:51:26.637+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Random Interesting Stuff'/><title type='text'>Solving bad smells</title><content type='html'>Last week I took some time to checkout the &lt;a href="http://www.jdeodorant.com/"&gt;JDeodorant&lt;/a&gt; Eclipse plugin. The plugin was introduced to me at &lt;a href="http://csmr2009.iese.fraunhofer.de/"&gt;CSMR 2009&lt;/a&gt; by &lt;a href="java.uom.gr/~nikos/"&gt;Nikolaos Tsantalis&lt;/a&gt;. The demo he gave me already showed some potential, and playing around with the plugin  confirmed this first impression.&lt;br /&gt;&lt;br /&gt;Installing the plugin was easy, I just followed the &lt;a href="http://java.uom.gr/~jdeodorant/index.php?option=com_content&amp;view=article&amp;id=69&amp;Itemid=53"&gt;installation instructions&lt;/a&gt; on the website. At first I used the tool on one of our smaller projects to find refactorings for long methods. After some minutes the results showed a long list of refactor-candidates. Unfortunately, this lists also contained many propositions to move, for example, all statements of a method to a new method. Even though it is a theoretically correct proposition it does not really make sense in general. &lt;br /&gt;&lt;br /&gt;Since I did not feel like analyzing the complete list I tried a different approach. I first used checkstyle to find potential candidate methods and let JDeodorant analyze these files one at a time. This does not only speed up the process of finding the candidates, it also provides a list that is way easier to handle. Using this approach I found some new ideas for a several smaller refactorings in just a few minutes.&lt;br /&gt;&lt;br /&gt;In the end I think that, even though it still has some rough edges, this plugin can be very useful. Anyway, the plugin is definitely put onto my watch list.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-7791115360617148983?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/7791115360617148983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=7791115360617148983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7791115360617148983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7791115360617148983'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2009/04/solving-bad-smells.html' title='Solving bad smells'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-5366515874152823537</id><published>2009-03-29T17:02:00.005+02:00</published><updated>2009-03-30T22:08:15.724+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PhD'/><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><title type='text'>SQM and CSMR 2009</title><content type='html'>&lt;img src="http://www.swerl.tudelft.nl/sqm2009/images/csmr2009.jpg" width="150px" style="float: right;"/&gt; Last week, I was in &lt;a href="http://en.wikipedia.org/wiki/Kaiserslautern"&gt;Kaiserslautern&lt;/a&gt; to attend the 2009 version of &lt;a href="http://www.swerl.tudelft.nl/sqm2009/"&gt;SQM&lt;/a&gt; and &lt;a href="http://csmr2009.iese.fraunhofer.de/"&gt;CSMR&lt;/a&gt;. Both the workshop and the main conference were hosted at &lt;a href="http://www.iese.fraunhofer.de/fhg/iese/index.jsp"&gt;Fraunhofer IESE&lt;/a&gt;, which turned out to be an excellent host. &lt;br /&gt;&lt;br /&gt;All of the conferences I have attended up until now lasted only for a day, so I did not really know what to expect of four days of presentations. I was a little bit afraid that I would not be able to pick up any new information on the last day, but everything turned out to be fine. Every day brought at least two interesting presentations, and definitely one interesting conversation about the current research somebody is doing. I have met several interesting people (who might be interested in doing some research together), and picked up quite a few new ideas. Unfortunately, it is too much to write down all at once, but I will try to post updates on this on a more regular basis. &lt;br /&gt;&lt;br /&gt;What I found particularly interesting was the fact that several people mentioned the same two things on various occasions. The first one is that PhD students should not start from scratch when they are implementing their ideas. Although some students are using more generic development frameworks (like for example &lt;a href="http://www.eclipse.org/"&gt;Eclipse&lt;/a&gt;), there are still people out there that start everything from scratch. This does tend to take up a lot of time and usually results in tools that &lt;i&gt;"should be publicly available before I finished my thesis, I just want to clean it up a bit first"&lt;/i&gt;. I am not really sure how this problem can be solved (and neither did the people at the Industry Panel Discussion), but I do hope that my future tools will not suffer the same fate.&lt;br /&gt;&lt;br /&gt;The second thing that was repeated a few times is the call for more empirical evidence for the usefulness of ideas and tools. However, the lack of publicly available industrial systems and cost-data makes it hard for the average researcher to provide this evidence. Fortunately, there are ways to overcome this issue. One could, for example, work together with companies that have access to this type of data. Just a matter of sending and e-mail and explain your ideas and needs to the right person I guess... ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-5366515874152823537?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/5366515874152823537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=5366515874152823537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5366515874152823537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5366515874152823537'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2009/03/sqm-and-csmr-2009.html' title='SQM and CSMR 2009'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-3566145402118884983</id><published>2009-03-22T12:30:00.005+01:00</published><updated>2009-07-07T22:19:47.046+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php-tools'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Migration to the nine-headed monster</title><content type='html'>After some &lt;a href="http://mail.cs.uu.nl/pipermail/psat-dev/2009q1/000055.html"&gt;recent&lt;/a&gt; &lt;a href="http://mail.cs.uu.nl/pipermail/psat-dev/2009q1/000056.html"&gt;activity&lt;/a&gt; on the &lt;a href="http://mail.cs.uu.nl/mailman/listinfo/psat-dev"&gt;psat-dev&lt;/a&gt; mailinglist I became aware of the (lack of) available builds for &lt;a href="http://www.php-sat.org"&gt;php-sat&lt;/a&gt;. Even though the development speed is not what I would want it to be (so much fun things to do, so little hours in a day!) I still believe it is important to &lt;a href="http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s04.html"&gt;release early and often&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Fortunately, &lt;a href="http://www.st.ewi.tudelft.nl/~dolstra/"&gt;Eelco Dolstra&lt;/a&gt; had some time to migrate php-front, php-sat and php-tools to &lt;a href="http://hydra.nixos.org/"&gt;Hydra&lt;/a&gt;, the new Nix-based continuous build system. After some tweaking we now again have access to unstable build for all &lt;a href="http://hydra.nixos.org/project/psat"&gt;PSAT&lt;/a&gt;-projects. Go Hydra!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://hydra.nixos.org/"&gt;&lt;img src="http://hydra.nixos.org/static/images/hydra.png" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-3566145402118884983?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3566145402118884983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3566145402118884983'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2009/03/migration-to-nine-headed-monster.html' title='Migration to the nine-headed monster'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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></entry><entry><id>tag:blogger.com,1999:blog-28873279.post-513659633000990665</id><published>2009-02-10T20:35:00.003+01:00</published><updated>2009-02-10T20:46:54.591+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Trivia'/><title type='text'>[Trivia] generating eclipse project dependencies with maven2</title><content type='html'>When we migrated to &lt;a href="http://maven.apache.org/"&gt;maven2&lt;/a&gt; a few months back we had little problems, accept that we could not figure out how to automatically generate project dependencies for &lt;a href="http://www.eclipse.org/"&gt;eclipse&lt;/a&gt;. Apparently, maven1 has a &lt;a href="http://maven.apache.org/maven-1.x/plugins/eclipse/faq.html#project_dependencies"&gt;special tag&lt;/a&gt; for this, but this did not make it into maven2.&lt;br /&gt;&lt;br /&gt;Recently, (and by that I mean a few weeks back, just didn't bother to post this yet) one of my co-workers found out that you can simple pass the location to your eclipse-workspace to the &lt;i&gt;eclipse:eclipse&lt;/i&gt; tag:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;mvn eclipse:eclipse -Declipse.workspace=/path/to/your/workspace&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;and we all lived happily ever after ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-513659633000990665?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/513659633000990665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=513659633000990665' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/513659633000990665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/513659633000990665'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2009/02/trivia-generating-eclipse-project.html' title='[Trivia] generating eclipse project dependencies with maven2'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-6906569891331227945</id><published>2008-12-16T20:37:00.007+01:00</published><updated>2008-12-16T21:36:20.425+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Visualizing the PHP grammar</title><content type='html'>A few weeks ago an e-mail from Didier Garcin popped up on the &lt;a href="https://mail.cs.uu.nl/mailman/listinfo/stratego"&gt;Stratego mailing list&lt;/a&gt;. He &lt;A href="http://mail.cs.uu.nl/pipermail/stratego/2008q4/001169.html"&gt;explained&lt;/a&gt; that he had written a python script that could visualize an abstract syntax signature. The script was &lt;a href="http://mail.cs.uu.nl/pipermail/stratego/2008q4/001171.html"&gt;also send&lt;/a&gt; to the list and I finally had some time to check it out.&lt;br /&gt;&lt;br /&gt;It turned out that I had almost anything installed to use the script, only the &lt;a href="http://code.google.com/p/pydot/"&gt;pydot&lt;/a&gt; dependency needed some work. This was mostly because the script only seems to work with the 0.9.10 version of this library. After getting the script started it was really simple to generate the signature from the &lt;a href="http://www.PHP-SAT.org"&gt;PHP-Front&lt;/a&gt; grammar.&lt;br /&gt;&lt;br /&gt;So, here is the one for PHP4:&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/33405060@N07/3114146562/" title="PHP4 AST visualization by EricBouwers, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3015/3114146562_137d80c90d_b.jpg" width="240" height="222" alt="PHP4 AST visualization" /&gt;&lt;/a&gt;&lt;br /&gt;And the one for PHP5:&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/33405060@N07/3113326845/" title="PHP5 AST visualization by EricBouwers, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3245/3113326845_9b5b9a169f_b.jpg" width="240" height="222" alt="PHP5 AST visualization" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first thing I notices where the big rectangles in both versions. These rectangles are the statements (smaller one) and expressions grouped together. What I also notices was that in both versions we see that the bottom of the graph (which corresponds with the smallest units in the language) looks the most complicated. This corresponds very well with the amount of effort put into the modeling of this part of the language. &lt;br /&gt;&lt;br /&gt;Comparing both grammars to each other we can see that the latest versions is the most complicated one. Furthermore, if we compare both graphs to the graphs shown in &lt;a href="http://blog.nicksieger.com/articles/2006/10/27/visualization-of-rubys-grammar"&gt;this post&lt;/a&gt; we can see that the Java-graph appears to be the most similar one.&lt;br /&gt;&lt;br /&gt;Actually, I do not think these images show anything, but please explain it to me when you think I just don't see it. Anyway, at least we have some nice pictures now :) &lt;br /&gt;&lt;br /&gt;P.S. for those who are interested, more detailed images (in svg-format) are available &lt;a href="http://www.st.ewi.tudelft.nl/~bouwers/data/php-grammars.zip"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-6906569891331227945?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/6906569891331227945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=6906569891331227945' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/6906569891331227945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/6906569891331227945'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2008/12/visualizing-php-grammar.html' title='Visualizing the PHP grammar'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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://farm4.static.flickr.com/3015/3114146562_137d80c90d_t.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28873279.post-7562475433843402119</id><published>2008-12-02T18:43:00.003+01:00</published><updated>2008-12-02T18:52:42.553+01:00</updated><title type='text'>Shameless plug</title><content type='html'>Instead of writing about the new and interesting stuff I am currently researching (mostly because the results still need to be processed a bit) I am only going to mention my the link to my new home on the web:&lt;br /&gt;&lt;br /&gt;&lt;center&gt;&lt;a href="http://eric.bouwers.info"&gt;http://Eric.Bouwers.info&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;Now I only have to figure out how to get this blog into the same style ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-7562475433843402119?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/7562475433843402119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=7562475433843402119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7562475433843402119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7562475433843402119'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2008/12/shameless-plug.html' title='Shameless plug'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-1277155246735851210</id><published>2008-11-12T20:27:00.003+01:00</published><updated>2008-11-12T21:46:55.032+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><title type='text'>Another JFall</title><content type='html'>Today I attended the &lt;a href="http://www.nljug.org/jfall/"&gt;JFall 2008&lt;/a&gt;. Another instance of the conference of the &lt;a href="http://www.nljug.org/"&gt;NL-JUG&lt;/a&gt; aimed at all the Java programmers in Holland. Since two of my colleagues got the last two tickets I had the pleasure of walking to the location with only one of them, the other one missed his train. &lt;br /&gt;&lt;br /&gt;Anyhow, let us see what the day has given us.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://technoracle.blogspot.com/"&gt;Duane Nickull&lt;/a&gt; was the first speaker of the day. He shared his view on what web2.0 and SOA was. We saw many slides (with many boxes and arrows) explaining which entities play a role in these types of technologies. Unfortunately, his presentation was a little abstract, because I didn't notice any concrete examples (maybe I missed them though). On the other hand, his anecdotes were nice and interesting. The one that I liked the most was about a company that is trying to apply the open-source software development way of contributions to the making of movies. Deciding what is in a movie sure sounds fun to me, so there should be some kind of business model in there right?&lt;br /&gt;&lt;br /&gt;The second talk I attended was given by Allister Smith and was titled "pragmatic Java". Hoping on a presentation full of pragmatic solutions for common problems, I was a bit disappointed when the talk compared Java to languages such as Phyton and PHP. An example program was given in Python and then redone in Java using the spring-framework. Naturally, the Java example was much more bloated. After this, an example of a Java implementation was given in which the typing was essentially stripped away (by using only Objects) and value-passing was done through Maps and Lists. The speaker had a good point in the sense that this can be just as quick and short as a scripting language, but using Java for this just feels wrong. It is an example of using a language because of the language, not because it has the features you need for a project. &lt;br /&gt;&lt;br /&gt;The last talk before the lunch was an introduction to the Java Memory Model. &lt;a href="http://pveentjer.wordpress.com/"&gt;Peter Veentjer&lt;/a&gt; (who seems to know a lot about these things) gave a nice tour around some of the pitfalls of Java concurrency. Although the talk was a little low level, it was really understandable. I do not have to deal with concurrency at the moment, but some of the pointers are good to keep in the back of your mind during development. Certainly a useful presentation.&lt;br /&gt;&lt;br /&gt;Right after the lunch the evangelists of Sun gave the second keynote of the day. Normally I do not really like these kind of talks because they can feel like you are watching a long tv-commercial without seeing something useful. However, I was pleasantly surprised that the demo's showed some really nice stuff (besides being slick of course). It turns out that in the new version of JavaFX it is possible to drag applets from your browser to your desktop and still work! There must be some real-world usage scenario's for that I guess. Also, a demo was given of alternative ways to use your Wii-mote. Definitely a better talk then I had expected.&lt;br /&gt;&lt;br /&gt;After the demo I was quick enough to sneak into the presentation of &lt;a href="http://www.linkedin.com/ppl/webprofile?action=vmi&amp;id=2592471&amp;authToken=-DVb&amp;authType=name&amp;trk=ppro_viewmore&amp;lnk=vw_pprofile"&gt;Huub van Thienen&lt;/a&gt; about closures in Java. I was lucky to have a seat because the room was really packed with people. Huub gave a really nice introduction into what closures are, and how they could be used in Java. His presentation showed the pros and cons without giving away his own opinion. Actually, he even promised a candy-bar for the person that could guess his opinion about the subject. I still do not know :(. Even though I knew most of the thing already (because of knowing Haskell), I think this was the best presentation of today.&lt;br /&gt;&lt;br /&gt;As a last presentation I attended a Hands-on-lab about dealing with legacy code. Since we are usually analyzing legacy code for customers, I thought it would be nice to hear other peoples opinions about the subject. The set-up of the lab was really nice, first some explanation, then some coding, some more explanation and so on. Unfortunately, we ran out of time in the end, but it was still a nice experience. I also relearned one of my pitfalls during the session. When trying to fix a bug I tend to first figure out how to fix a problem, than actually fix it, and later on write a test for it. Usually, I also try to run the test without the fix to see whether it fails, but sometimes I forget. To counter this I should first write a test, and then fix the problem. However, sometimes it is too tempting to just fix the problem :)&lt;br /&gt;&lt;br /&gt;All and all it was an interesting day. No real eye-openers, but certainly not a complete waste of time. On to the JSpring I would say!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-1277155246735851210?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/1277155246735851210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=1277155246735851210' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1277155246735851210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1277155246735851210'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2008/11/another-jfall.html' title='Another JFall'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-3503820723140720395</id><published>2008-11-05T21:30:00.000+01:00</published><updated>2008-11-05T21:33:05.076+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PhD'/><title type='text'>Focussing on the problem</title><content type='html'>After a solid month of being a part-time PhD I have gotten many tips (and comments) on kick-starting my project and doing research in general. Currently, my goal is getting a clear picture of the problem that I want to solve. I know that there is a problem (and I have a vague notion about how to describe it) but getting a clear definition is not something that comes easily. &lt;br /&gt;&lt;br /&gt;On the other hand I am not afraid of spending time on finding the problem. When the problem is clear it is usually easy to think of scenario's that can solve it (although actually executing these scenario's might be tricky). &lt;br /&gt;&lt;br /&gt;And focusing on getting the problem straight is also not bad for presentation purposes. Several of my colleagues (and other people as well) explained to me that during a presentation it is very important to explain the problem that you solve. Also, and this is something that I usually forget to think about, it is important to explain in which cases your solution is not going to work.&lt;br /&gt;&lt;br /&gt;It does not matter that this might take up a big chunk of your time because most people probably do not (completely) understand your solution anyway. As long as they know which problem you have solved under which conditions, they are going to be happy. More details about how the solution works can always be read in a paper, or discussed over some beverages.&lt;br /&gt;&lt;br /&gt;So, back to the literature study it is! By the way, if anybody has a nice suggestion to keep track of interesting research papers online, please let me know!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-3503820723140720395?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/3503820723140720395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=3503820723140720395' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3503820723140720395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3503820723140720395'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2008/10/focussing-on-problem.html' title='Focussing on the problem'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-4223559471615545185</id><published>2008-10-07T20:41:00.003+02:00</published><updated>2008-10-07T21:12:35.368+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='PhD'/><title type='text'>Finish what you start ....</title><content type='html'>When I was young, my mother used to tell me that I should first finish what I started before moving to something new. I think this was mostly because in order to finish something I had to clean up the mess I made, but it's not a really bad rule to keep in mind I guess. However, even though I should first finish all my other projects before moving on, I picked up another project last week: getting a PhD.&lt;br /&gt;&lt;br /&gt;Yep, as of the first of October my boss allows me to spend two days a week on doing research. This research is going to be (how surprisingly) in the field of static analysis and software quality. Our first research-topic is already starting to shape itself and I believe (how surprisingly) that it is going to lead to interesting results.  &lt;br /&gt;&lt;br /&gt;It might be nice to perform research, but in order to get a PhD you cannot get far without 1) good focus and 2) good supervisors. Luckily, I have a team of two supervisors that can certainly keep me focused: &lt;a href="http://wiki.di.uminho.pt/twiki/bin/view/Personal/Joost/"&gt;Joost Visser&lt;/a&gt; and &lt;a href="http://homepages.cwi.nl/~arie/"&gt;Arie van Deursen&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In order to keep everybody up-to-date with the progress of the research, and to spend a little time in a more research-oriented environment, I will be traveling to Delft once a week. While last week was mostly filled with arranging a workspace, this week is going to be filled with giving a talk at the &lt;a href="http://swerl.tudelft.nl/bin/view/Main/ResearchColloquium"&gt; Research Colloquium&lt;/a&gt;. So if you have not heard my &lt;a href="http://www.nljug.org/pages/events/content/jspring_2008/sessions/00037/"&gt;Fluent Interfaces&lt;/a&gt; talk yet, this is probably your last chance :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-4223559471615545185?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/4223559471615545185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=4223559471615545185' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4223559471615545185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4223559471615545185'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2008/10/finish-what-you-start.html' title='Finish what you start ....'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-5407151070872511846</id><published>2008-09-24T20:20:00.008+02:00</published><updated>2008-09-24T22:09:00.808+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><title type='text'>A Java-Summercamp</title><content type='html'>It has been a while , but on the 29th of August I have attended the 2008 version of the &lt;a href="http://www.javasummercamp.nl"&gt;Java Summercamp&lt;/a&gt;. This gathering was organized by &lt;a href="www.profict.nl/"&gt;profict&lt;/a&gt;, a dutch IT-company. They have an office with a great view (&lt;a href="http://www.surroundfoto.nl/index.php/expositie/wijdemeren/s-graveland/boekesteyn.html"&gt;picture&lt;/a&gt;), now that is what I call a green working environment!&lt;br /&gt;&lt;br /&gt;The topic of this day was Domain Specific Languages (DSL's). Since my talk about &lt;a href="http://www.nljug.org/pages/events/content/jspring_2008/sessions/00037/"&gt;fluent interfaces&lt;/a&gt; at the &lt;a href="http://www.nljug.org/jspring/"&gt;J-Spring 2008&lt;/a&gt; I became more and more interested in this topic. I hoped to hear more about why you would want to use a DSL, and see some examples of DSL's in practice. Luckily, I got what I wanted.&lt;br /&gt;&lt;br /&gt;The first speaker was &lt;a href="http://www.nealford.com/"&gt;Neal Ford&lt;/a&gt;. His first presentation  (&lt;a href="http://www.nealford.com/downloads/conferences/Neal_Ford-Language_Oriented_Programming-keynote.pdf"&gt;slides&lt;/a&gt;) gave a general overview of the usefulness of DSL's. He argued that Java can be seen as a framework-oriented language. Nowadays, a Java-programmer uses many frameworks which he ties together with configuration-files written in XML. He proposes to use a DSL to abstract over these large configuration files in order to make it easier to tie frameworks together. He also gave an overview of some techniques to implement (mostly internal) DSL's. Actually, his second presentation mostly consisted of examples of DSL's in various languages. It is always fun to see examples of what you can do in other languages.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://effi-blog.blogspot.com/"&gt;Sven Efftinge&lt;/a&gt; was the second speaker with his presentation (&lt;a href="http://effi-blog.blogspot.com/2008/09/dsls-in-netherlands.html"&gt;slides&lt;/a&gt;) about &lt;a href="http://wiki.eclipse.org/Xtext"&gt;XText&lt;/a&gt;. I was surprised to see that it actually looked very simple to 1) create a DSL by typing in EBNF 2) generate an eclipse editor for this DSL with the click of a button and 3) generate a generator for your DSL using the same click. Naturally, everything was already set-up so that it looked easier then it actually is. I have tried to make a small example to show at the office, but failed miserably to get the generator to do what I want. Anyhow, if you have a spare afternoon then checking out this project is certainly worth the effort.&lt;br /&gt;&lt;br /&gt;The third (and last) speaker was &lt;a href="http://www.zefhemel.com/"&gt;Zef Hemel&lt;/a&gt;. His presentation (&lt;a href="http://www.zefhemel.com/archives/2008/09/02/java-summer-camp-talk"&gt;slides&lt;/a&gt;) about &lt;a href="http://webdsl.org/webdslorg/"&gt;WebDsl&lt;/a&gt; gave a nice overview of the setup and current status of the project. I was already a bit familiar with the project and it was fun to get an update. Also, I enjoy seeing the face of people that are confronted with &lt;a href="http://www.program-transformation.org/Stratego/"&gt;Stratego&lt;/a&gt; for the first time :)&lt;br /&gt;&lt;br /&gt;All and all I can say that it certainly an afternoon well spent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-5407151070872511846?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/5407151070872511846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=5407151070872511846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5407151070872511846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5407151070872511846'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2008/09/java-summercamp.html' title='A Java-Summercamp'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-7492902112311086776</id><published>2008-08-10T11:41:00.005+02:00</published><updated>2008-08-10T13:11:10.098+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><title type='text'>Is he back?</title><content type='html'>It has been eight months since my &lt;a href="http://ericbouwers.blogspot.com/2007/12/calculating-complexity-of-php.html"&gt;last post&lt;/a&gt; to this blog. Also, the &lt;a href="http://ericbouwers.blogspot.com/2007/11/new-release-plan.html"&gt;release plan&lt;/a&gt; did not work out as well as I had hoped. So what did I do in the intermediate months?&lt;br /&gt;&lt;br /&gt;Well, I ended last year by buying me a 'real' house instead of renting an apartment. For us it is pretty large, currently even the cats have an own room, but this will probably change over time. Buying a house really helps you to spend your time since there is all sorts of paperwork to fill out, people to inform and things to pack. We moved in at the end of March and I think that we are currently at the point that every company we deal with knows that we had a change of address. The next objective is to unpack and store away everything that we moved. There are still some (closed) boxes standing around here and there.&lt;br /&gt;&lt;br /&gt;During the time that we where preparing to move to our new house my (at that time) girlfriend and I where also organizing a very important event: our wedding. That is right, on April the 26th we got married! It was a wonderful day in which we did the things that we enjoy together with our friends and family. We got married, went to a &lt;a href="http://en.wikipedia.org/wiki/Once_(film)"&gt;movie&lt;/a&gt; and had a party at the home of our &lt;a href="http://www.janvanhoof.nl/"&gt;Scouts&lt;/a&gt;. Maybe not the most traditional wedding ever, but certainly one that we enjoyed!     &lt;br /&gt;&lt;br /&gt;Even during the buying of a house and the planning of a wedding one must keep on working, so I did. I learned a lot about how to do agile programming, how one can quantify the quality of software and how to be (even more) pragmatic. &lt;br /&gt;Apart from the 'normal' work, me and one of my colleagues wrote a paper called &lt;i&gt;Multidimensional Software Monitoring Applied to ERP&lt;/i&gt;. This paper is accepted at the &lt;a href="http://www.code4thought.org/SQM08/"&gt;SQM 2008&lt;/a&gt;. It was very nice to attend a conference as the author of a paper, certainly when the conference is held in Athens :)&lt;br /&gt;Next to this paper, I also gave a talk at the &lt;a href="http://www.nljug.org/jspring/"&gt;J-Spring 2008&lt;/a&gt;, This &lt;a href="http://www.nljug.org/pages/events/content/jspring_2008/sessions/00037/"&gt;talk&lt;/a&gt;, titled &lt;i&gt;Putting Fluent Interfaces to the test&lt;/i&gt;, was about designing and using a &lt;a href="http://www.martinfowler.com/bliki/FluentInterface.html"&gt;Fluent Interface&lt;/a&gt;. If you are not familiar with this style of API-design be sure to follow the link.&lt;br /&gt;&lt;br /&gt;So I bought a house, got married and enjoy the work that I do. I guess you van say I am really settling into society ;) &lt;br /&gt;&lt;br /&gt;Unfortunately, this settling in has taken so much energy from me that I did not find the time to work on PHP-Sat. However, since I have found the time and energy to write this post, I should also be able to find some for the PHP-Sat-project again!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-7492902112311086776?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/7492902112311086776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=7492902112311086776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7492902112311086776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7492902112311086776'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2008/08/is-he-back.html' title='Is he back?'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-8024339579838475976</id><published>2007-12-09T12:52:00.000+01:00</published><updated>2007-12-10T22:38:21.517+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php-tools'/><title type='text'>Calculating the complexity of PHP</title><content type='html'>Not only is the question of calculating the &lt;a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity"&gt;cyclomatic complexity&lt;/a&gt; showing up in our &lt;a href="https://mail.cs.uu.nl/pipermail/psat-dev/2007q2/000023.html"&gt;mailinglist&lt;/a&gt; and &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-99"&gt;bugtracker&lt;/a&gt;, it is also showing up on other &lt;A href="https://www.phpcompiler.org/lists/phc-general/2007-November/000817.html"&gt;mailing-lists&lt;/a&gt;! This shows that the time has come to introduce a solution to this problem based on PHP-Front: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;php-cyco&lt;/b&gt; &lt;br /&gt;(indeed, yet another creative name :)&lt;br /&gt;&lt;br /&gt;This tool is added to the &lt;a href="http://www.program-transformation.org/PHP/PhpTools"&gt;PHP-Tools&lt;/a&gt; project as of revision 421. The &lt;a href="https://svn.cs.uu.nl:12443/viewvc/psat/php-tools/trunk/src/tools/php-cyco.str?view=markup"&gt;implementation &lt;/a&gt; is not very big, the code that does the actually work is about 20 lines, but it relies heavily on PHP-Front. Thats where libraries are for, right?  &lt;br /&gt;&lt;br /&gt;So what does it do? The tool basically counts the number of branches that exists in your code. This is done for the main-flow and separately for each function. By default, each function (and the main-flow) starts with a complexity of 1 since there is always a minimal path through the code. For each construct that introduces a branch within the control-flow, for example &lt;i&gt;if&lt;/i&gt;-, &lt;i&gt;for&lt;/i&gt;- and &lt;i&gt;while&lt;/i&gt;-statements, the complexity is increased by 1. In the end the number represents the number of paths that exists from the start until the end of the function (or main-flow). The higher the number, the more difficult it becomes to understand and test the block of code.&lt;br /&gt;&lt;br /&gt;The complete list of constructs that increase the complexity can be found at the bottom of the &lt;a href="https://svn.cs.uu.nl:12443/viewvc/psat/php-tools/trunk/src/tools/php-cyco.str?view=markup"&gt;source&lt;/a&gt;. I think that the list is understandable, even though it uses 'Sorts'. If this is not the case please let me know, and I will put up a list using php-syntax.&lt;br /&gt;&lt;br /&gt;As you can see the complexity is increased by logical operators. This is because the semantics of the code:&lt;pre&gt;if($foo || $bar){ //code }&lt;/pre&gt; is equal to the following code:&lt;pre&gt;if($foo) {  &lt;br /&gt;  //code&lt;br /&gt;} elseif($bar){ &lt;br /&gt; //code &lt;br /&gt;}&lt;/pre&gt;in other words, we can rewrite a logical expression as a set of &lt;i&gt;if-else&lt;/i&gt;-statements. Since they share the same semantics they should share the same complexity.&lt;br /&gt;&lt;br /&gt;One last note, the tool actually calculates the &lt;u&gt;minimum&lt;/u&gt; complexity of a function. Even though php-cyco is capable of including files, using the usual &lt;i&gt;--*-inclusion flags&lt;/i&gt;, it might encounter situation in which it cannot resolve a filename. In this case the calculated complexity can be lower than the actual complexity because the included file could contain some of the complexity-increasing constructs.&lt;br /&gt;&lt;br /&gt;So if you are curious to know which function within your php-project has the largest complexity I suggest you &lt;a href="http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt/php-tools-unstable-latest/"&gt;download&lt;/a&gt; the PHP-Tools project and start analyzing your code!&lt;br /&gt;&lt;br /&gt;Please let me know if you have any comments or feedback.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-8024339579838475976?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/8024339579838475976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=8024339579838475976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8024339579838475976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8024339579838475976'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/12/calculating-complexity-of-php.html' title='Calculating the complexity of PHP'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-5076204544536057592</id><published>2007-11-29T21:47:00.000+01:00</published><updated>2007-12-02T11:13:26.862+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Trivia'/><title type='text'>[Trivia] Pentaho Mondrian Slow MDX Query</title><content type='html'>Finally, another trivia-post. I could not find the answer easily on the web, but there might be people that are struggling with the same problem we had.&lt;br /&gt;&lt;br /&gt;While &lt;a href="http://www.sig.nl"&gt;working&lt;/a&gt; on my current project we ran into a problem with a &lt;a href="http://en.wikipedia.org/wiki/Multidimensional_Expressions"&gt;MDX&lt;/a&gt;-query. In short, it retrieved about 14,000 rows from a database and displayed a subset of these rows on the screen in a variable ordering. The problem we where facing was that it took about 4-5 minutes before the data showed up.&lt;br /&gt;&lt;br /&gt;We knew that the query was not completely trivial, but 14,000 rows is not that much data. Furthermore, one would expect that an OLAP-database could handle this kind of volume very easily. In the beginning we thought that it took so long because all of the data was first retrieved from the database and then sorted within the Java-code. On the other hand, sorting a list of 14,000 items should not take that long. An other theory we had was that the bottleneck was the number of queries that is generated (about 4000) to retrieve the 14,000 rows. This was not the case, every query only took 1-2 ms to complete.&lt;br /&gt;&lt;br /&gt;So we fired up &lt;a href="http://www.yourkit.com/"&gt;YourKit&lt;/a&gt;, a Java memory/CPU-profiler. I can highly recommend this tool to anyone who wants to profile there code. It provides detailed reports about all sorts of interesting things and comes with a nice interface.&lt;br /&gt;&lt;br /&gt;While going to the profiling output we noticed that the code was spending about 50 percent of the time in a 'Sort'-method, and 40 percent of the time in a 'Debug'-method. Since we didn't see that much debug-output we did what any programmer would do when has not written the tool (s)he works with: we assumed that the profiler was wrong and concentrated on the 'Sort'-method. &lt;br /&gt;&lt;br /&gt;Examining the profiler output some more we discovered that 40 percent of the time in the 'Sort'-method was actually spent by calling the 'Debug'-method above! So we looked up the code and found out that the people of &lt;a href="http://mondrian.pentaho.org/index.php"&gt;Mondrian&lt;/a&gt; where actually calling this 'Debug'-method &lt;i&gt;every&lt;/i&gt; time they compared two objects. &lt;br /&gt;&lt;br /&gt;Question: When sorting 14,000 objects, how many lines of debug-output would you get? &lt;br /&gt;Answer: A lot.&lt;br /&gt;&lt;br /&gt;The funny thing was that we did see some debug-output, but not as much as you would expect from the code. Furthermore, the 'Debug'-method was only called when the &lt;a href="http://logging.apache.org/log4j/1.2/index.html"&gt;log4J&lt;/a&gt;-level was set to DEBUG. We did use a log4j-configuration, the default that was shipped with the application, but this file did not mention Mondrian anywhere. It did mention a file called 'server.log' which we eventually found. The size of the log-file was about 1 gigabyte, which might explain where all the debug-lines went to.&lt;br /&gt;&lt;br /&gt;Our current solution is to simply remove the log4j-configuration from our project. This still gives us enough feedback to track the usual things, but it also prevents Mondrian to go into debug-mode. It reduced the running time from 4-5 minutes to 4-5 seconds, a considerable speed-up don't you think?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-5076204544536057592?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/5076204544536057592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=5076204544536057592' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5076204544536057592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5076204544536057592'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/11/trivia-pentaho-mondrian-slow-mdx-query.html' title='[Trivia] Pentaho Mondrian Slow MDX Query'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-1260310770761136429</id><published>2007-11-11T16:45:00.001+01:00</published><updated>2007-11-11T17:52:30.001+01:00</updated><title type='text'>The new release plan</title><content type='html'>Last week I made a list of things that I wanted to do after reading &lt;a href="http://producingoss.com/"&gt;Production OSS&lt;/a&gt;. Today I took the time to implement two of the items on the list, which reduces the list to only thirteen items. Luckily, the tasks on the list are not difficult to implement, but they do take some time to think about the best way to implement them.&lt;br /&gt;&lt;br /&gt;The first thing on the list was bringing the &lt;a href="http://www.php-sat.org"&gt;website&lt;/a&gt; up to date. It still had some pointers to the build-farm in Utrecht and some tips to work around missing functionality that actually exists nowadays. I also tried to make it more clear what the intention of the project is, although I think it can still be made more explicit. Fortunately, this is also an item on the list :)&lt;br /&gt;&lt;br /&gt;A second item on the list was the cause for a large number of mails from Jira send to the &lt;a href="http://mail.cs.uu.nl/mailman/listinfo/psat-commits"&gt;psat-commit-list&lt;/a&gt;. I made up a new release plan of PHP-Sat / PHP-front and also removed some issues/features that where no longer wanted. Let us take a look at the new milestones for the two main projects:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PHP-Front:&lt;/b&gt;&lt;br /&gt;The 0.1 release must be capable of parsing, pretty-printing and reflection on PHP4 and PHP5 code. Furthermore, constant propagation need to be supported for procedural code without function calls. Within the 0.2 release this support is to be extended towards function calls and object creation. Support for more information about the environment of PHP, for example the types of internal functions, is planned for version 0.3.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PHP-Sat:&lt;/b&gt;&lt;br /&gt;The release structure is closely related to that of PHP-Front. Within the 0.1 release it must support procedural code without function calls and object creation. These language constructs must be supported within release 0.2. The purpose of the 0.3 release is to add many new bug patterns.&lt;br /&gt;&lt;br /&gt;In both projects we can see that the number of issues that need to be fixed before the first release is quit low. So hopefully we can make a first release around the end of the year!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-1260310770761136429?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/1260310770761136429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=1260310770761136429' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1260310770761136429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1260310770761136429'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/11/new-release-plan.html' title='The new release plan'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-2858604162288034448</id><published>2007-10-21T19:10:00.001+02:00</published><updated>2007-10-23T20:47:13.217+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>So much interesting to read ...</title><content type='html'>... and less time to do it! &lt;br /&gt;&lt;br /&gt;Since I started my full-time job I noticed that it is a lot harder to stay up to date with all the latest (online) developments. During the writing of my thesis I had a considerable amount of time which I could spend on reading blogs and news-items, and following mailing-lists. When you spend most of your day actually working you learn to prioritize which things you want to read :)&lt;br /&gt;&lt;br /&gt;One of the things I did managed to read, albeit a bit late, is &lt;a href="http://groups.google.com/group/mailing.www.php-dev/browse_thread/thread/9d605479bd75b71e/6c31ca7124cd2b3c&lt;br /&gt;"&gt;this&lt;/a&gt; thread on the &lt;a href="http://news.php.net/group.php?group=php.internals"&gt;PHP.internals&lt;/a&gt; list written by &lt;a href="http://en.wikipedia.org/wiki/Wietse_Venema"&gt;Wietse Venema&lt;/a&gt;. It is a follow-up on &lt;a href="http://groups.google.ca/group/mailing.www.php-dev/browse_thread/thread/dfa503a483dcb925/65ffa930a404c320&lt;br /&gt;"&gt;this&lt;/a&gt; thread in which a first proposal was made to integrate a perl-style taint-mode into the core of PHP. The results posted in the follow-up thread look promising. It is also interesting to see that he has gone from a black-and-white taint-mode, to a more leveled approach. Currently the proposal only contains a subset of the levels available in PHP-Sat, but I think that the most fundamental ones are definitely there. &lt;br /&gt;&lt;br /&gt;Even though Wietse is developing a prototype I think he will have a hard time getting this taint-mode into the actual core of PHP. Within both threads the general opinion seems to be that the idea is nice, but the developers of PHP seem to think of many situations in which it could fail. I hope to see more results of this idea soon!&lt;br /&gt;&lt;br /&gt;Going over some other interesting threads in the internals-list I found a reference to a tool called &lt;a href="http://www.icosaedro.it/phplint/index.html"&gt;PHPLint&lt;/a&gt;. (Isn't is funny to see that there are all sorts of initiatives popping up that that try to make PHP more secure/stricter). I haven't have time to take a better look at this tool, but a first glance definitely showed potential. I'll try to examine this tool more thoroughly at the end of this week.  &lt;br /&gt;&lt;br /&gt;While there is less time to read on-line material, there is more time to read off-line stuff. Since I am using public transportation to get to work I have an extra hour a day to read actual books and publications. One of the books I have read in the past few weeks is a printed version of &lt;a href="http://producingoss.com/"&gt;"Producing  Open Source Software" (ProducingOss)&lt;/a&gt; written by &lt;a href="http://www.red-bean.com/kfogel/"&gt;Karl Fogel&lt;/a&gt;. My conclusion: absolutely worth reading!&lt;br /&gt;&lt;br /&gt;ProducingOss contains all sorts of tips, hints and best practices. Even if you are not involved in an open source project it is still useful to read. Almost everything in the book can also be applied to closed-source projects. Furthermore, it contains many pointers to other interesting literature. One of these pointers lead me to &lt;a href="http://www.catb.org/~esr/writings/cathedral-bazaar/"&gt;The Cathedral and the Bazaar&lt;/a&gt;, my current read-while-traveling-to-and-from-work book. &lt;br /&gt;&lt;br /&gt;I intend to use several things from ProducingOSS within PHP-Sat. I will just have to think about how I can fit the project in my current schedule, but it will definitely be fitted in.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-2858604162288034448?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/2858604162288034448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=2858604162288034448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2858604162288034448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2858604162288034448'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/10/so-much-interesting-to-read.html' title='So much interesting to read ...'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-5353871221722358450</id><published>2007-10-12T20:50:00.001+02:00</published><updated>2008-09-24T22:10:06.246+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><title type='text'>Attending J-Fall 2007</title><content type='html'>This Thursday (October 10th) I was lucky enough to get a ticket (and approval) to go the &lt;a href="http://www.nljug.org/jfall/"&gt;J-Fall conference&lt;/a&gt; organized by the &lt;a href="http://www.nljug.org/"&gt;NL-jug&lt;/a&gt;. My conference day started when I met some colleagues at the train-station to travel to Bussum-zuid. Within this nice-looking town the J-Fall found its home in &lt;a href="http://www.spant.org/"&gt;'t Spant&lt;/a&gt;, a professional conference-facility.&lt;br /&gt;&lt;br /&gt;The keynote of the conference was given by the "Sun Java Technology Outreach Team", which is basically a group of four engineers that talk about what you can do with Java. The keynote started with a nice overview of the different technologies Sun is working on. After this, a demo of JavaFX was given. Chuck Munn-Lee showed how easy JavaFX makes it to create a circle that morphs into a rectangle when you click on it. I also liked the fact that his editor did not only support code-completion, but also 'Color-completion'. Unfortunately, the other demos were are a bit disappointing because of several technical problems. &lt;br /&gt;&lt;br /&gt;The first 'real' talk I attended was called &lt;a href="http://www.nljug.org/pages/events/content/jfall_2007/sessions/00002/"&gt;From Java to Ruby … and Back&lt;/a&gt;. The speaker provided lots of material on the slides which made them a little bit overwhelming. Fortunately, he assured us that the slides would also be distributed digitally. The contents of the presentation was an introduction to Ruby and a comparison with Java. One of the conclusions was that the speaker would happily code 80 percent of his applications in Ruby instead of Java. Quit a statement on a conference promoting the use of Java :) &lt;br /&gt;&lt;br /&gt;The second talk I visited was about JUnit, or actually &lt;a href="http://www.nljug.org/pages/events/content/jfall_2007/sessions/00006/"&gt;JUnit 4&lt;/a&gt;. I was a little bit disappointed by this presentation because all of the content was already discussed in an article printed in the last issue of the &lt;a href="http://www.javamagazine.nl/site/"&gt;Java magazine&lt;/a&gt;. Furthermore, the pace of the presentation was terribly slow, which made it hard to focus.  The only interesting bit of information I extracted was that JUnit4 allows you to define parameterized tests, something I might have missed in the article. &lt;br /&gt;&lt;br /&gt;After a little bite, a longer walk and a stroll along the companies on display it was time for the second keynote. This keynote was very slick, had nice graphics and a strong story. Three different people talked about what Adobe offered, which activities are done by Adobe for the open source community, and what we can expect from Adobe in the future. They even tried to answer the question why Adobe was sponsoring the J-Fall. The answer was probably not very clear because I cannot reproduce it. The talk basically felt like one long commercial for the Adobe company.&lt;br /&gt;&lt;br /&gt;Right after the second keynote I went to the talk of  &lt;a href="http://blogs.infosupport.com/peterhe/"&gt;Peter Hendriks&lt;/a&gt; about &lt;a href="http://www.nljug.org/pages/events/content/jfall_2007/sessions/00039/"&gt;Eclipse Mylyn&lt;/a&gt;. I very much enjoyed this presentation. The story was clear without telling to much detail and the demo was well-prepared. Peter even turned on the magnifying glass in Windows to zoom in to the interesting parts of the demo. These are the kind of details that show that this presentation was well-prepared.&lt;br /&gt;On to the contents, the &lt;a href="http://www.eclipse.org/mylyn/"&gt;Eclipse Mylyn plug-in&lt;/a&gt; has all kind of nice features that can help you focus on your task. For example, the file-list can be filtered to show only those files that you have edited during the current task. Also, I especially liked the fact that you can define a test-target that only runs the tests associated with the current task. If you use Eclipse you should definitely take the time to check this plug-in out!&lt;br /&gt;&lt;br /&gt;After getting another cup of coffee I set down in front of the biggest stage to listen to Java-specialist &lt;a href="http://www.javaspecialists.eu/"&gt;Heinz Kabutz&lt;/a&gt;. He explained &lt;a href="http://www.nljug.org/pages/events/content/jfall_2007/sessions/00004/"&gt;The Secrets of Concurrency&lt;/a&gt; using ten (humorously named) laws. Each of the laws had an explanation of the name, a link to the actual problem and a solution. The talk was relatively straight-forward which made it easy to follow. A perfect talk for the late afternoon!&lt;br /&gt;&lt;br /&gt;The last talk I visited was about the new &lt;a href="http://jcp.org/en/jsr/detail?id=286"&gt;JSR-286 specification&lt;/a&gt; for portals and portlets. Although the &lt;a href="http://www.nljug.org/pages/events/content/jfall_2007/sessions/00029/"&gt;announcement&lt;/a&gt; implicated that the talk was only about the specification we hoped for a dynamic talk. Unfortunately, we got what was announce. An overview of the current version of the spec, a small list of shortcomings and a larger list of new features. Even though I was interested in the topic it was hard to stay focussed during the complete talk. Especially when the volume of the music in the bar next-door was turned up.&lt;br /&gt;&lt;br /&gt;As a conclusion I can say that, despite some of the less entertaining talk, I really enjoyed the day. It was interesting to hear about a lot of different topics, and fun to see different companies present themselves. If I get the change I will definitely attend the upcoming &lt;a href="http://www.nljug.org/jspring/"&gt;J-Spring&lt;/a&gt; conference.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-5353871221722358450?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/5353871221722358450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=5353871221722358450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5353871221722358450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5353871221722358450'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/10/attending-j-fall-2007.html' title='Attending J-Fall 2007'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-3315985792848833835</id><published>2007-09-28T11:28:00.000+02:00</published><updated>2007-09-28T12:22:10.233+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>My last words ...</title><content type='html'>... about my study that is! &lt;br /&gt;&lt;br /&gt;After seven years of attending college I am no longer a student anymore. It still has to sink in a little bit, but I will probably get used to it very soon. It is quit confronting to transfer all of your (bank-)accounts to a non-student one :( &lt;h4&gt;Thesis&lt;/h4&gt;I defended my thesis yesterday morning in front of a crowded room. Although I was a bit nervous before the talk this feeling faded away when I started the presentation. I thought it went reasonably well and this was confirmed by my supervisor(s). Please allow me to thank &lt;a href="http://people.cs.uu.nl/johanj/"&gt;Johan Jeuring&lt;/a&gt; and &lt;a href="http://www.cs.uu.nl/wiki/Hage/WebHome"&gt;Jurriaan Hage&lt;/a&gt; for their time and effort to supervise me.&lt;br /&gt;&lt;br /&gt;If you are interested in the final result of the thesis you can visit my &lt;a href="http://www.cs.uu.nl/wiki/Students/EricBouwersThesisPage"&gt;thesis page&lt;/a&gt;, or just download the complete thesis &lt;a href="http://abaris.zoo.cs.uu.nl:8080/wiki/pub/Students/EricBouwersThesisPage/INF-SCR-07-013.pdf"&gt;here&lt;/a&gt;. The slides of my presentation can be found on &lt;a href="http://www.cs.uu.nl/wiki/Stc/ImprovingAutomatedFeedback-BuildingAGenericRule-FeedbackGenerator"&gt;this&lt;/a&gt; page. Even though the project is finished (in the sense that I am not obligated to work on it anymore) I am still interested in remarks and comments you might have.&lt;h4&gt;Work&lt;/h4&gt;And what do people usually do when they graduate college? Right, they take a vacation!&lt;br /&gt;&lt;br /&gt;In my opinion I already had some vacation the past couple of weeks. I finished the major part of my thesis at the end of August, so in September I only had to integrate comments from my supervisors. This gave me lots of spare time which I used to relax a little bit.&lt;br /&gt;&lt;br /&gt;Therefore, I took some time to found a nice job. After visiting several companies I decided to accept a job at the &lt;a href="http://www.sig.nl/"&gt;Software Improvement Group&lt;/a&gt;. During the interviews I got the feeling that this is a challenging job where I can learn a lot. Whether this feeling is correct is something that only time can tell us. &lt;br /&gt;I will just wait and see what happens Monday morning!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-3315985792848833835?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/3315985792848833835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=3315985792848833835' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3315985792848833835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3315985792848833835'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/09/my-last-words.html' title='My last words ...'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-9039427588745909379</id><published>2007-09-01T16:47:00.000+02:00</published><updated>2007-09-01T17:33:31.227+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php-tools'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>A little migration helper</title><content type='html'>You probably already heard about it, but support for PHP version 4 is partly dropped as of 31-12-2007. And after 08-08-2008 the support ends completely. &lt;br /&gt;&lt;br /&gt;Luckily, the PHP documentation team provides you with a &lt;a href="http://www.php.net/manual/en/migration5.php"&gt;set&lt;/a&gt; &lt;a href="http://www.php.net/manual/en/migration51.php"&gt;of&lt;/a&gt; &lt;a href="http://www.php.net/manual/en/migration52.php"&gt;migration&lt;/a&gt; guides. Going through these guides can take some time, but it enables you to upgrade your code easily to be PHP5 compatible.&lt;br /&gt;&lt;br /&gt;To make your life even easier, the &lt;a href="http://www.program-transformation.org/PHP/PhpTools"&gt;PHP-tools&lt;/a&gt; project is extended with the tool &lt;b&gt;test-migration&lt;/b&gt;. This tool performs some checks that are described by the migration guide to detect whether the code can be run under version 5 of PHP. These checks include: &lt;ul&gt;&lt;li&gt;Is there a function definition with the same name as a function newly defined in PHP5?&lt;/li&gt;&lt;li&gt;Is an object created without the class being defined first?&lt;/li&gt;&lt;li&gt;Where are the functions strrpos, strripos and ip2long used?&lt;/li&gt;&lt;li&gt;Is there any place in which there is reflection within PHP that uses changed behavior?&lt;/li&gt;&lt;/ul&gt; The first two checks are rather easy to understand, PHP5 will simply halt execution with an error when these issues are detected at runtime. Therefore, the warnings that are generated for these kind of patterns are shown with a 'serious'-level. &lt;br /&gt;On the other hand, the last two checks do not find constructions that can halt execution. They detect places in which certain constructions are used. These constructions where already available within PHP version 4, but their behavior changed in version 5. To easily find these constructions they are flagged by a 'minor'-warning. More details about the changed behavior can be found &lt;a href="http://www.php.net/manual/en/migration5.incompatible.php"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The first version of this tool is quit basic and performs only a few checks. If you would like to see more check included, don't hesitate to drop me an email or put them in the comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-9039427588745909379?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/9039427588745909379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=9039427588745909379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/9039427588745909379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/9039427588745909379'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/09/little-migration-helper.html' title='A little migration helper'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-2837448166056939577</id><published>2007-08-18T10:54:00.000+02:00</published><updated>2007-08-18T11:17:12.106+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>Finished coding (?)</title><content type='html'>Monday was the day that I got back to working on my thesis. I spent the past few days coding and I think I am reasonably finished! The basics of the algorithm of the fourth phase are implemented, the GUI is updated with all kinds of small improvements and some documentation is written. The only coding that is left to do is making a solver for equations, a small todo compared to the overall work.&lt;br /&gt;&lt;br /&gt;Now that the coding is done you might want to take a look at it. Unfortunately, the actual tool is not that nice to look at. Some people may like a command-line interface, but I guess most people prefer a graphical interface. Those that really want to run the tool from the command-line can do a checkout of the &lt;a href="https://svn.cs.uu.nl:12443/repos/rfg/rfg/trunk/"&gt;svn-repository&lt;/a&gt;, others can just visit the &lt;a href="http://ideas.cs.uu.nl/~eric/index.php"&gt;RFG web interface.&lt;/a&gt; There is some documentation available on using the interface, but you can always send an email to my gmail-acocunt with any questions. It would be great if you could just visit the test-page, make some exercises and send me some feedback about it. &lt;br /&gt;&lt;br /&gt;I know that there are some things the in the GUI that can be improved, but I am mostly interested in whether the feedback helps you in solving the exercises. A correct step generates standard feedback which is not going to help you get to the answer. However, a step which contains an error triggers the algorithm of the third phase and gives more detailed feedback. Even though the feedback may be wrong sometimes, it is hopefully more useful than the message 'This step is incorrect'.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-2837448166056939577?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/2837448166056939577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=2837448166056939577' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2837448166056939577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2837448166056939577'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/08/finished-coding.html' title='Finished coding (?)'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-1396365332586235402</id><published>2007-08-13T08:33:00.000+02:00</published><updated>2007-08-13T21:46:31.676+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><title type='text'>Experiencing a World Jamboree</title><content type='html'>It has been one month since the last blog post. The reason for this is that I have traveled to England to (finally) attend the World Scout Jamboree. Describing everything that happened in the past weeks does not only result in an overly long post, it is also a bit boring. On the other hand, only giving the facts is also boring. Therefore, let us just scan through the trip and talk about the more interesting highlights.&lt;br /&gt;&lt;h2&gt;Pre Jamboree Tour&lt;/h2&gt; Our trip started with a pre-jamboree tour organized by the our &lt;a href="http://wj2007.scouting.nl/Contingent/_Contingent.htm"&gt;Contingent staff&lt;/a&gt;. We camped on &lt;a href="http://www.kibblestone.org/"&gt;Kibblestone&lt;/a&gt;, a reasonably big camp-site in England. Getting there involved two buses, a baggage-lorry and a boat. All the luggage of our troup, consisting of 40 persons, had to go with us on each of these vehicles. The boat was easy, but getting everything into the other three was a bit of a challenge. However, everything arrived safe and sound around 2 AM in the morning. After putting up the tents everybody slept like a baby.&lt;h3&gt;The wheather&lt;/h3&gt; The first day of our stay in Kibblestone was accompanied by lots of sunshine. During my first meeting there where already complaints that some of the female participants had to put on more clothing when they walked around. Luckily for the complainer, this was forced down upon us by the weather-gods. It did not rain all the time, but it rain enough to turn the grass, the roads and the toilets into a big mud-pit. During the jamboree itself it was common to pull an item out of its storage place and see the original Kibblestone-mud still sitting on it. It was just everywhere! &lt;h3&gt;Activities&lt;/h3&gt;The weather also influenced the activities we did. Most of the activities could also be done in the rain, in between two showers or indoors. Most of the participants enjoyed the numerous excursions, sport games (of all kinds) and campfires. For some of the participants the visit to Stratford-upon-Avon was a good excuse to buy all sorts of goods, including the new Harry Potter. Unfortunately for them they had to wait to get it because the first event in this town was a visit to the &lt;a href="http://www.shakespearience.co.uk/"&gt;shakespearience&lt;/a&gt;. However, upon arriving in the right street it was quit clear that we would not be entering the theater. Between us and the theater was not the expected road, but a small river of about 30 centimeters deep. More time to shop, more time to start with Harry Potter! &lt;h3&gt;Home Hospitality&lt;/h3&gt; An even more relaxing and special activity in the pre-jamboree tour was the home hospitality. The original concept was that each duo in our troop would stay with a family for two days. This was canceled by the English organization because there was a shortage of families that would host our scouts. Luckily, there where several scout-troops that wanted to host complete troops! After traveling for about six hours we arrived in &lt;a href="http://www.visitcardigan.com/"&gt;Cardigan&lt;/a&gt;, a small city on the coast of Wales. We stayed wit the "3rd Cardigan Sea Scouts", a great group of people that terribly spoiled us. Our stay was a bit at the end of our pre-jamboree tour and the scouts of Cardigan made sure that we got our well-needed rest before we headed off to the real Jamboree. I cannot thank them enough for this fantastic time! &lt;h3&gt;Surprising News?&lt;/h3&gt; On the last day of the pre-jamboree tour I finally spoiled a game that a part of our Contingent staff was playing for over a week. Each day, my girlfriend got one or two letters that together would form a sentence. Several people tried to work it out, but they all failed before I finally showed the answer to my girlfriend. For those of you that are curious, please visit the &lt;a href="http://www2.wj2007.scouting.nl/LIVE/index2.php?d=2607"&gt;news-site of our troop on the 26th of July&lt;/a&gt;.&lt;br /&gt;&lt;h2&gt;World Jamboree&lt;/h2&gt; It took a while before we left Kibblestone, one of the buses broke down after loading, but everybody of the Dutch contingent was on their way to the Jamboree. Some of the participants thought that there were a lot of people on Kibblestone (roughly 1350), they had not seen the Jamboree site yet. After only 3 hours on the bus we got out in the main bus terminal, only a short 20 minute walk from our campsite. I was told that many of our participants finally understood that taking to much luggage can really, really hurt your back. &lt;h3&gt;Opening Ceremony&lt;/h3&gt; Even though the 20 minute walk showed a little bit of the size of the Jamboree, the opening ceremony did the rest. After 3,5 hours everybody was assembled into the arena, roughly 40.000 scouts from over 150 countries. During the opening ceremony, every country was welcomed by both a real and a digital flag. One can imagine that it took a while before every country was named. &lt;br /&gt;The opening ceremony was to be held in the evening, around 8pm. This was changed once, twice and again because of a special agenda that needed to be respected. It turned out that &lt;a href="http://www.princeofwales.gov.uk/personalprofiles/princewilliam/"&gt;Prince William&lt;/a&gt; himself was attending the opening ceremony. Our places in the arena give us a change of seeing him close by and even hitting him on the head, although nobody thought that would be wise. &lt;h3&gt;Organization&lt;/h3&gt; Speaking of being wise, it was a good habit to pack as much as possible for a complete day. Walking to the other end of the campsite took about 45 minutes, that is without any chitchat-time. Furthermore, it could take some time to get you your food, a place to shower or a place on the bus. The shortest waiting time for a seat in the bus was about one hour, but it was not uncommon to wait for two or more. This showed that the English organization is pretty good in PR, everything was said to be completely organized, but not so good in actually making things happen. I still have to get a staff handbook which explains rules, procedures and activities for the Jamboree, something that could have been arranged a few months back. Furthermore, some of the activities themselves could have been prepared better. Sometimes even the people in charge of the activity did not know how things should be done.&lt;br /&gt;Don't get me wrong, the majority of the activities were fun and exciting. Our participants and the staff had a great time! Everyone just expected the English organization to be more organized. &lt;h3&gt;Scouting Sunrise&lt;/h3&gt;One of the biggest events during this World Jamboree was the Sunrise ceremony, held on the exact moment that the Scouts movement turned 100 years old. During the opening (and closing) ceremony the arena was filled with all sorts of different flags, during this ceremony everyone had the same Purple Scouts flag. Even though the ceremony was a bit too religious for my taste, I enjoyed the ceremony very much. Especially the moment that everybody was trying to collect 100 signatures on their sunrise scarf, 40.000 people wanting each others autograph is kind of cool to see. The rest of the day was filled with the food festival, each country on the sub camp prepared a dish typically for its country, sharing this with other countries. It was very nice to see so many cultures sharing their own ideas and rituals. This was truly one of the highlights of the Jamboree.&lt;h3&gt;Departure&lt;/h3&gt;You might expect that the departure wasn't that well organized, but would you believe that the English organization began to think about the departure 3 days before the event ended? All of the previous arrangements with the Dutch Contingent where suspended which resulted in a rather huge challenge.  In the original scenario we could stay on the Jamboree site until Thursday and Friday, but this was not possible anymore. After long debates ans short nights our Contingent staff provided a solution that was workable. The first group, including me, departed from the site on Wednesday to London for an excursion and from there to Essex University to sleep. It was very nice to sleep in a real bed and have access to your own shower! The next morning we started traveling around 6.00AM, I was home 14 hours later. The second group first had to relocate to a single spot on the Jamboree site after which they had a day of active excursions. They slept one more night on the Jamboree site and then had the same program as the first group.&lt;h2&gt;Conclusion&lt;/h2&gt;I have not yet begun to tell everything that happened on the Jamboree. For more information about our contingent you can visit  &lt;a href="http://www.wj2007.scouting.nl/"&gt;http://www.wj2007.scouting.nl/&lt;/a&gt;, for more information about the activities of the Jamboree you can visit &lt;a href="http://eng.thejamboree.org/"&gt;http://eng.thejamboree.org/&lt;/a&gt; when it is back up.&lt;br /&gt;&lt;br /&gt;All there is left to say is that I had a great time at the Jamboree. Hopefully I will be able to join the 22nd World Jamboree in &lt;a href="http://www.worldscoutjamboree.se/en/"&gt;Sweden&lt;/a&gt; in 2011. Now lets get back to actually making sure I can actually graduate in October 2007 :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-1396365332586235402?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/1396365332586235402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=1396365332586235402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1396365332586235402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1396365332586235402'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/08/experiencing-world-jamboree.html' title='Experiencing a World Jamboree'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-9107378211545767032</id><published>2007-07-13T08:51:00.000+02:00</published><updated>2007-07-13T11:37:00.632+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>Keeping it simpler</title><content type='html'>It has been three months since I started writing about &lt;a href="http://ericbouwers.blogspot.com/2007/04/third-phase.html"&gt;the third phase&lt;/a&gt; of my thesis. Given the fact that I thought it only needed some &lt;a href="http://ericbouwers.blogspot.com/2007/06/finetuning-third-phase.html"&gt;fine-tuning&lt;/a&gt; a few weeks ago, you might think that there is nothing new to write about it. If so, the next few paragraphs will proof you wrong.&lt;br /&gt;&lt;br /&gt;During the development of the third phase I have worked with a set of test-cases which needed to pass in order to proof that the algorithm works on a reasonable level. When there where failing tests the algorithm was tweaked to let those tests pass. This resulted in putting heuristics in the algorithm until everything worked. Unfortunately, the heuristics seemed to work in practice, but where not always correct in theory. Even though I still believe that purity is not necessarily needed for the correct functioning of tools, it is needed in order to argue that an algorithm works.&lt;br /&gt;&lt;br /&gt;So the first heuristic that was wrong was the introduction of meta-variables in the calculation of rewrite rules. Even though this works for a large number of cases, it also introduces dependencies which are not necessarily correct. For example, the rewrite rule between &lt;b&gt;1+1&lt;/b&gt; and &lt;b&gt;2&lt;/b&gt; would be &lt;b&gt;A + A -&gt; B&lt;/b&gt;. The LHS of this rule implies that the rule can only be matched a plus with two equal terms, creating a dependency that can easily be a coincidence. Therefore, the generated rewrite rules should not contain meta-variables, only 'normal' terms. This considerably simplifies the algorithm for rule-calculation and term-distance, while the results are still what is expected. So exit meta-variables.&lt;br /&gt;&lt;br /&gt;The second heuristic that was introduced was the penalty given to guesses coming from recursion. I thought that this was needed in order to support the case in which a student applies a rule incorrectly, followed by a correct application of a different rule. Thinking about this a bit more I realized that it is impossible to support this situation. When two rules are applied and the first one is applied incorrectly, you can never know whether the second one is applied correctly from just looking at the terms. Therefore, a guess for either rule is can be a valid guess. So exit penalty.&lt;br /&gt;&lt;br /&gt;Now that the algorithm is made even more simpler by removing the penalty there where 6 test-cases that still failed. In two of these cases the returned result is as good a guess as the expected result. The other four cases simply show the limitations of the algorithm. &lt;br /&gt;In all four cases the expected outcome is the rule &lt;b&gt;EqElem: A &lt;-&gt; B =&gt; (A /\ B) \/ (~A /\ ~B)&lt;/b&gt;, but the actual outcome is &lt;b&gt;ImpElem: A -&gt; B =&gt; ~(A) \/ B&lt;/b&gt;. As you can see, the rules have a pretty similar LHS, the only difference is the operator, and a somewhat similar RHS. It turns out that as soon as the student makes a mistake with the priorities in applying the rule &lt;b&gt;EqElem&lt;/b&gt;, for example by forgetting the parenthesis, the algorithm fails and returns the rule &lt;b&gt;ImpElem&lt;/b&gt; as a result. This is because a change in priorities  causes the AST of the RHS to be heavily transformed, which results in a large distance to the rule &lt;b&gt;EqElem&lt;/b&gt;. This rule encodes a special priority in its RHS, creating a distance when this priority is not followed.&lt;br /&gt;&lt;br /&gt;The conclusion that can be made from all this is that the algorithm of this phase can be kept simple, while still supporting a considerable amount of situations. For those situations for which it does not work, the problem is usually a (large) change in priorities. Luckily, these kind of errors are easily captured in rules for the fourth phase. So the battle might be lost, at least in the end the war is won.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-9107378211545767032?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/9107378211545767032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=9107378211545767032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/9107378211545767032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/9107378211545767032'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/07/keeping-it-simpler.html' title='Keeping it simpler'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-8142738730641778163</id><published>2007-07-04T20:08:00.000+02:00</published><updated>2007-07-05T11:16:17.297+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><title type='text'>Testing a contest</title><content type='html'>Wow, that was a rather interesting experience. I spend the last three days on testing the &lt;a href="http://www.icfpcontest.org/"&gt;ICFP-contest&lt;/a&gt;. There is not much I can say about the actual content of the contest, but I can say that I learned several new things. Some of them are not so funny, while others are very cool!&lt;br /&gt;&lt;br /&gt;Anyway, lets just say that our solution was not exactly optimal :) I am sure that other will do better. So if you have not done so, register &lt;a href="http://www.icfpcontest.org/teams/register"&gt;here&lt;/a&gt;.  &lt;br /&gt;&lt;br /&gt;Have fun and hack away.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-8142738730641778163?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/8142738730641778163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=8142738730641778163' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8142738730641778163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8142738730641778163'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/07/testing-contest.html' title='Testing a contest'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-995814220393041598</id><published>2007-06-29T19:04:00.000+02:00</published><updated>2007-07-01T16:51:04.051+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php-tools'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>It is getting noticed</title><content type='html'>Within the last two weeks I noticed that PHP-Front and PHP-Sat are being discovered by people that are looking for PHP-specific solutions. It is not that we are flooded with request, but I am still happy with every question :)&lt;br /&gt;&lt;br /&gt;The first &lt;a href="http://mail.cs.uu.nl/pipermail/psat-dev/2007q2/000023.html"&gt;question&lt;/a&gt; was send to the &lt;a href="http://mail.cs.uu.nl/mailman/listinfo/psat-dev"&gt;psat-dev&lt;/a&gt;-mailinglist and was about the &lt;a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity"&gt;Cyclomatic complexity&lt;/a&gt; of PHP code. I &lt;a href="http://mail.cs.uu.nl/pipermail/psat-dev/2007q2/000024.html"&gt;replied&lt;/a&gt; that it would not get into PHP-Sat because it is not a bug-pattern. However, it would be a nice tool for the &lt;a href="http://www.php-sat.org/PhpTools"&gt;PHP-Tools&lt;/a&gt; project. I made a similar tool for Java because of an &lt;a herf="http://www.cs.uu.nl/wiki/Pt/AssignmentCollectingStrategies#McCabe_s_Cyclomatic_Complexity_c"&gt;assignment&lt;/a&gt; in the past, so it is probably just a matter of renaming the Strategies to use the PHP-Front api. Unfortunately, I didn't get an answer about how the report should look like. If you have any ideas please let me know in the comments, or in the &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-99"&gt;issue&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A second question was about the grammar of PHP-Front, or actually the license of this grammar. The people behind &lt;a href="http://www.txl.ca/"&gt;TXL&lt;/a&gt; have derived a PHP-grammar for TXL from the SDF-grammar in PHP-Front. Since our license does not state anything about derived work without common source, we were asked for our permission to distribute this new grammar. Naturally, this permission was given very quickly and we were also allowed to take a peak at the source. I must say that I find it interesting, but I currently do not have time to look into it all. I imagine that the definitions of the grammars and TXL itself is similar to how things work in Stratego, but I have to look into that.&lt;br /&gt;&lt;br /&gt;The last &lt;a href="http://mail.cs.uu.nl/pipermail/psat-dev/2007q2/000025.html"&gt;question&lt;/a&gt; in this series is about defined functions. Finding out which functions are defined in a project is easy when classes are ignored, a simple grep on the project will do. When a project also includes classes it becomes trickier to get all functions defined outside of a class. The question was whether PHP-Front could help with this issue, and the answer is of course yes!&lt;br /&gt;Within the reflection part of the library the list of defined functions and classes is already available. This makes it possible to write a tool to show all defined functions in just a few lines of code. Since it was also a nice tool for the &lt;a href="http://www.php-sat.org/PhpTools"&gt;PHP-Tools&lt;/a&gt; project I added a tool for this last Friday.&lt;br /&gt;&lt;br /&gt;Another issue that was brought up by the last e-mail is the issue of our implementation language. Since Stratego is relatively unknown the project has a steep learning curve. On the other hand, if I had chosen a different implementation language it would have taken me way longer to implement the current features. And besides, this piece of code is not that hard to understand right?&lt;br /&gt;&lt;pre&gt;  defined-functions-main =&lt;br /&gt;    include-files-complex&lt;br /&gt;  ; get-php-environment&lt;br /&gt;  ; get-functions&lt;br /&gt;  ; if ?[]&lt;br /&gt;    then !"No functions defined."&lt;br /&gt;    else  map(transform-to-message)&lt;br /&gt;        ; lines                    &lt;br /&gt;    end  &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-995814220393041598?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/995814220393041598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=995814220393041598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/995814220393041598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/995814220393041598'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/06/it-is-getting-noticed.html' title='It is getting noticed'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-2915349027607626318</id><published>2007-06-20T22:41:00.000+02:00</published><updated>2007-06-24T19:37:13.903+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='php-tools'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Where you at?</title><content type='html'>Now that the propagation of safety-types seems to go smoothly it was time to dive into another subject: accessing the location of terms. In this case, the location of a term is defined as the location of the text in the original file that was parsed to that term. Since the strategy to annotate the AST with position-info is available in the standard libraries nowadays, it should be easy to access these locations and finally solve &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-91"&gt;PSAT-91&lt;/a&gt; right? Lets find out!&lt;br /&gt;&lt;br /&gt;The first thing I did was to add a separate module to handle the low-level stuff of getting the location annotations. This module contains several getter-strategies that can retrieve, for example, the number of the start-line. The location info is captured in six different numbers: start-line, end-line, start-column, end-column, offset and length. A getter-strategy is available for all of them. Furthermore, the name of the file in which the term is defined can be retrieved. &lt;br /&gt;&lt;br /&gt;Although these getter-strategies are useful, they are not meant to be called directly. I figured that the most common use of these functions would be reporting the values in some kind of (formatted) message. In order to capture this kind of behavior the strategy &lt;i&gt;format-location-string(|message)&lt;/i&gt; is defined. This strategy takes a message with holes in the form of &lt;b&gt;[STARTLINE]&lt;/b&gt; as parameter and fills these holes with values from the current term. A rather useful strategy if I say so myself.&lt;br /&gt;&lt;br /&gt;To practice with this new piece of functionality I have added an extra option to the tool &lt;i&gt;input-vector&lt;/i&gt; of the &lt;a href="http://www.program-transformation.org/PHP/PhpTools"&gt;php-tools&lt;/a&gt;-project. This option allows the user to choose between the normal list, or the same list with line-numbers printed for each access. More information about this option and how to add an option yourself can be found &lt;a href="http://www.program-transformation.org/PHP/TheExampleProject#Adding_an_option"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;After this was done I moved to php-sat to make the output more concise. It was actually pretty easy to implement. The algorithm is nothing more then get-terms-with-annotations, make-nice-output. I actually spend more time on creating a test-setup for calling php-sat through a shell-script then on generating the more concise format. The only problem was that the adding of position-info everywhere interfered with the dynamic-rules. A few well-places &lt;i&gt;rm-annotations&lt;/i&gt; where needed to fix this. Please let me know if you like the new output, or whether something should be added.&lt;br /&gt;&lt;br /&gt;The next applications of the location info is the tracking of where untainted data enters an application. When a function is called with a parameter &lt;b&gt;$foo&lt;/b&gt; which is tainted, it would be nice to show when it was tainted. I think this is not too difficult to add, but bugs always seem to lurk in 'I-think-it-is-easy-to-add'-features.&lt;br /&gt;&lt;br /&gt;A last remark about locations is a small problem without an actual solution. Eventually php-sat must support function-calls. The algorithm to analyze function-calls is not complicated, but how can bug-patterns within a function be reported? A message before each call to this function? Within the file in which the function is defined? And what about cases in which one call is flagged and the other one isn't? And can we also handle object-creation in the same way? I haven't figured out how to handle this, so if you have any ideas please let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-2915349027607626318?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/2915349027607626318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=2915349027607626318' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2915349027607626318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2915349027607626318'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/06/where-you-at.html' title='Where you at?'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-4505158945935977477</id><published>2007-06-13T12:52:00.000+02:00</published><updated>2007-06-14T13:37:28.651+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>Finetuning the third phase</title><content type='html'>You might remember an &lt;a href="http://ericbouwers.blogspot.com/2007/04/third-phase.html"&gt;earlier&lt;/a&gt; post about the algorithm for the third phase of generating feedback. This algorithm takes two terms and a set of (allowed) rewrite rules. After calculating the rewrite rule to transform the first term into the other, the algorithm chooses the rule from the set that is 'closest' to the calculated rewrite rule. This chosen rule can now be used to generate better feedback because it gives some insight in the intentions of the student.  &lt;br /&gt;&lt;br /&gt;In theory the algorithm functions quit well, and the same goes for the actual implementation. However, during the implementation of the algorithm I have run into a few details that needed to be fixed. This once again shows that theory and practice usually do not match completely :) &lt;br /&gt;The following is a (small?) list of some of the refinements made during the implementation.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;The rules(et)&lt;/h4&gt;One assumption that was made during the design of the algorithm is that rules &lt;i&gt;must&lt;/i&gt; rewrite the current term into a term that is closer to the answer. For example, the rule &lt;b&gt;A + B =&gt; B + A&lt;/b&gt; is correct from a mathematical point of view, but it does not help a student to get closer to an answer.  &lt;br /&gt;A second assumption that was made for the algorithm is that the ruleset is extended by combined rules. For example, the rules &lt;b&gt;A =&gt; B&lt;/b&gt; and &lt;b&gt;B =&gt; C&lt;/b&gt; are combined into a single rule &lt;b&gt;A =&gt; C&lt;/b&gt;. The calculation of the combined rules is not very difficult, but getting the calculation to stop is a bit trickier.  &lt;br /&gt;The first experiment with rules from the domain of fractions went reasonably well, the only restriction that needed to be added was that restrictions on variables may not depend on themselves. So the restriction &lt;b&gt;... where B := B&lt;/b&gt; is not allowed. &lt;br /&gt;The second experiment with rules from the domain of logic went into endless recursion, a clear sign of an additional problem. It turned out that rules where merging with themselves, resulting in an extra restriction to prevent this kind of behavior.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;Calculating the rule&lt;/h4&gt;My first idea about the calculation of the rewrite-rule was a simple bottom-up traversal which returned a meta-variable as long as the (sub)-terms are equal. This naive algorithm worked reasonable during the first tests, but failed to perform well at larger examples. In these larger examples the calculated rule contained too much noise to see the important parts of the rewrite rule.&lt;br /&gt;In an attempt to cut down the noise the algorithm was extended to find out whether a sub-tree of a rule can completely be removed. An example of this is the calculation of the rewrite rule between &lt;b&gt;4 + 5 + 2&lt;/b&gt; and &lt;b&gt;4 + 6&lt;/b&gt;. The naive algorithm would give &lt;b&gt;A + B + C =&gt; A + D&lt;/b&gt; as an answer. However, inspecting the terms gives the rule &lt;b&gt;B + C =&gt; D&lt;/b&gt; as a more accurate match. This last rule still contains the same information, we have simply removed the noise of the &lt;b&gt;A + .&lt;/b&gt;-sub-tree.&lt;br /&gt;&lt;br /&gt;The first implementation of this extension only checked operators with an equal amount of children, and only with a left-to-right match. Even though this worked in some situations, it was still not good enough to be useful in general. Therefore, the matching part of the extension was improved by taken into account the associativity and commutativity of the operators. The different combinations of these properties either result in an exact-match (left-to-right), an assoc-match (left-to-Right, right-to-left) or an assocComm-match (all combinations of children are tried with an assoc-match). &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Distance between rules&lt;/h4&gt;As with the calculation of the rules, the distance between the rules started with a naive algorithm covering several cases:&lt;ul&gt; &lt;li&gt;When we have two equal (sub)-trees we return a distance of 0. &lt;/li&gt;&lt;li&gt; When we have two nodes in the trees we compare the name of the nodes and all the children from left-to-right, adding distance when the two operators are not equal.&lt;/li&gt;&lt;li&gt;When either one of the trees is a leaf we check whether it is a meta-variable. If this is not the case we simple add a distance of 1 (for the leaf) and the size of the other (sub)-tree. If the leaf is a meta-variable we check whether it is a free variable, and return a distance of 0 if it is. Otherwise the same '1 + size (sub)-tree' is returned as distance. A variable is free when it is not previously bound by a match or a restriction.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Note that the above algorithm does not explain what should happen when two nodes have a different amount of children. After some testing I found out that it works quit well to just take the size of the extra children together with a penalty. &lt;br /&gt;&lt;br /&gt;Another thing that is not considered in the above algorithm is the 'forgetting' of an operator. An example of this is the distance between the rule &lt;b&gt;~~A -&gt; A&lt;/b&gt; and &lt;b&gt;~~A -&gt; ~A&lt;/b&gt;. With the naive algorithm the distance between these rules can be quit large when the &lt;b&gt;A&lt;/b&gt; in the rule is a large sub tree. In order to model this 'forgetting' the algorithm checks whether a node has a single child on one side. If this is the case the algorithm calculates the distance between the node with operator and the distance between the node without the operator. It then takes the smallest one of the two, taken into account some extra costs for adding the operator.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Putting it together&lt;/h4&gt;Now that all the sub-parts worked correctly the top-level algorithm needed to be implemented and tweaked. A first thing that was tweaked was the filtering of a list of matches. When more then one rule has the small distance, the algorithm first returned the first element of that list. Since this behavior makes the ordering of the rules important it needed to be changed. Now the algorithm takes the rule from the list in which the LHS of the rule is closest the current Previous Term. &lt;br /&gt;&lt;br /&gt;Speaking of Previous Terms, the original Previous Term does also influence the choice for a rule. When we go into recursion by applying rules, the current PT changes. The changed PT matches better with rules that have a similar LHS, thus this LHS is different from the original PT. Assuming that students apply rules that at least partly match the LHS of a rule, we need to take the distance between the original PT and the LHS of the rule into account. Furthermore, we also take into account the number of rules that are applied to the PT in choosing a rule.  &lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Does it work?&lt;/h4&gt;After all the tweaking and the bux-fixing the answer to this question is: Yes! You can take a look at some of the &lt;a href="https://svn.cs.uu.nl:12443/repos/rfg/rfg/trunk/testsuite/Tests/Fraction/ThirdPhase.hs"&gt;test&lt;/a&gt;-&lt;a href="https://svn.cs.uu.nl:12443/repos/rfg/rfg/trunk/testsuite/Tests/Logic/ThirdPhase.hs"&gt;cases&lt;/a&gt; which list a PT, a CT and a desired result from the defined set of rules. &lt;br /&gt;The tests-modules also include examples of situations which do not produce the correct result. This has to do with the fact that the virtual student made more then one mistake in the application of the rule. This shows that the algorithm does not work in all situations, but this was also not the goal of this algorithm. Luckily, the other examples show that the algorithm is capable of producing desirable output in a number of situations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-4505158945935977477?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/4505158945935977477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=4505158945935977477' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4505158945935977477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4505158945935977477'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/06/finetuning-third-phase.html' title='Finetuning the third phase'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-8265584430250725211</id><published>2007-05-28T21:00:00.000+02:00</published><updated>2007-05-28T22:20:14.879+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Some new features</title><content type='html'>Last Friday, I had a conversation with nEUrOO in #stratego about the results he was having with php-sat (see his &lt;a href="http://rgaucher.info/b/index.php/post/2007/05/24/PHP-Source-Code-Security-Scanners-basic-test"&gt;blog&lt;/a&gt; for more details). After the conversation, and after looking at the test-file he mentioned in his blog, I got started and added 2 new features to php-sat.&lt;br /&gt;&lt;br /&gt;The first new feature is aimed at the usability of the tool itself, and is visible by a new command-line option: &lt;i&gt;-ra CODE&lt;/i&gt;. This option accepts one of &lt;b&gt;MCV, COR, EI, STY&lt;/b&gt; or &lt;b&gt; OPT&lt;/b&gt; as input, and makes sure that the only analysis that is run is the one that belongs to the given code. In other words, you can now run, for example, only the correctness checks by calling php-sat with: &lt;i&gt;--ra COR&lt;/i&gt;. This gives you a somewhat coarse-grained control over the behavior of the tool. A plan for more fine-grained control (on the level of patterns) is also mentioned some time ago, but the implementation of this level of control requires some more thoughts. In the meantime, please enjoy running a single kind of bug-patterns :).&lt;br /&gt;&lt;br /&gt;A second new feature is added to the analysis of safety-levels. Consider the following example:&lt;pre&gt;&amp;lt;?php&lt;br /&gt;  echo addslashes(htmlentities($_GET['name']));&lt;br /&gt;?&gt;&lt;/pre&gt; The default configuration for &lt;i&gt;echo&lt;/i&gt; requires a parameter to have both the level &lt;i&gt;EscapedHTML&lt;/i&gt; as well as &lt;i&gt;EscapedSlashes&lt;/i&gt;. Furthermore, the default configuration defines the return-type of the functions as:&lt;pre&gt;function: addslashes       level: escaped-slashes&lt;br /&gt;function: htmlentities     level: escaped-html&lt;/pre&gt; So this piece of code should not be flagged by php-sat. Unfortunately, previous revisions did flag this piece of code! &lt;br /&gt;&lt;br /&gt;The problem here is that the analysis uses the safety-level of a function that is mentioned in the configuration file &lt;u&gt;without&lt;/u&gt; considering the parameter of the function. This behavior works well for most functions, but when functions only add a property to their parameter it becomes incorrect. Because of this behavior, the &lt;i&gt;echo&lt;/i&gt;-statement is flagged because  the call to &lt;i&gt;addslashes&lt;/i&gt; is only annotated with &lt;i&gt;EscapedSlashes&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Fortunately, the solution is not that complicated. Since we know that there are several functions that add a certain property to their parameter, we add the possibility to specify this in the configuration file. The new syntax for functions that add a safety-level is a '+' after the level of the function. This '+' forces a function to inspect the level of its (only) parameter and combine this with the level that is specified as its safety-level. The combination of the levels is the result of the function call. (Small note: this behavior is (currently) only supported for functions with a single parameter.)&lt;br /&gt;&lt;br /&gt;So from now on, when the following configuration is used: &lt;pre&gt;function: addslashes       level: escaped-slashes +&lt;br /&gt;function: htmlentities     level: escaped-html +&lt;/pre&gt; the example above is not flagged anymore because the call to &lt;i&gt;addslashes&lt;/i&gt; is annotated with its own safety-level (&lt;i&gt;EscapedSlashes&lt;/i&gt;), as well as the safety-level of its parameter (&lt;i&gt;EscapedHTML&lt;/i&gt;). A pretty useful feature I would say.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-8265584430250725211?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/8265584430250725211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=8265584430250725211' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8265584430250725211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8265584430250725211'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/05/some-new-features.html' title='Some new features'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28873279.post-823114923201327334</id><published>2007-05-21T10:07:00.000+02:00</published><updated>2007-05-21T12:27:12.618+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><title type='text'>A scouts week</title><content type='html'>Those of you that (try to) read the posts of this blog every week might have noticed the two-week gap between this post and the previous one. This gap originates from the hobby I practice since I was a (very) little boy: &lt;a href="http://en.wikipedia.org/wiki/Scouting"&gt;Scouting&lt;/a&gt;. Within the past week I had the chance to go to two camps, with a three-day rest-period in between. This results in a large amount of dirty clothes, little sleep, a voice like a grinder and lots and lots of fun!&lt;br /&gt;&lt;br /&gt;The first camp I attended was the 'clusterweekend' of the &lt;a href="http://www.wj2007.nl/"&gt;Dutch Contingent&lt;/a&gt;. My role in this camp was that of quartermaster of the Bontbekplevieren, one of the 25 troops visiting the &lt;a href="http://eng.thejamboree.org/"&gt;World Jamboree&lt;/a&gt; this summer. Because it is almost impossible to get all of the Dutch participants together on one terrain, the 25 troops where divided into three clusters. There where eight troops in our cluster, each troop consisting of 40 persons. Adding a few people for camping staff, working staff and general staff we had about 350 people attending this camp.&lt;br /&gt;&lt;br /&gt;Even though the weather forecast was a bit disappointing at first, the rain all fell down on us during the first night. This immediately showed that our new tents are water-proof, which is a good thing considering the normal weather conditions on England. During the rest of the weekend we played some games on the beach, sorted out a massive amount of badges, played in a casino and had a big party. Luckily, the sun was shining on Sunday so we could pack everything in dry conditions. The weekend was a great success, and of course there are some &lt;a href="http://www2.wj2007.scouting.nl/Fotoalbum/Clusterweekend2/West/index.php?"&gt;general photo's&lt;/a&gt;, as well as &lt;a href="http://bontbekplevieren.wj2007.nl/index.php?page=second_clus_weekend"&gt;photo's of our troop&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;When I came home on Sunday I quickly unpacked everything and washed some of the clothes. I worked a bit on Monday and Tuesday, but I also had to take care of some things for &lt;a href="http://www.ontmoeting.nu"&gt;Ontmoeting&lt;/a&gt;, the second camp of this week. Ontmoeting is organized once a year for all the scouts of our region in the age of 11-15. They are mixed into sub-camps to compete for the first place. Each year the competition is wrapped into a certain theme, this years theme was 'Bond maakt het Bond'. The mission was to become the replacement of James Bond. The 153 participants where divided into 6 camps, each representing a 'superhero' of some kind. I was part of the &lt;a href="http://bassie-adriaan.nl/"&gt;Bassie en Adriaan&lt;/a&gt;-camp, a rather famous duo in the Netherlands. &lt;br /&gt;&lt;br /&gt;This camp started on Wednesday with the packing of 'Diana', the trailer of our &lt;a href="http://www.janvanhoof.nl/"&gt;group&lt;/a&gt;. After loading all sorts of stuff we want to the campsite which was relatively small, but this made the whole thing kind of cosy. On Wednesday-evening we had a BBQ and a campfire with the staff, the children arrived on Thursday morning. The next three days where filled with all sorts of larger games, smaller games and some pretty cool ticket-activities. Naturally, you can check these out on some of the &lt;a href="http://www.iigscouts.nl/ontmoeting/index.php"&gt;photo's&lt;/a&gt;, made by the same people that also made the camp-news-paper. It is always hard to tell about the whole camp in just a few words, but it all boils down to having a lot of fun. This year the games where really fun, thank you 'spelstaf', and our sub-camp has won the cup! To quote a famous clown: 'Alles is voor Bassie!' &lt;br /&gt;&lt;br /&gt;These kind of weeks are a great way to relax, no worries about making deadlines or missing important stuff. It is simply not possible to read a real news-paper, so you just ignore the rest of the world for a couple of days. Also, it gives me a lot of energy to start working again, so let's get to it! &lt;br /&gt;&lt;br /&gt;After catching some more sleep of course...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-823114923201327334?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/823114923201327334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=823114923201327334' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/823114923201327334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/823114923201327334'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/05/scouts-week.html' title='A scouts week'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-8663871666086271350</id><published>2007-05-09T20:41:00.000+02:00</published><updated>2007-05-09T22:14:26.590+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Merging fun</title><content type='html'>Yesterday, commit number &lt;a href="http://mail.cs.uu.nl/pipermail/psat-commits/2007q2/001051.html"&gt;379&lt;/a&gt; and &lt;a href="http://mail.cs.uu.nl/pipermail/psat-commits/2007q2/001052.html"&gt;380&lt;/a&gt; introduced a renewed implementation of the constant-propagation, and new functionality for finding vulnerabilities. You guessed it, the merging of constant-propagation and vulnerability analysis has taken off! The cool things are that 1) the old tests all pass, 2) some new tests pass and 3) I get to write a lot more tests!&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://ericbouwers.blogspot.com/2007/04/thinking-of-merging.html"&gt;main reason&lt;/a&gt; for starting the integration of both analysis was the fact that I saw a lot of code duplication popping up. This duplication was caused by the fact that the bookkeeping of internal structures is the same for all strategies, the code only differs for the properties of values. &lt;br /&gt;&lt;br /&gt;With this last piece of information I started to merging. My first approach consisted of trying to pass a list of get-set strategies to the &lt;i&gt;main&lt;/i&gt;-strategy and calling these strategies dynamically. This was obviously not a very good or nice start because it always seem to result in numerous segmentation faults. &lt;br /&gt;&lt;br /&gt;Thinking about the problem made the second attempt somewhat more pragmatic. Instead of generalizing I just wanted to make it work for constant propagation in combination with a second analysis. So I rewrote the strategy to receive two strategies, one for getting the properties of literals and one for getting the properties of operators. The choice for these language constructs is based on the reasoning that these constructs are the only ones that make or manipulate the actual properties of values. The other language constructs manipulate the flow of the values instead of the actual values. &lt;br /&gt;&lt;br /&gt;When this all seemed to work the more difficult challenge had to be solved, manipulation of variables and arrays. It turned out to be more simplistic then I thought because of the indirection between the variables and their values. For the purpose of dealing with aliasing, a variable does not point to a value but rather to a value-identifier. This identifier points to the actual value. This makes the creation of a reference easier, we just create a mapping from a variable to the value-identifier of the referenced variable. Because of this indirection we can simply make the value-identifier point to more then one property, implemented by a dynamic-rule for each property. This makes the merging of sets of dynamic rules a bit harder, but not impossible.&lt;br /&gt;&lt;br /&gt;It might sound simple (or incomprehensible), but getting everything right was still a bit tricky. For example, when an assignment is made the property of the RHS must be known before the LHS can be assigned this property. So what happens when the constant propagation cannot compute a value, should we simply fail to assign a property? &lt;br /&gt;The answer is no, the second analysis might still be successful. These kind of little problems made the implementation a little less straight-forward, and the code a little less beautiful. &lt;br /&gt;&lt;br /&gt;However, the result of it all is that the following example is now flagged correctly: &lt;pre&gt;&amp;lt;?php&lt;br /&gt; $foo = $_GET['asdf'];&lt;br /&gt; $bar = 1;&lt;br /&gt; $bar =&amp; $foo;&lt;br /&gt; echo $bar;&lt;br /&gt;?&gt;&lt;/pre&gt; In this case, &lt;i&gt;echo $bar&lt;/i&gt; will be flagged by the latest php-sat.&lt;br /&gt;&lt;br /&gt;I experienced one problem with the implementation that is related to the semantics of Stratego. My first attempt in adding an annotation to a term was something like this:&lt;pre&gt; add-php-simple-value(|val):&lt;br /&gt;    t{a*} -&gt; t{annos}&lt;br /&gt;      where  b*    := &lt;remove-all(?PHPSimpleValue(_))&gt; a*&lt;br /&gt;           ; annos := [PHPSimpleValue(val) | b*]&lt;/pre&gt;This works perfectly, the annotations are matched as a list by the &lt;i&gt;*&lt;/i&gt;-syntax, and a list is added as an annotation to the term again. The only problem with this is that the second time this rule is applied it matches the annotations as a list of a list of annotations, which was not the behavior I desired. This problem is easily solved by also adding a &lt;i&gt;*&lt;/i&gt;  to build the term:&lt;pre&gt; add-php-simple-value(|val):&lt;br /&gt;    t{a*} -&gt; t{annos*}&lt;br /&gt;      where  b*     := &lt;remove-all(?PHPSimpleValue(_))&gt; a*&lt;br /&gt;           ; annos* := [PHPSimpleValue(val) | b*]&lt;/pre&gt;Now the list of annotations is not wrapped in an actual list anymore. I know it is documented somewhere, but this little explanation might save some others from an headache or a long debug-session.&lt;br /&gt;&lt;br /&gt;The next step in the analysis for vulnerabilities is a rather important one: &lt;b&gt;testing&lt;/b&gt;. Even though the basic parts of variables and assignments are already tested, there exists a large number of scenarios that need to be tested on this new integration-strategy. &lt;br /&gt;But hey, testing is fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-8663871666086271350?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/8663871666086271350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=8663871666086271350' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8663871666086271350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8663871666086271350'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/05/merging-fun.html' title='Merging fun'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-713285864438499806</id><published>2007-05-01T14:52:00.000+02:00</published><updated>2007-05-01T15:56:03.655+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><title type='text'>Passing time</title><content type='html'>After I stopped working on the GUI for the RFG I have been working in &lt;a href="http://www.haskell.org"&gt;Haskell&lt;/a&gt; again. It has been quite a while since I have worked with this language, so it takes me some time to get used to it again. Since it is a strongly typed language, as apposed to both Stratego and PHP, some things take longer to implement, but some mistakes are found by the type-checker. Unfortunately, this means that I have not done anything terribly interesting for my thesis.&lt;br /&gt;&lt;br /&gt;So lets look at the other interesting project, PHP-Sat. I have been working on the integration of a second analysis within the constant-prorogation. This is coming along nicely, but it requires some heavy thinking and careful considerations. I have already worked my way up to the expression-level, so I hope to finish the rest of the constructs that were already supported by the end of this weekend.&lt;br /&gt;&lt;br /&gt;In order to tell at least one interesting thing, and to not waste your time completely, I wanted to point out some interesting video-presentations. The first one is also the first one I ever saw through the internet: &lt;a href="http://video.google.com/videoplay?docid=-2918636405934460536&amp;q=tech+talks"&gt;Drupal, Joomla! &amp;amp; GSoC&lt;/a&gt;. The title explains why I wanted to see it, and it is interesting for anyone that wants to know more about the GSoc from a projects point of view. The second also comes from the &lt;a href="http://www.google.com/search?q=%22Google+Tech+Talks%22"&gt;Google Tech Talks&lt;/a&gt; and is called &lt;a href="http://video.google.com/videoplay?docid=-4216011961522818645"&gt;How Open Source Projects Survive Poisonous People (And You Can Too)&lt;/a&gt;. It is given by the people behind subversion and I especially liked the story about the &lt;a href="http://www.google.com/search?q=%22Google+Tech+Talks%22"&gt;bikeshed&lt;/a&gt;. The third presentation comes from &lt;a href="http://www.moolenaar.net/"&gt;Bram Molenaar&lt;/a&gt;, the creator of &lt;a href="http://vim.sourceforge.net/"&gt;VIM&lt;/a&gt; (yes, that is the editor I mostly use). He talks about &lt;a href="http://video.google.com/videoplay?docid=2538831956647446078"&gt;7 Habits For Effective Text Editing&lt;/a&gt;, be sure to check it out even if you do not use VIM. &lt;br /&gt;&lt;br /&gt;The presentations mentioned above are (some of) the presentations I have already seen, the following are on my todo-list. Please let me know if anyone of them is super-great, or a total waste of time.&lt;br /&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="http://video.google.com/videoplay?docid=6127548813950043200&amp;q=tech+talks "&gt;The paradox of choice&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://video.google.com/videoplay?docid=-1109203988787201616"&gt;Education in the Digital Age&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://video.google.com/videoplay?docid=-1963479725423533196"&gt;How to get paid to do open source&lt;/a&gt; (does this mention the GSoc?)&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-713285864438499806?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/713285864438499806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=713285864438499806' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/713285864438499806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/713285864438499806'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/05/passing-time.html' title='Passing time'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-6057410389584156995</id><published>2007-04-24T08:53:00.000+02:00</published><updated>2007-04-24T11:07:06.976+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>Doing it with javascript</title><content type='html'>I have been working in the wondrous world of &lt;a href="http://en.wikipedia.org/wiki/JavaScript"&gt;JavaScript&lt;/a&gt; the last couple of (work-)days, and I have to say that it kind of fun to work with. It turns out that the functionality that I want for the &lt;a href="http://ideas.cs.uu.nl/wiki/index.php/RFG:GuiDesign"&gt;GUI&lt;/a&gt; is mostly captured in libraries, which makes it a lot easier to implement everything. &lt;br /&gt;&lt;br /&gt;People that are interested in the current status of the GUI can always take a look &lt;a href="http://ideas.cs.uu.nl/~eric/frontend/"&gt;here&lt;/a&gt;. Currently, the best way to view the page is through Firefox. I still have to do some debugging for other browsers, in particular Internet Explorer. I managed to get the designs the same across browsers by using the &lt;a href="http://www.tatanka.com.br/ies4linux/page/Main_Page"&gt;IE4linux&lt;/a&gt; project, but unfortunately the JavaScript-error-pop-up does not seem to work on my box. I am afraid I have to use a real Windows-installation for debugging this.&lt;br /&gt;&lt;br /&gt;So what is the JavaScript suppose to provide in the interface? It enables the usage of the &lt;i&gt;graphical&lt;/i&gt; view and the &lt;i&gt;merged&lt;/i&gt; view. Without JavaScript the interface can still be used, but only through the &lt;i&gt;text&lt;/i&gt; view. After the graphical view is enabled, the engine of &lt;a href="http://script.aculo.us/"&gt;Scriptaculous&lt;/a&gt; makes it possible to drag the keyboard to any position on the screen. I can recommend this library to anyone who wants to add nice animations to their website, it is easy to use and seems to work quite well. &lt;a href="http://script.aculo.us/"&gt;Scriptaculous&lt;/a&gt; builds upon the &lt;a href="http://www.prototypejs.org/"&gt;Prototype&lt;/a&gt; library which extends the objects of JavaScript with several handy properties. I have used some elements of &lt;a href="http://www.prototypejs.org/"&gt;Prototype&lt;/a&gt; in my own code as well, it is just to handy to ignore.&lt;br /&gt;&lt;br /&gt;When the effects of the keyboard where finished, I started to search for a way to display mathematics and logic without to much effort. During my search I stumbled upon a library called &lt;a href="http://www.math.union.edu/~dpvc/jsMath/"&gt;jsMath&lt;/a&gt; which is capable of turning LaTeX-code into nice HTML. Even though the library is rather big, the fonts take up about 5MB, it is pretty easy to use. You can simple pass some LaTeX-code to a function which transforms it into HTML that can be shown in a normal website. The library seems to support most of the mathematical notation of LaTex, so I can at least use it for fractions, equations and logic. &lt;br /&gt;&lt;br /&gt;The usage of jsMath is easy and attractive, but forcing a student to enter LaTeX-code is not my idea of a friendly user-interface. A normal Dutch student can understand the expression &lt;i&gt;2 / (3 * 5)&lt;/i&gt;, but when it is written like &lt;i&gt;\frac{2}{3 \times 5}&lt;/i&gt; it becomes harder to understand. So in order to allow a student to enter the expression in a normal notation, and view it in a nice graphical notation, I wanted to transform the first notation into the second one.&lt;br /&gt;&lt;br /&gt;A (very naive) first approach involved splitting the string on the operators and putting the parts back together with the right notation. This works for very simple expression, but as soon as you want to have priorities and parenthesis it breaks. So the second approach needed to involve some kind of parsing. &lt;br /&gt;&lt;br /&gt;It probably does not come as a surprise that finding a parser-generator for JavaScript is quit hard. There are some people that want it, but nobody which actually wrote one. The only thing I found was an example of an &lt;a href="http://www.codeproject.com/jscript/jsexpressioneval.asp"&gt;expression evaluator&lt;/a&gt; in JavaScript. This project has the elements that I want, but it has too much operators and fancy bits to be of immediate use in my project. Furthermore, it evaluates the expression, I want it to print LaTeX.&lt;br /&gt;&lt;br /&gt;Even though I could not use the expression evaluator in the project, it served as a pretty good reference for the implementation of a more generic &lt;a href="https://svn.cs.uu.nl:12443/repos/rfg/gui/trunk/frontend/scripts/common/tokenizer.js"&gt;tokenizer &lt;/a&gt; and &lt;a href="https://svn.cs.uu.nl:12443/repos/rfg/gui/trunk/frontend/scripts/common/parser.js"&gt;parser&lt;/a&gt;.  &lt;br /&gt;This generic code makes it easier to instantiate a parser for a specific domain, you only have to give information about operators and literals. Just like the expression evaluator it tokenizes the input string, after which it uses the &lt;a href="http://en.wikipedia.org/wiki/Shunting_yard_algorithm"&gt;shunting yard&lt;/a&gt; algorithm to transform the expression into an AST. &lt;br /&gt;In this case the AST consists of objects holding other objects, which are clones of main objects. The objects need to be cloned to prevent infinite recursion to occur when the AST is printed (yes, something I found out the hard way).&lt;br /&gt;I haven't had time to turn it into a library with a website, documentation and comments in the code, this is probably something for the future. However, I did have time to develop some &lt;a href="http://ideas.cs.uu.nl/~eric/frontend/scripts/"&gt;tests&lt;/a&gt; for the code, long live &lt;a href="http://www.jsunit.net/"&gt;jsUnit&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;Another functionality that is currently available are the buttons on the keyboard. They work by adding text-snippets to the input field, so in theory you can enter an expression by only using the virtual keyboard. It took some time to figure out how to work with the &lt;a href="http://parentnode.org/javascript/working-with-the-cursor-position/"&gt;Caret position&lt;/a&gt;, but  after combining several JavaScript-snippets it seems to work well.&lt;br /&gt;&lt;br /&gt;After reading all this you might wonder whether the GUI is done. The answer is no, there are still many things that can be done! First of all, the functionality needs to be debugged for IE and Safari. Second, when the text-view is hidden the keyboard does not function well. Third, using AJAX should make the updates go smoother. Lastly, it would be nice to be able to point to a place in the graphical view and place the caret at that position on the text-view. The first three todo's are definitely needed before the interface can be used for testing, the last one is a nice thing to have. &lt;br /&gt;&lt;br /&gt;However, the real thing needed for testing the framework is .... the framework! It has been interesting to work on the interface with JavaScript and all, but it is not the core of my thesis. Therefore, the GUI is set aside. On to coding the framework!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-6057410389584156995?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/6057410389584156995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=6057410389584156995' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/6057410389584156995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/6057410389584156995'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/04/doing-it-with-javascript.html' title='Doing it with javascript'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-9144288004840835761</id><published>2007-04-15T17:15:00.000+02:00</published><updated>2007-04-16T10:50:15.216+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>The third phase</title><content type='html'>In the beginning of this week I wrote down a description of the third phase of feedback generation. This phase has access to the previous term (PT), the current term (CT) and a set of rewrite rules. The rules describe valid actions on the domain, for example the adding of two fractions:&lt;pre&gt;A/B  + C/B -&gt; (A+C)/B.&lt;/pre&gt; In the case that the PT is &lt;b&gt;1/3 + 1/3&lt;/b&gt;, the CT obtained after application is &lt;b&gt;2/3&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;So if this is the input, what is the output? You guessed (or &lt;a href="http://ericbouwers.blogspot.com/2007/02/phases-in-rewriting.html"&gt;read&lt;/a&gt;) it, a feedback-message! This feedback-message is supposed to contain more information then '&lt;i&gt;this is incorrect&lt;/i&gt;', but it can only use the CT, the PT and the allowed rules. Furthermore, the algorithm is assumed to only start when a mistake has been made.&lt;br /&gt;&lt;h2&gt;A first try&lt;/h2&gt;When we know that a mistake has been made, we also know that there is no path of rule-application which leads from the PT to the CT, otherwise there is a rule which is not valid. In order to get a path between the two terms we introduce a magic rule &lt;u&gt;R&lt;/u&gt; which exactly encodes the rewrite between the PT and the CT. In the case that the PT is &lt;b&gt;1/3 + 1/5&lt;/b&gt; and the CT is &lt;b&gt;3/15&lt;/b&gt;, we have the following &lt;u&gt;R&lt;/u&gt; in which A != B != C != D: &lt;pre&gt;A/B + A/D -&gt; B/C&lt;/pre&gt;Now lets assume that we have the following (conditional) rewrite-rules:&lt;pre&gt;(1) A1/B1 + C1/B1 -&gt; (A1 + C1)/B1  &lt;br /&gt;(2) A2/B2 + C2/D2 -&gt; (A2*D2)/(B2*D2) + (C2*B2)/(D2*B2)&lt;br /&gt;(3) A3/B3 + C3/D3 -&gt; ((A3*N) + C3)/D3 where N = D3/B3&lt;br /&gt;&lt;/pre&gt;Given this set, our task becomes to identify the rewrite-rule which the student wanted to apply, but in which he made a mistake. This can be translated into finding the allowed rule which is most similar to the &lt;u&gt;R&lt;/u&gt;. We can use some form of &lt;a href="http://www.google.com/search?q=tree+edit+distance"&gt;tree-edit distance&lt;/a&gt; for this problem, since the rules actually represent a structured action. &lt;br /&gt;&lt;br /&gt;There exists many different tree-edit distance algorithms, for this algorithm we can use a rather simple one. When we encounter two intermediate or leaves nodes which cannot be matched we replace the one with the other. This operation costs 2, one node is deleted and one node is added. When we encounter a leave node which needs to be matched against an intermediate node we check whether the leaf node is a free variable. A variable is free if there is no previous match and the variable is not subject of any restrictions. When the variable is free we simply match it against the sub-tree, otherwise we replace the variable with the sub-tree which costs &lt;i&gt;1 + size(inserted-tree)&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;To illustrate the distance we calculate the difference between (1) and &lt;u&gt;R&lt;/u&gt;. Within the LHS we need to replace &lt;i&gt;B1&lt;/i&gt; with &lt;i&gt;B&lt;/i&gt; which costs us 2. The rest of the variables can be matched against each other (so A = A!, etc). Within the RHS we need to replace &lt;i&gt;A1+C1&lt;/i&gt; with &lt;i&gt;B&lt;/i&gt; which costs 3 + 1 = 4. This replacement needs to be done because &lt;i&gt;B&lt;/i&gt; is already matched against &lt;i&gt;B2&lt;/i&gt; in the LHS. The last step is to replace the &lt;i&gt;B1&lt;/i&gt; with &lt;i&gt;C&lt;/i&gt; in the RHS which costs 2. This has to be done because we already matched &lt;i&gt;B1&lt;/i&gt; to &lt;i&gt;B&lt;/i&gt; in the LHS, and we know that B != C. This results in a total distance between &lt;u&gt;R&lt;/u&gt; and (1) of 8. If we perform the same algorithm for the other rules we end up with distance(&lt;u&gt;R&lt;/u&gt;,(2)) = 16, and distance(&lt;u&gt;R&lt;/u&gt;,(3)) = 8.&lt;br /&gt;Even though (1) and (3) have a similar score, we end up with rule (3) as our guess. This is because rule (1) cannot be applied to the PT, so it is more unlikely that this was the intention of the student.&lt;br /&gt;&lt;br /&gt;Unfortunately, we are not done yet because the student could have taken a correct step before making a mistake. To model this we calculate a new set of PT's by applying the rules where possible. This results in two new PT's, PT1' = &lt;b&gt;(1*5)/(3*5) + (1*3)/(5*3)&lt;/b&gt; and PT2' = &lt;b&gt;((1*5)+1)/5&lt;/b&gt;. Calculating the rules &lt;u&gt;R1&lt;/u&gt;, &lt;u&gt;R2&lt;/u&gt; and all the distances we get six new distances. None of these distances is smaller then the distance of 8 we already have (the proof of this claim is left as an exercise for the reader), therefore we stop the recursion and return a feedback-message containing the rule (3) as a guess.&lt;br /&gt;&lt;br /&gt;Although I knew we needed to tests this algorithm more thoroughly, it seemed to be correct to me. However, the assumption that the recursion can be stopped when there is no distance &lt;= the lowest distance up until now can not be made out of the blue. This has to do with &lt;a href="http://en.wikipedia.org/wiki/Confluence_%28term_rewriting%29"&gt;confluence&lt;/a&gt;, a property that is not guaranteed for the set of rewrite-rules. Sigh, just when I thought that I had a fitting key for the lock, I could not turn it to unlock the door.&lt;br /&gt;&lt;h2&gt;Getting the facts&lt;/h2&gt;The concept of confluence came up Thursday and I have been trying to get around it until today. A first thing that I did was sum up some properties about the scope of the problem.&lt;ul&gt;&lt;li&gt;The terms are rather small (100 nodes or less)&lt;/li&gt;&lt;li&gt;There are few steps between the start and the answer (15 or less)&lt;/li&gt;&lt;li&gt;All rules are applied with a reason&lt;/li&gt;&lt;/ul&gt; The first two assumptions follow from the fact that teachers want students to practice the same routine with many different situations. The last one comes from the fact that students for example know that the denominator and the enumerator of a fraction may be multiplied by the same digit, but they do not do this at random. Such rules always have a context in which they are used. Therefore we can assume that the allowed rules &lt;i&gt;always&lt;/i&gt; rewrite a term towards an answer.&lt;br /&gt;&lt;br /&gt;With these assumptions in mind I noticed that the domain of fractions has only a few allowed rules. The same holds for the domain of equations and the domain of rewriting logic formulas to CNF, there are only 6 allowed rules for this last domain! Even if we combine rewrite-rules, by unifying the RHS of a rule with the LHS of another rule, we only get 9 rules for the domain of logic. These are not the kind of figures a computer cannot handle within a few milliseconds.  &lt;br /&gt;&lt;br /&gt;When we introduce new rules by unification this can be viewed as applying the rules after each other on the same (part of the) term. For example, if we unify the rules (2) and (1) from above we get:&lt;pre&gt;1.2 A2/B2 + C2/D2 -&gt; (A1+C1)/B1 &lt;br /&gt;        where B1 = B2*D2, A1 = A2*D2&lt;br /&gt;            , C1 = C2*B , B1 = D2*B2&lt;/pre&gt; If we perform the same algorithm as above, this rule surfaces as the result with a distance of only 4. The only right thing to do now is to return both rules (1) and (2) as a result. We cannot deduce which of the two rules went wrong, but we know that the error is somewhere along this path. &lt;br /&gt;&lt;br /&gt;If we compare this with the first result of the algorithm we see that it is completely different. However, if we look at the example we see that it is indeed more likely that the student wanted to apply the rules (1) and (2). A guess which complies more with my intuition because of the matching denominators in the answer. Furthermore, this adapted version of the algorithm also work on the other examples that I tried, even the ones for the domain of rewriting logic!  &lt;br /&gt;&lt;h2&gt;The solution?&lt;/h2&gt;Now that the improved algorithm seems to work it would be nice if we can prove the claim 'we can stop when the distance becomes greater'. We can view the path between the PT and the CT as a sequence of allowed rule application in which there is an error. This error can be anywhere on the path. So is &lt;i&gt;i&lt;/i&gt; is an allowed rule, we have something like &lt;i&gt;i&lt;sub&gt;n &lt;/sub&gt;..i&lt;sub&gt;m&lt;/sub&gt; . error . i&lt;sub&gt;k &lt;/sub&gt;..i&lt;sub&gt;j&lt;/sub&gt;&lt;/i&gt;. The recursion in the algorithm strips of the first set of rules, so we end up with &lt;i&gt;error . i&lt;sub&gt;k &lt;/sub&gt;..i&lt;sub&gt;j&lt;/sub&gt;&lt;/i&gt;. &lt;br /&gt;Because we assume that all rules rewrite the term towards an answer we argue that stripping of allowed rules results in a smaller distance. When we 'jump over' the error the distance becomes bigger because we get strange &lt;u&gt;R&lt;/u&gt;'s which do not look like an allowed rewrite rule at all, otherwise we could have stripped of another rule.&lt;br /&gt;&lt;br /&gt;When we combine this reasoning with the fact that we only have a small sequence of steps, I believe that this algorithm will at least give better feedback in many practical situations. Whenever it is not possible to make a good guess we can always fall back to a message like: &lt;i&gt;'We do not know what you did, can you try to do it in smaller steps?'&lt;/i&gt;. I don't see a problem here because the tools are focused on practicing a task in small steps. Now lets see what my supervisor thinks of it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-9144288004840835761?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/9144288004840835761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=9144288004840835761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/9144288004840835761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/9144288004840835761'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/04/third-phase.html' title='The third phase'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-2560454953227834285</id><published>2007-04-10T20:00:00.000+02:00</published><updated>2007-04-10T21:38:10.325+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Thinking of Merging</title><content type='html'>I have been dealing with some challenges in the last couple of days. For example my &lt;a href="http://www.cs.uu.nl/docs/vakken/dba/exercise.htm"&gt;practical assignment&lt;/a&gt; for DBA, to be implemented in &lt;a href="http://citeseer.ist.psu.edu/boncz99mil.html"&gt;MIL&lt;/a&gt;, and styling the &lt;a href="http://ideas.cs.uu.nl/wiki/index.php/RFG:GuiDesign"&gt;GUI&lt;/a&gt; for my thesis, which is coming along just &lt;a href="http://ideas.cs.uu.nl/~eric/frontend/"&gt;fine&lt;/a&gt; I guess. Both of these tasks are easy for people who invented/work with it every day, but I sometimes find it hard to wrap my mind around the problem or keeping track of every detail. Good luck for me there exists a topic where I can work on without repeatedly searching on Google, analyzing PHP!  &lt;br /&gt;&lt;br /&gt;Speaking of analyzing PHP, Martin has written a &lt;a href="http://mbravenboer.blogspot.com/2007/04/migration-of-yacc-grammar-for-php-to.html"&gt;blog&lt;/a&gt; about the generation of rules for operator-precedence in PHP. He mentions some interesting ideas for work on grammar engineering, so if you are looking for a (thesis)-project you should definitely check it out. Otherwise it is just an interesting post to read.&lt;br /&gt;&lt;br /&gt;As for my work in operators in PHP, I have finished the rest of the operators in PHP-Sat. Furthermore, the implementation of the constant-propagation regarding operators is revised within PHP-Front. This is done because I am thinking about merging the constant-propagation and the safety-type analysis into one big analysis. I know, it sounds like &lt;a href="http://www.google.com/search?q=premature+optimization"&gt;premature optimization&lt;/a&gt; (a.k.a. the root of all evil), but I can explain why it is necessary.&lt;br /&gt;&lt;br /&gt;Consider the following piece of code:&lt;pre&gt;&amp;nbsp;&amp;nbsp;$foo = array(1,2);&lt;br /&gt;&amp;nbsp;&amp;nbsp;$foo[] = $_GET['bar'];&lt;br /&gt;&amp;nbsp;&amp;nbsp;echo $foo[2];&lt;/pre&gt; When we consider the constant-propagation we first assign the values &lt;i&gt;1&lt;/i&gt; and &lt;i&gt;2&lt;/i&gt; to the first two indexes of the array. The value of &lt;i&gt;$_GET['foo']&lt;/i&gt; is then assigned to the third index of the array which is the parameter to &lt;i&gt;echo&lt;/i&gt; in the last statement. We know that the value is assigned to the third index because PHP-Front keeps track of the internal index-count of arrays. &lt;br /&gt;Now lets look at the safety-type analysis. We first assign the safety-type &lt;i&gt;IntegerType&lt;/i&gt; to the first two indexes of the array. The safety-type of &lt;i&gt;$_GET['foo']&lt;/i&gt; is then assigned to the third index of the array which is the parameter to &lt;i&gt;echo&lt;/i&gt; in the last statement. We know that the safety-type is assigned to the third index because PHP-Sat keeps track of the internal index-count of arrays. &lt;br /&gt;&lt;br /&gt;You might have noticed that both paragraphs are almost identical, except for the kind of value that is assigned. Thinking about this case, cases for function calls and cases for objects it turns out that performing the safety-analysis involves a lot of bookkeeping. This bookkeeping, for example the internal index-count, is not specific for the propagated values, it encodes the internal semantics of PHP. Therefore, in order to provide a good safety-type analysis, we have to embed this bookkeeping. &lt;br /&gt;&lt;br /&gt;In order to avoid code duplication, which might be worse then premature optimization, I believe we must merge the two analyzes together. By separating the assignment of values from the bookkeeping we can visit a node, perform the bookkeeping and then perform as much analyzes on the node as we want. The only thing needed is a list of strategies that encodes a single analysis on the node.&lt;br /&gt;&lt;br /&gt;The idea might sound a bit vague, but while I was working on the operators I already saw some duplication creeping in. Some of the strategies for both analysis only differ on the strategies to &lt;i&gt;fetch&lt;/i&gt; or &lt;i&gt;add&lt;/i&gt; some value, a perfect change to generalize a bit I would say.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-2560454953227834285?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/2560454953227834285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=2560454953227834285' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2560454953227834285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2560454953227834285'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/04/thinking-of-merging.html' title='Thinking of Merging'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-2491686785542763826</id><published>2007-03-29T21:30:00.000+02:00</published><updated>2007-03-30T09:00:34.297+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>The operator type</title><content type='html'>My first intention was to name this entry after one of &lt;a href="http://www.everything2.com/index.pl?node_id=697434"&gt;these&lt;/a&gt; &lt;a href="http://www.anvari.org/fortune/Quotations_Laws/498.html"&gt;quotes&lt;/a&gt; about assumptions, because in the past week I found out (again) that they are totally correct.&lt;br /&gt;&lt;br /&gt;Last Sunday I started to work on typing the operators of PHP. My first attempt was really basic, simply follow the documentation and everything will be alright. So I started with the &lt;a href="http://www.php.net/manual/en/language.operators.arithmetic.php"&gt;arithmetic&lt;/a&gt; operators '+','-' and '*'. They all act the same on the type level in the sense that the result is always integer, unless there is a float involved. The next operator in line was division ('/') which always returns an float (according to the documentation). I finished off with the modulus operator which behavior turns out to be ...... not documented.&lt;br /&gt;&lt;br /&gt;Since I want PHP-Sat to follow the semantics of PHP I needed to know the exact semantic of this operator in PHP. Naturally this is not hard to figure out because we simply run PHP on some test-data and use the function &lt;a href="http://www.php.net/manual/en/function.gettype.php"&gt;gettype&lt;/a&gt;. I wrote a little script with some lines like: &lt;pre&gt;...&lt;br /&gt;echo "Type of 5/2 = ", gettype(5/2), "&amp;lt;br /&gt;";&lt;br /&gt;...&lt;/pre&gt;which is not only tedious, but also a complete violation of the &lt;a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself"&gt;DRY&lt;/a&gt; principle.&lt;br /&gt;&lt;br /&gt;In order to comply with DRY I turned to the &lt;a href="http://www.php.net/eval"&gt;eval&lt;/a&gt; function of PHP. This function evaluates a string as PHP code and can actually return the result of a its computation! I used this function within a loop to dynamically calculate the result of applying an operator to different types. You can find the complete script &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-sat/trunk/tests/bugpatterns/mcv/operators-type-test.php"&gt;here&lt;/a&gt;, but I will show the critical part here:&lt;pre&gt;foreach($types2 as $key2 =&gt; $val2){&lt;br /&gt;    $code   = 'return ' . $val1 .' '.$op.' '.$val2. ';' ;&lt;br /&gt;    $result = eval($code);&lt;br /&gt;&lt;br /&gt;    echo '&lt;td&gt;'. gettype($result) . ' (' . showval($result)  . ') &lt;/td&gt;';     &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The foreach-loop resides within another foreach-loop looping through a copy of the array $types2. This gives us access to two different types and the current operator. These are combined within a string which is executed. We then extract the type and the result of the execution and display it. &lt;br /&gt;&lt;br /&gt;Basically you just simply pass an array with types and a operator to the function and it will output the type and result of all possible combinations. I put the output of this script &lt;a href="http://soc.bouwers.info/operatortypes.html"&gt;here&lt;/a&gt;, you can find the types and values that I used before the actual result. The first few sections contain most of the unary operators, the binary operators are organized in tables. Within the tables each row contains the first value given to the operator, each column is the second value. I apologize for for the ugly formatting, just trying to be a &lt;a href="http://blog.outer-court.com/archive/2005-08-24-n14.html"&gt; good programmer&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It was now a trivial task to read type(s) of the modulus operator from the table and be amazed. The result type is almost always an integer, but it can an also be a boolean type! This comes from the fact that whenever the RHS is a '0'-value the modulus cannot be calculated. Where other languages would simply halt execution, PHP returns a 'false'-value and issues a warning. This is also the case for division and is now also handled correctly in PHP-Sat.&lt;br /&gt;&lt;br /&gt;You might wonder why I have chosen to test all of the operators instead of just the modulus. The first reason for this is that I could simply not resist the temptation, it was just to easy to add all the operators. The second reason was that the first run of the script also involved the testing of the division operator. According to the documentation it always always return a float, but the table tells us that it return either a float, a boolean or an integer! I might be able to see that the boolean return-value is not documented, it is almost certainly a mistake to divide by zero, but the documentation specifically states that division &lt;i&gt;never&lt;/i&gt; returns an integer! Luckily (yes I believe it is a good thing), this problem is already &lt;a href="http://bugs.php.net/bug.php?id=39703"&gt;mentioned&lt;/a&gt; by someone else and I hope it will be fixed before the year ends.&lt;br /&gt;&lt;br /&gt;Back to PHP-Sat, the todo-list regarding operators has been heavily shortened. The only ones left are the &lt;a href="http://nl3.php.net/manual/en/language.operators.assignment.php"&gt;assignment&lt;/a&gt;- and &lt;a href="http://www.php.net/manual/en/language.operators.string.php"&gt;string&lt;/a&gt;-operators. The first group involve some dynamic rules which I want to implement when I am in a more awakened  state-of-mind. For the second group I still have to figure out which safety-type is to be assigned when the safety-type of both side differ. I currently believe it should be the lowest safety-type, but please feel free to provide me with a counter-example that shows that this belief is wrong.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-2491686785542763826?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/2491686785542763826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=2491686785542763826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2491686785542763826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2491686785542763826'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/03/operator-type.html' title='The operator type'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-1977139273489552407</id><published>2007-03-21T14:20:00.000+01:00</published><updated>2007-03-21T15:54:14.156+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>Interfacing Feedback</title><content type='html'>My framework for feedback generation does not need a nice graphical user-interface. The input is simply a set of strings (current term, previous term and maybe some file names), and the output is also a string (the generated message). Since I am perfectly capable of using a command-line interface, why should I spend time on designing a fancy interface?&lt;br /&gt;&lt;br /&gt;For one simple reason: Testing.&lt;br /&gt;&lt;br /&gt;In order to know whether the feedback that is generated can actually be of use for students I am going to test the tools on real-life persons! This will not only give me a change to get out the lab and mingle with normal people, it will also provide useful feedback about the usability of the generated feedback. I intend to test the tools on students and teachers in a normal school setting, something which will probably result in nice anecdotes of system crashes, hanging computations and incomprehensible error-messages. Definitely something to look forward to :)&lt;br /&gt;&lt;br /&gt;I thought that the easiest way of making sure that the tools can be tested everywhere is by providing a web-interface. No problems with installation or configuration, simply fire up the browser and lets start the fun. &lt;br /&gt;&lt;br /&gt;Unfortunately, the choice for a web-application raises some other problems like different interpretations of web-standards and dealing with response time.  &lt;br /&gt;The first issue is a matter of using the standards and applying some hacks here and there. The last issue is (hopefully) solved by making use of &lt;a href="http://en.wikipedia.org/wiki/AJAX"&gt;AJAX&lt;/a&gt; (yes, my thesis is buzzword compliant). I haven't had the pleasure of programming with this technique so this is a nice opportunity. &lt;br /&gt;&lt;br /&gt;A different issue with the design of a graphical interface is more personal. I am not that great in designing user interfaces. Most of the GUI's I have designed have the same design or are only input-output fields. It is not that &lt;a href="http://www.ok-cancel.com/strips/okcancel20031010.gif"&gt;this&lt;/a&gt; describes my GUI's, but I will probably not bring home any awards either. This is definitely something I want to learn.&lt;br /&gt;&lt;br /&gt;Fortunately I love a challenge, so I intend to make a high-quality web-interface for my feedback generation framework. I have read several papers and books and I think that my &lt;a href="http://ideas.cs.uu.nl/wiki/index.php/RFG:GuiDesign"&gt;current design&lt;/a&gt; is (theoretically) pretty good. It is rather minimalistic, gives visual indications for different zones and allows the users to adapt it to their personal taste.  &lt;br /&gt;&lt;br /&gt;Please feel free to comment on the design. After all, feedback is critical for learning ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-1977139273489552407?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/1977139273489552407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=1977139273489552407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1977139273489552407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1977139273489552407'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/03/interfacing-feedback.html' title='Interfacing Feedback'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-1678885814164933693</id><published>2007-03-14T09:43:00.000+01:00</published><updated>2007-03-14T10:33:35.285+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Summer of Code'/><title type='text'>Summer of Code 2007</title><content type='html'>For those of you who are unaware of the occasion, today is the day that students can start sending in their applications for the &lt;a href="http://code.google.com/soc/"&gt;Summer of Code 2007&lt;/a&gt;! &lt;br /&gt;&lt;br /&gt;Another change for students to work on open-source solutions, get a t-shirt, gain experience in working with larger projects, get a t-shirt, and to get paid for doing this!&lt;br /&gt; &lt;br /&gt;Oh yeah, did I mention you also get a cool T-shirt? &lt;br /&gt;&lt;br /&gt;Unfortunately, I will not be able to join this year because of an other world-wide &lt;a href="http://eng.thejamboree.org/"&gt;event&lt;/a&gt;, so your changes of getting accepted have just been increased :)  &lt;br /&gt;This year I will just try to promote the Summer of Code because I think it is a wonder full chance to do something useful and interesting.&lt;br /&gt;&lt;br /&gt;And what better way to spread the word then with some flyer's! We (that is me and my girlfriend) have translated the flyer to &lt;a href="http://soc.bouwers.info/summercode_flyer_07_DUTCH.pdf"&gt;Dutch&lt;/a&gt;, but it is also available in &lt;a href="http://code.google.com/p/google-summer-of-code/wiki/GsocFlyers"&gt;other languages&lt;/a&gt;.  &lt;br /&gt;Please mail/print/fax these to everyone who might or should be interested!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-1678885814164933693?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/1678885814164933693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=1678885814164933693' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1678885814164933693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1678885814164933693'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/03/summer-of-code-2007.html' title='Summer of Code 2007'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-1788202364227168204</id><published>2007-03-12T20:37:00.000+01:00</published><updated>2007-03-13T12:21:00.839+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='Grammar Engineering Tools'/><title type='text'>Taking precedence</title><content type='html'>It has finally been done, PHP-Front has perfect operator precedence! &lt;br /&gt;&lt;br /&gt;And why can this be written down as a fact? Because of the work of &lt;a href="http://mbravenboer.blogspot.com/"&gt;Martin&lt;/a&gt;! He has worked on the &lt;a href="http://www.program-transformation.org/Stratego/GrammarEngineeringTools"&gt;grammar-engineering-tools&lt;/a&gt; tool for generating SDF priorities. When I worked on them I ran into some problems because of the decisions that where made during the initial development (read: when the tools had to be finished yesterday). This resulted in a common format for PHP precedence rules that was neither YACC-like nor SDF-like. Martin has rewritten the tools to use most of SDF representation and this worked very good according to &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-55"&gt;all&lt;/a&gt; &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-49"&gt;the&lt;/a&gt; &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-58"&gt;solved&lt;/a&gt; &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-53"&gt;issues&lt;/a&gt;. The operator precedence is &lt;a href="http://mail.cs.uu.nl/pipermail/psat-commits/2007q1/000911.html"&gt;now&lt;/a&gt; encoded into PHP-Front as separate modules for both &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-front/trunk/src/grammar/languages/php/version4/Precedence.sdf"&gt;version 4&lt;/a&gt; and &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-front/trunk/src/grammar/languages/php/version5/Precedence.sdf"&gt;version 5&lt;/a&gt;, both of them over 6k LOC. &lt;br /&gt;&lt;br /&gt;The (technical) details about how these files are generated will probably make a long and interesting blog-post. Since Martin &lt;a href="http://mbravenboer.blogspot.com/2007/02/informal-specifications-are-not-so.html"&gt;says&lt;/a&gt; it is hard to find such a subject, not to mention (again) that it is his work, who am I to take this subject away from him? Maybe he can find some time after preparing the LDTA-presentation for Thursday. I won't be able to make it, but if you are close to Delft you might want to sneak into the &lt;a href="http://swerl.tudelft.nl/bin/view/Main/ResearchColloquium"&gt;Research Colloqium&lt;/a&gt;. (If you do, please tape it!)&lt;br /&gt;&lt;br /&gt;Besides bringing perfect precedence to PHP-Front, this work has also resulted in a new &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-94?page=comments#action_11824"&gt;issue&lt;/a&gt;. It was not very hard to figure it out, I just misinterpreted the note in the &lt;a href="http://nl3.php.net/manual/en/language.operators.arithmetic.php"&gt;documentation&lt;/a&gt;. So I immediately &lt;a href="http://mail.cs.uu.nl/pipermail/psat-commits/2007q1/000960.html"&gt;fixed&lt;/a&gt; it by removing a special case which did not have to exist, just to put the icing on the cake.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-1788202364227168204?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/1788202364227168204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=1788202364227168204' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1788202364227168204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/1788202364227168204'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/03/taking-precedence.html' title='Taking precedence'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-2381154640066957404</id><published>2007-03-03T09:35:00.000+01:00</published><updated>2007-03-03T09:57:03.331+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>Downs and ups</title><content type='html'>Some weeks are filled with good things, others with bad things. For me, the last week was filled with both. My parents celebrated there 30th wedding anniversary, my little brother turned 21 and my last remaining grandmother passed away. You can probably figure out yourself which ones are good and which one is bad. &lt;br /&gt;&lt;br /&gt;So the schedule of this week was a bit out of balance because of these events. However, I still managed to get some work done. The analysis for constant-propagation and the one for the safety-levels now share the same structure. This will make it easier to generalize the analysis into a more generic framework, something which will reduce code duplication. &lt;br /&gt;&lt;br /&gt;I have also finished my thesis proposal which means that I can now start the real graduation process. The official start date will be on March 5th, next Monday. This process is suppose to take 22 weeks, in this case until the 6th of August. Since there are some other &lt;a href="http://www.scouting.org/jamboree/world/index.html"&gt;events&lt;/a&gt; in between it will take some additional weeks. However, this schedule still allows me to graduate before first of September 2007, the start of the new academic year and the end of my 5th year. &lt;br /&gt;&lt;br /&gt;Unfortunately, people keep telling me that the changes on keeping this schedule are pretty slim. Each year, only 1 or 2 students manage to graduate within 5 years, the minimal amount of time for this study. A nice challenge I would say :)&lt;br /&gt;&lt;br /&gt;Oh, for those who are interested, my thesis proposal can be downloaded from &lt;a href="http://www.cs.uu.nl/wiki/Students/EricBouwersThesisPage"&gt;this page&lt;/a&gt;. Please let me know if you have any questions/comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-2381154640066957404?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/2381154640066957404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=2381154640066957404' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2381154640066957404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2381154640066957404'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/03/downs-and-ups.html' title='Downs and ups'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-4353850454234084225</id><published>2007-02-22T11:06:00.000+01:00</published><updated>2007-02-22T14:42:02.072+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>Phases in rewriting</title><content type='html'>Now that my proposal is really coming along the exact details of the approach become more clear. I already have written down all the steps of the research and implementation, the only thing I need is a green light from my supervisor. When I get this I will put a link up to the full proposal. For those that cannot wait I have written a little explanation about the functionality of my thesis. &lt;br /&gt;&lt;br /&gt;As explained &lt;a href="http://ericbouwers.blogspot.com/2007/02/thesis-subject.html"&gt;before&lt;/a&gt; the subject of the thesis is to create a generic framework that can handle the generation of rule-feedback. An essential property of any generic framework is that it can be instantiated on a particular domain. In this case the instantiation will need a &lt;b&gt;parser&lt;/b&gt; and a &lt;b&gt;solver&lt;/b&gt; for a specific domain. This is not a real surprise since these objects are always needed when a tool is constructed. Furthermore, an &lt;b&gt;equality module&lt;/b&gt; can be given to the framework. Such a module can be used to check two terms on semantic equality instead of syntactic equality. This is needed because in some cases a teacher would want to allow an answer to be either &lt;i&gt;3/2&lt;/i&gt; or &lt;i&gt;6/4&lt;/i&gt; as long as the students calculates it correctly. In other situations the answers may only consists of simplified terms, hence the equality may only succeed on the term &lt;i&gt;3/2&lt;/i&gt;. &lt;br /&gt;&lt;br /&gt;After instantiation the framework is able to generate rule-feedback for a particular domain. This generation is done in four phases, each of them requiring more information and resources. Phases that need more input are of course able to generate better feedback. Notice that they 'are able to', they do not necessarily generate better feedback. The instantiated framework will give you a change for better feedback, but the default feedback will be on the same level as current tools. Thus it is a change on a gain, never a loss.&lt;br /&gt;&lt;br /&gt;Phase zero is able to generate feedback with only the current term and the previous term. These two terms are always available since a student will have to take a step before rule-feedback can be generated. The algorithm of this phase will calculate the answer, e.g. the term a student has to supply as final result, of both terms and compare those. When these answers are equal a correct step has been taken, otherwise the student has done something wrong. The feedback generated in this phase is only 'correct' or 'incorrect' because we have no further information about the intentions of the student.&lt;br /&gt;&lt;br /&gt;Within phase one the student will supply the rule he wanted to apply. The algorithm of this phase will check whether the rule was correctly applied and whether the rule was correct. The later is easily done by using the algorithm of phase zero. When this delivers an 'incorrect' the rule was wrong. Checking for a correct application is a matter of applying the rule to the previous term and checking the result against the current term. When these are syntactically equal the rule was applied correctly.  &lt;br /&gt;The feedback in this phase can let the student know in which area he made a mistake. Either a mistake in the rule itself or in the application. This will at least be more of a help to a student then a simple 'incorrect'.&lt;br /&gt;&lt;br /&gt;The second phase needs more input from the programmer. A set of rewrite-rules defining the allowed actions of the domain will need to be defined as input. From this set the algorithms of this phase will 'guess' the rule a student wanted to apply. When an error has been made the feedback can contain hints about this rule and pointers to explanations or examples. &lt;br /&gt;&lt;br /&gt;In the third and last phase the programmer can also supply a set of 'buggy'-rules. These rewrite-rules contain patterns of common misconceptions. By finding a path between the current and previous term with the allowed and buggy-rules the algorithm of this phase can identify a mistake with a high precision. The algorithm for this is well defined by Hennecke, a short English overview can be found &lt;a href="http://www.uni-hildesheim.de/en/semu.htm"&gt;here&lt;/a&gt;. Feedback from this phase can involve a specific explanation about the mistake, maybe accompanied by an example of a correct rule.&lt;br /&gt;&lt;br /&gt;The explanation of the second phase mentions that the algorithm 'guesses' the rule. This 'guessing' is not completely worked out yet, it is actually a large part of the thesis. Algorithms for the other phases are already defined and only need to be implemented in a generic fashion. The result will be a practical implementation combined with formal research. &lt;br /&gt;Everything a master thesis needs, right?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-4353850454234084225?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/4353850454234084225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=4353850454234084225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4353850454234084225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4353850454234084225'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/02/phases-in-rewriting.html' title='Phases in rewriting'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-7327490926492312186</id><published>2007-02-18T21:20:00.000+01:00</published><updated>2007-02-18T22:48:25.617+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Results from a meeting</title><content type='html'>Last Tuesday I went to Delft for a meeting with &lt;a href="http://martin.bravenboer.name/"&gt;Martin&lt;/a&gt; after a long period of only communicating through email/IRC. Although these form of text-communication work fine a real-life meeting will make it easier to discuss things. &lt;br /&gt;&lt;br /&gt;One of the subjects of the discussion was my paper for the &lt;a href="http://martin.bravenboer.name/"&gt;STC&lt;/a&gt;. I already gave my &lt;a href="http://ericbouwers.blogspot.com/2006/11/first-presentation.html"&gt;presentation&lt;/a&gt; for this course, but finishing the paper was not an easy task for me. As you might have noticed it is quite a challenge for me to write a text in understandable English. When the text must also contain some formal definitions and clear examples the speed of my writings quickly degenerates. However, I still managed to put together a reasonable result. After we discussed which parts needed some modifications I improved the paper in the past couple of days. The result can be found at the new &lt;a href="http://www.php-sat.org/TalksAndPapers"&gt;talks-and-paper&lt;/a&gt;-page on php-sat.org. Please feel free to provide constructive feedback.&lt;br /&gt;When you followed the link you might have also seen the new page for the &lt;a href="http://www.php-sat.org/PHP/PhpTools"&gt;PHP-Tools&lt;/a&gt; package. This package is now also build within the build-farm, thank you Martin, and available for download. If you have a cool idea for a tool please let me know via the &lt;a href="https://bugs.cs.uu.nl/secure/IssueNavigator.jspa?reset=true&amp;&amp;pid=10180&amp;resolution=-1&amp;component=10282&amp;sorter/field=priority&amp;sorter/order=DESC"&gt;bug-tracker&lt;/a&gt;.  &lt;br /&gt;Other topics that we discussed will help to improve the path-strategies for file-inclusion, improving the SDF-definition for HereDoc, develop more concise error-reporting and generating the priorities for precedence from the YACC-definition. I have worked a little on all of these issues in the last two weeks, but now I have better ideas to handle the problems I ran into. &lt;br /&gt;&lt;br /&gt;A last topic of discussion was an idea I had for an algorithm to use in my thesis. This algorithm uses a set of allowed rewrite rules to ``guess'' the rule a student wanted to apply. I already wrote an example-scenario for my proposal, which is coming along great by the way, so after I reread this I will discuss it in a blog. I'll keep you posted.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-7327490926492312186?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/7327490926492312186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=7327490926492312186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7327490926492312186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/7327490926492312186'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/02/results-from-meeting.html' title='Results from a meeting'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-2862717991204263375</id><published>2007-02-10T15:39:00.000+01:00</published><updated>2007-02-05T23:25:59.596+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Including only once</title><content type='html'>This week I finally got around to the implementation of a strategy that combines constant-prorogation and some sort of type-state. It was a bit tricky to get it completely right, resulting in some very weird behavior during testing. Fortunately, the problem has been solved and the result is pretty good! &lt;br /&gt;&lt;br /&gt;So what problem does this strategy solve? In order to explain this we will first take a quick look at how constant propagation is being handled within PHP-Front (and other Stratego-libraries). &lt;br /&gt;&lt;br /&gt;When a value of a variable is known, for example when it is defined in an expression like &lt;code&gt;$foo = 5&lt;/code&gt;, PHP-Front will add a dynamic rule rewriting the variable to the known value. This dynamic rule can later be used to retrieve the value, for example in the expression &lt;code&gt;$bar = $foo+1&lt;/code&gt;. This last expression will then be rewritten to &lt;code&gt;$bar = 5+1&lt;/code&gt; which can be completely calculated again. &lt;br /&gt;&lt;br /&gt;Using dynamic rules for linear code is easy, but when code branches it becomes a little bit more complicated. Take this example code:&lt;br /&gt;&lt;code&gt; &amp;nbsp;&amp;nbsp;$foo = 'say';&lt;br /&gt;&amp;nbsp;&amp;nbsp;if($val){ &lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $bar = 'hello';&lt;br /&gt;&amp;nbsp;&amp;nbsp;} else {&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $bar = 'world'; &lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;/code&gt;&lt;br /&gt;The value of &lt;code&gt;$bar&lt;/code&gt; can not be statically determined, but we want to keep the knowledge about the variable &lt;code&gt;$foo&lt;/code&gt;. A valid way to do this is to take the intersection of the two sets of dynamic rules, the normal one and the one after evaluating the if-branch. This will keep all information about variables that are not used, or given the same value, within the branches of the &lt;code&gt;if&lt;/code&gt;. &lt;br /&gt;If you want to know more about dynamic rules and constant propagation I suggest you take a look at &lt;a href="http://www.cs.uu.nl/research/techreps/UU-CS-2005-005.html"&gt;this&lt;/a&gt; paper.&lt;br /&gt;&lt;br /&gt;Besides the information about the constant propagation we need to take a look at the inclusion mechanism of PHP. You might be aware of the fact that PHP offers both an &lt;a href="http://www.php.net/include"&gt;include&lt;/a&gt; as well as an &lt;a href="http://www.php.net/include_once"&gt;include_once&lt;/a&gt; construct. The first one will always include a file, the latter one will only include a file when it wasn't included before. &lt;br /&gt;&lt;br /&gt;Dealing with files that are always included in combination with constant propagation is rather easy. We just retrieve/parse/evaluate the file during the constant propagation. Dealing with files that are only included once is also easy with linear code, but things get tricky when branching is involved. Take this piece of code for example:&lt;code&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;if($val){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;include_once 'foo.php';&lt;br /&gt;&amp;nbsp;&amp;nbsp;} else { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//other things&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp; //some code&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;include_once 'foo.php';&lt;/code&gt;&lt;br /&gt;Within the if-branch the file &lt;code&gt;foo.php&lt;/code&gt; might be included and introduce some dynamic-rules. The code for the &lt;code&gt;if&lt;/code&gt; will handle this probably so that is not a problem. &lt;br /&gt;&lt;br /&gt;But what must we do when we arrive at the other &lt;code&gt;include_once&lt;/code&gt;-construct for the same file? Well, there are three different scenario's that can occur:&lt;ol&gt;&lt;li&gt;File has not been included&lt;/li&gt;&lt;li&gt;File might have been included&lt;/li&gt;&lt;li&gt;File is definitely included&lt;/li&gt;&lt;/ol&gt;The first and last one are easy, just include the file or not, the second one is more complicated with respect to dynamic rules. We will again have to take the intersection of the current set of dynamic rules and the set of dynamic rules after inclusion of the file. This will make sure that we only keep the rules that will be the same in both cases. &lt;br /&gt;Notice that we will have to keep track of the inclusion-state of every file. This can (and is) implemented as a state for a file, again with dynamic rules. &lt;br /&gt;&lt;br /&gt;Implementing both of these solutions with dynamic rules separately is not that difficult, there are enough sources to figure things out. However, combining these approaches is completely trivial because you will have to deal with dynamic rule-sets and all sorts of merge-strategies. Fortunately for you this is all done behind the scenes. Please enjoy the better constant propagation as of revision 332.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-2862717991204263375?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/2862717991204263375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=2862717991204263375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2862717991204263375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/2862717991204263375'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/02/including-only-once.html' title='Including only once'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-4130457456041681022</id><published>2007-02-05T23:01:00.000+01:00</published><updated>2007-02-05T23:26:00.826+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><title type='text'>Thesis subject</title><content type='html'>Working on PHP-Sat this weekend got me a response on Sunday-evening in #stratego. I was told that it was nice to see some more progress on PHP-Sat again. It's very nice to receive such feedback!&lt;br /&gt;&lt;br /&gt;What this comment also expressed is that the past month the actual progress on PHP-Sat was not really visible. I have mostly been working on the website and on the GrammarEngineeringTools. Two things that will improve PHP-Sat, but not directly.&lt;br /&gt;&lt;br /&gt;But I have to admit, there was another activity that quickly filled up my time:&lt;br /&gt;My thesis-proposal.&lt;br /&gt;&lt;br /&gt;I have mentioned &lt;a href="http://ericbouwers.blogspot.com/2006/12/whats-deal-with.html"&gt;before&lt;/a&gt; that the subject of my thesis is interesting (of course!), but didn't not explain what it is about. So here is the short version of the goal:&lt;br /&gt;&lt;i&gt;By combining techniques from the field of term-rewriting, strategies and generic programming we aim at supplying a generic framework that supports the generation of rule-feedback with minimal effort.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;After reading this, the first question would probably be &lt;i&gt;'what is rule-feedback?'&lt;/i&gt;&lt;br /&gt;Well, imagine a tool that allows you to solve a mathematical exercise such as:&lt;br /&gt;  &lt;b&gt;1/2 + 2*(4/5)&lt;/b&gt;&lt;br /&gt;by rewriting the expression in little steps. So the first rewrite would evaluate the multiplication which result in:&lt;br /&gt;  &lt;b&gt;1/2+8/5&lt;/b&gt;.&lt;br /&gt;The second rewrite will perform the addition and will lead to the answer of:&lt;br /&gt;  &lt;b&gt;21/10&lt;/b&gt;.&lt;br /&gt;(Notice that the rules I applied here are actually a set of combined rules, adding two fractions with different denominator takes more then one step.)&lt;br /&gt;&lt;br /&gt;When the application of a rule is incorrect, for example the answer &lt;b&gt;9/5&lt;/b&gt; for the expression above, feedback will need to be provided. Useful feedback would help a student to understand the mistake that has been made. In this case it could be something like:&lt;br /&gt;&lt;i&gt;You have added two fractions without considering the denominators. Remember that fractions can only be added when the denominators are equal!&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I have done quite a bit of research on the feedback that is currently given in educational tools. The conclusion is that it can definitely be improved and certainly needs to be made easier to define. By supplying a generic framework the task of implementing a complete tool is simplified into the specification of the domain. &lt;br /&gt;&lt;br /&gt;How this specification can be done, and more details on how the generation of feedback will work, will be explained in some later blogs. I just wanted to let you know what I was doing all day :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-4130457456041681022?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/4130457456041681022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=4130457456041681022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4130457456041681022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/4130457456041681022'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/02/thesis-subject.html' title='Thesis subject'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-5195392682336443671</id><published>2007-01-29T10:45:00.000+01:00</published><updated>2007-01-29T10:53:51.160+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><title type='text'>Visiting Dublin</title><content type='html'>My girlfriend and I went to Dublin this weekend and we had a great time. We flew with &lt;a href="http://www.aerlingus.com"&gt;Aer Lingus&lt;/a&gt; and stayed at the &lt;a href="http://www.isaacs.ie/jacobs_inn/index.htm"&gt;Jacobs inn&lt;/a&gt;. This hostel really relaxed and I can certainly recommend it to anyone who just wants to sleep low budget. We basically did some sightseeing and walked around town. On Saturday we went to &lt;a href="http://www.radiocitydublin.com/ "&gt;Radio City Dublin&lt;/a&gt; to see the &lt;a href="http://www.heideroosjes.com"&gt;Heideroosjes&lt;/a&gt;, the coolest punk-band I know. &lt;br /&gt;&lt;br /&gt;Radio City is a cozy basement with a bar, a stage and room for about 200 people. It looks professional, but they could improve the information flow about who is going to play when. When we asked which bands played that evening it took about 10 minutes and 4 people to tell us that they didn't have a clue. It all worked out fine though. Seeing the Heideroosjes in a place with only 20 people, half of them Dutch, was a bit weird, but they definitely rocked! We plan to see them again in the &lt;a href="http://www.melkweg.nl/"&gt;Melkweg&lt;/a&gt; on the 16th of March, hopefully with a bigger crowd :) &lt;br /&gt;&lt;br /&gt;The weekend in Dublin has given me some time to think about the things I want to do this year. I have made up a little list of the most important things that I want to pursuit this year, a kind of (very late) &lt;a href="http://en.wikipedia.org/wiki/New_Year's_resolution"&gt;New Year's Resolutions&lt;/a&gt;:&lt;ul&gt;&lt;li&gt;Finishing my &lt;a href="http://www.cs.uu.nl/wiki/Students/EricBouwersThesisPage"&gt;Master Thesis&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Getting a fun job&lt;/li&gt;&lt;li&gt;Improving/promoting PHP-Sat&lt;/li&gt;&lt;li&gt;Having an awesome &lt;a href="http://www.scouting.org/jamboree/world/index.html"&gt;World Jamboree&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Climbing a grade 6a-route&lt;/li&gt;&lt;/ul&gt; &lt;br /&gt;These goals are not very surprising, but they require some shift in my priorities. Let's see if I can be part of the 46% that keeps such resolutions after 6 month. I personally think that the last one will be the hardest one to keep :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-5195392682336443671?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/5195392682336443671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=5195392682336443671' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5195392682336443671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5195392682336443671'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/01/visiting-dublin.html' title='Visiting Dublin'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-6601094844880276612</id><published>2007-01-24T22:17:00.000+01:00</published><updated>2007-01-24T22:54:25.679+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>PHP-Sat.org finished</title><content type='html'>It took me a ((very) long) time, but I finally finished all the texts for PHP-Sat.org. It is always a challenge to think of the right subjects and placement of texts for a website, but I believe that everything is in the right place now.&lt;br /&gt;&lt;br /&gt;The website contains all the basic things a project need: general information, source repository, mailing-lists and bug-tracker. The current information is quit basic, but it will grow over time.&lt;br /&gt;&lt;br /&gt;But the website also contains some extensive documentation on the following topics:&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.program-transformation.org/PHP/PhpSatGettingStarted"&gt;Using PHP-Sat&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.program-transformation.org/PHP/PhpSatConfiguration"&gt;The configuration file&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.program-transformation.org/PHP/TheExampleProject"&gt;Using PHP-Front&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;This is also the reason it took some time to finish the site, but I think that it was useful. It gave me a a change to think about several aspects of the project.&lt;br /&gt;&lt;br /&gt;Please let me know if you find any (spelling)-mistakes in the texts, still practicing my English over here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-6601094844880276612?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/6601094844880276612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=6601094844880276612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/6601094844880276612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/6601094844880276612'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/01/php-satorg-finished.html' title='PHP-Sat.org finished'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-5224744669175388778</id><published>2007-01-13T21:02:00.000+01:00</published><updated>2007-01-13T21:13:51.679+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='Grammar Engineering Tools'/><title type='text'>PHP Operator precedence</title><content type='html'>If you take a look in the PHP-manual regarding operator precedence you will find the following quote:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;Although &lt;/i&gt;!&lt;i&gt; has a higher precedence than &lt;/i&gt;=&lt;i&gt;, PHP will still allow expressions similar to the following: &lt;/i&gt;if (!$a = foo())&lt;i&gt;, in which case the return value of &lt;/i&gt;foo()&lt;i&gt; is put into &lt;/i&gt;$a&lt;i&gt;.&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;This is not very informative, which expressions are similar to this expression? &lt;br /&gt;&lt;br /&gt;The answer to this can be found in &lt;a href="http://www.bouwers.info/soc/prio.txt"&gt;this&lt;/a&gt; (huge!) file. This file is made with a tool called 'generate-prec-rules', which was created this week. It does exactly what the name implies, it generates the precedence rules given a set of common-precedence rules. The file above is created with the precedence rules from the yacc-definition of PHP version 5. &lt;br /&gt;&lt;br /&gt;But how can we interpret these rules? Let's take a look at an example rule: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;context-free priorities&lt;br /&gt;  "@" Expr -&gt; Expr &lt;br /&gt;  &lt;1&gt; &gt;&lt;br /&gt;  Expr "/" Expr -&gt; Expr  &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This rule disallows a "/" on the second position of the '@'. Please note that this notation also counts the string-literal.&lt;br /&gt;&lt;br /&gt;However, the expression &lt;i&gt;@ 4 / 5&lt;/i&gt; is not invalid, it can still be parsed and evaluated. The rule above just explains how PHP places the parenthesizes in the expression, in this case like this: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;i&gt;(@ 4 ) / 5&lt;/i&gt;. &lt;br /&gt;Take a minute to think about the expression and how it is influenced by the above rule, it took me a while to figure it out.&lt;br /&gt;&lt;br /&gt;It is nice to have all of the rules, they describe the operator precedence very precisely, but the size of the file is a bit problematic. Every operator, there are about 32, gets a rule for each other operator for each expression it has. The '*' alone already occurs in 82 rules. &lt;br /&gt;&lt;br /&gt;So the next step that we will have to take is to combine rules without changing the semantics of the precedence relations. An example of this is the combination of these two rules:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;context-free priorities&lt;br /&gt;  Expr "*" Expr -&gt; Expr &lt;br /&gt;  &lt;2&gt; &gt;&lt;br /&gt;  Expr "+" Expr -&gt; Expr  &lt;br /&gt;&lt;br /&gt;context-free priorities&lt;br /&gt;   Expr "*" Expr  -&gt; Expr &lt;br /&gt;   &lt;0&gt; &gt;&lt;br /&gt;   Expr "+" Expr  -&gt; Expr &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;into this rule:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;     Expr "*" Expr -&gt; Expr &lt;br /&gt; &gt;  Expr "+" Expr  -&gt; Expr &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Which means the same, but is a bit more compact and probably more understandable. &lt;br /&gt;&lt;br /&gt;So when this tool is created, and some things are changed within SDF, we can incorporate the newly generated precedence rules into PHP-Front. This will solve some parsing problems and will give us an even better SDF-grammar for PHP. We will also try to generate a more understandable, one page list of the operator precedence within PHP to replace the quote in the current PHP-documentation. &lt;br /&gt;&lt;br /&gt;A nice example of 'research meets real life' don't you think?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-5224744669175388778?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/5224744669175388778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=5224744669175388778' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5224744669175388778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5224744669175388778'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/01/php-operator-precedence.html' title='PHP Operator precedence'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-595731426679063584</id><published>2007-01-04T18:26:00.000+01:00</published><updated>2007-01-04T18:45:14.306+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Trivia'/><title type='text'>[Trivia] migrating ssh keys windows -&gt; linux</title><content type='html'>I can almost hear you thinking: 'what is this [Trivia]-thingie, we had labels right?' You are absolutely right! I just wanted to add a more visual tag to posts that contain trivia things. If you see the [Trivia]-thingie you can safely assume that the blog contains a short solution to a random problem. I am writing it down for several reasons:&lt;br /&gt; &lt;ul&gt;&lt;br /&gt;  &lt;li&gt;I could not find the solution in a quick way&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;When I have the same problem I can find out what I did to solve it&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;When you have the same problem you can find out what I did to solve it&lt;/li&gt;&lt;br /&gt; &lt;/ul&gt;&lt;br /&gt;Enjoy!&lt;br /&gt;&lt;br /&gt;I was migrating my SSH-keys from Windows to Linux and found out that my pass phrase was not accepted anymore. The keys would load into &lt;a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html"&gt;Pageant&lt;/a&gt; with the same pass phrase, but &lt;a href="http://www.gentoo.org/proj/en/keychain/"&gt;keychain&lt;/a&gt; would not accept the same pass phrase. I found &lt;a href="http://groups.google.com/group/comp.security.ssh/browse_thread/thread/fc1df9ba528ddb0a/e1dd69d4838838e0?lnk=st&amp;q=ssh+linux+key+windows+&amp;rnum=1#e1dd69d4838838e0"&gt;this&lt;/a&gt; suggestion, but it would not work. Another suggestion was made &lt;a href="http://groups.google.com/group/alt.os.linux.slackware/browse_thread/thread/46ba1ae1d2836863/f93bd688d7700d2e?lnk=st&amp;q=ssh+linux+key+windows+&amp;rnum=5#f93bd688d7700d2e"&gt;here&lt;/a&gt; and this lead me to the actual solution.&lt;br /&gt;&lt;br /&gt;The key to the solution (pun indented) was that the key generated under windows was not in the OpenSSH format. It is quite easy to convert it to the right format using &lt;a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html"&gt;puttygen&lt;/a&gt; and it worked after the conversion.&lt;br /&gt;&lt;br /&gt;So if the key that you generated on windows will not accept your pass phrase on linux, convert the key to OpenSSH and try again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-595731426679063584?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/595731426679063584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=595731426679063584' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/595731426679063584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/595731426679063584'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2007/01/trivia-migrating-ssh-keys-windows-linux.html' title='[Trivia] migrating ssh keys windows -&gt; linux'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-8137205941410288440</id><published>2006-12-30T11:53:00.000+01:00</published><updated>2006-12-30T12:27:21.695+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Pimping my environment(s)</title><content type='html'>You probably already noticed that the blog has been pimped. I have adopted the quote that was mentioned at the &lt;a href="http://ericbouwers.blogspot.com/2006/12/sud-2007-roundup.html"&gt;SUD&lt;/a&gt;, updated the links, added the logo and an overview of all the labels. The blog now represents more of what it already was, a place to write about the projects I am involved in. And yes, &lt;b&gt;me&lt;/b&gt; is also a project I am involved in :) &lt;br /&gt;&lt;br /&gt;Apart from the blog I also updated the &lt;a href="http://www.php-sat.org"&gt;PHP-Sat&lt;/a&gt; website. There is now some documentation for &lt;a href="http://www.program-transformation.org/PHP//PhpSatDocumentation"&gt;PHP-Sat&lt;/a&gt; and the &lt;a href="http://www.program-transformation.org/PHP/PhpSatBugPatterns"&gt;bug-patterns&lt;/a&gt;. The documentation of &lt;a href="http://www.program-transformation.org/PHP/PhpFrontDocumentation"&gt;PHP-Front&lt;/a&gt; will also be updated soon. The last thing I have to do is writing the friendly and catchy welcome page, always a difficult task.&lt;br /&gt;&lt;br /&gt;We are traveling further away from the project when I tell you that I also updated my computer configuration. You might recall that I used to work on a virtual machine, which tend to be a bit slow. So my current configuration is a dual-boot system with Windows2000 and Fedora Core 6 (default).&lt;br /&gt;The documentation for &lt;a href="http://www.program-transformation.org/PHP/GenericDevelopmentInstructions"&gt;setting up the working environment&lt;/a&gt; was more or less a guide for myself to get everything working again. It was definitely worth the work of backing-up all my configurations. A complete compilation of PHP-Front and PHP-Sat now takes 10m47s instead of the old 23m37s.&lt;br /&gt;&lt;br /&gt;The last environment that I have pimped has nothing to do with any of the projects, except the  me-project. I have cleaned my room and moved some stuff around. It is surprising to see how many useless things I had and how much space you gain when you throw them out. Although I am one of those people that believes in: &lt;i&gt;'everything you throw away will be useful the next day&lt;/i&gt;, my trust in this claim is fading away. It has been two days now and I still do not need the four, 10 centimeters long, &lt;a href="http://en.wikipedia.org/wiki/Lightsaber"&gt;lightsabers&lt;/a&gt; collected from cereal-breakfast-boxes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-8137205941410288440?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/8137205941410288440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=8137205941410288440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8137205941410288440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8137205941410288440'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/12/pimping-my-environments.html' title='Pimping my environment(s)'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-5195578646204024799</id><published>2006-12-22T18:06:00.000+01:00</published><updated>2006-12-22T19:11:50.005+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>String representations</title><content type='html'>With revision 299 we (again) have a list representation for DoubleQuoted- and HereDoc-strings. So the string "hello \t world" is represented by:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  ConstantEncapsedString(&lt;br /&gt;&amp;nbsp;&amp;nbsp;       DoubleQuoted([Literal("hello ")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                            ,Escape(116)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                            ,Literal(" world")]&lt;br /&gt;      ))&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This not completely new because the first implementation already had this, but this representation had some problems. There was no way to model a hexadecimal escape without making things ambiguous. This problem can be solved by making the order of the internal parts explicit, but we then had a terrible representation of the string:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  ConstantEncapsedString(&lt;br /&gt;&amp;nbsp;&amp;nbsp;     DoubleQuoted(&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;         DQContent(Some("hello ")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                          ,Escape(116)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                              ,Some(" world"))&lt;br /&gt;     ))&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Note that this string is represented with 1 of those DQContent-thingies, the biggest one has three children. So every string with more then 3 parts has nested DQContents. Let me give you an example, the string "Hello \\\0123" looks like:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  ConstantEncapsedString(&lt;br /&gt; &amp;nbsp;&amp;nbsp;       DoubleQuoted(&lt;br /&gt;&amp;nbsp;&amp;nbsp;          DQContent(Some("Hello ")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                         ,DQContent(Escape(92)&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                                           ,None&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                                           ,OctaChar(48,49,50))&lt;br /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;                        ,Some("3"))&lt;br /&gt;       ))&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Terribly right?&lt;br /&gt;&lt;br /&gt;So this had to be solved by a post-processing step. We have to walk over the tree bottom-up to rewrite these nasty DQContent's to a nice list. It is not nice to have such a post-process-step, but this was already required because of HereDoc-strings.&lt;br /&gt;&lt;br /&gt;The problem with the HereDoc is analogous with the problem of the &lt;a href="http://en.wikipedia.org/wiki/Dangling_else"&gt;Dangling-else&lt;/a&gt;. If you have multiple HereDoc-strings with the same label you will have to choice where the first HereDoc ends. PHP always takes the shortest HereDoc so this piece of code has two variables:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;#60;?php&lt;br /&gt;&amp;nbsp;&amp;nbsp;  $foo = &amp;#60;&amp;#60;&amp;#60;BAR&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   foo...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;BAR;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;  $bar = &amp;#60;&amp;#60;&amp;#60;BAR&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   bar&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;BAR;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;As long as HereDoc is ambiguous this is easily solved by choosing the right amb-node.&lt;br /&gt;&lt;br /&gt;But after the rewrite to the new internal implementation, HereDoc became unambiguous! This is  a bit  frustrating because it takes the longest HereDoc, which is wrong. I spend some time in trying to get it right, but I could not make it work (yet). So a new puzzle has entered the project, happy christmas! :)&lt;br /&gt;&lt;br /&gt;P.S. As said in the &lt;a href="http://ericbouwers.blogspot.com/2006/12/whats-deal-with.html"&gt;last blog&lt;/a&gt;, I can hope, but maybe I should just &lt;a href="http://help.blogger.com/bin/answer.py?answer=53336&amp;topic=10275"&gt;read&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-5195578646204024799?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/5195578646204024799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=5195578646204024799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5195578646204024799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/5195578646204024799'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/12/string-representations.html' title='String representations'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-3836286585821359016</id><published>2006-12-19T19:29:00.000+01:00</published><updated>2006-12-19T19:33:00.042+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='Grammar Engineering Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>What's the deal with ... ?</title><content type='html'>&lt;b&gt;What's the deal with &lt;/b&gt; the lack of updating of PHP-Sat?&lt;br /&gt;The last few weeks were filled with all sorts of other interesting activities, at least for me. My days are mostly filled with doing research for my master thesis and writing my proposal. In the past two weeks my free time was filled with the SUD, the visit to Google and the Grammar Engineering Tools. So plenty of projects, but little time to work on PHP-Sat.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What's the deal with &lt;/b&gt; this thesis then?&lt;br /&gt;The thesis is the final &lt;a href="http://www.cs.uu.nl/wiki/Master/CurriculumSoftwareTechnology#Research_and_Thesis_30_ECTS"&gt;project/course &lt;/a&gt; I will have to finish before I graduate. I will do some research to validate a certain algorithm that will improve feedback in educational programs. A more detailed explanation of the subject/algorithm/approach will be put into a blog soon. It's a totally different subject, but still interesting for people in computer science as in education.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What's the deal with &lt;/b&gt; this Grammar Engineering Tools project?&lt;br /&gt;As mentioned before, the paper that was the result of the project was already submitted. Some improvements are made and the tools are (going to be) updated. My work on this project was still in the interest of PHP-Sat though. We have gotten a great insight in which combinations of operators are valid and which are not. This information will be put on the web as soon as we have a reasonable format for it, so stay tuned!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What's the deal with &lt;/b&gt; those labels/link underneath the posts?&lt;br /&gt;The new version of blogger allows you to have labels under a blog. I thought is would be nice to order the posts according to certain topics. People that only want to read about my thesis can look &lt;a href="http://ericbouwers.blogspot.com/search/label/Thesis"&gt;here&lt;/a&gt;, those that only want to read about PHP-Sat &lt;a href="http://ericbouwers.blogspot.com/search/label/PHP-SAT"&gt;here&lt;/a&gt;. I hope that the people behind blogger will add a RSS-feed per label in the future, but I can only hope :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-3836286585821359016?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/3836286585821359016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=3836286585821359016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3836286585821359016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/3836286585821359016'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/12/whats-deal-with.html' title='What&apos;s the deal with ... ?'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-8168855018110993868</id><published>2006-12-13T22:13:00.000+01:00</published><updated>2006-12-13T22:33:10.918+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='Grammar Engineering Tools'/><title type='text'>Operator precedence</title><content type='html'>So what was the curious remark in the last blog? What is the interesting functionality that I have made? The title gives the area of the functionality away, 'Operator precedence'.&lt;br /&gt;&lt;br /&gt;The problem with PHP, and most grammars in general, is that the operator precedence is usually ill-documented. There is some documentation in a table, but the real reference is the implementation itself. Martin has a really nice idea about how you can check two grammars on having the same operator precedence, simple yet elegant.&lt;br /&gt;If you take two definitions of a grammar, for example one defined in YACC and one defined in  SDF, you can extract what is allowed and what not. The process of extracting the precedence rules that encode the behavior from these formalisms is written down in the paper that is produced, but I am not sure whether or not this is put on the web before we know if it is accepted to &lt;a herf="http://www.di.uminho.pt/ldta07/"&gt;LDTA 2007&lt;/a&gt;. I do not even know if I can explain this very clearly in one post. So I can not provide a link to the paper, but this might be an interesting subject to blog about for &lt;a href="http://mbravenboer.blogspot.com/"&gt;Martin&lt;/a&gt;. (Yes, this is a hint!)&lt;br /&gt;After extracting the precedence-rules you have to rename constructs and filter extensions from the rules. Finding the exact rewrites that are necessary is easy if you first extract the production-rules that are possible.  This reduces the set that you are looking at from 3000-5000 to 30-50 rules, which is much easier to examine. After the rewriting you can compare the two sets of precedence-rules by a simple diff, a built-in strategy.&lt;br /&gt;&lt;br /&gt;So what did I do exactly? Well, I worked on the actual tools in order to get some result, and we definitely did! We found several (precedence) problems in &lt;a href="http://www.lrde.epita.fr/cgi-bin/twiki/view/Transformers/CTransformers"&gt;C-Transformers&lt;/a&gt; and the &lt;a herf="http://www.cwi.nl/htbin/sen1/twiki/bin/view/Meta-Environment"&gt;SDF-library&lt;/a&gt;, which both target C. This demonstrates the great power of the tools, because I am not that familiar with C myself!&lt;br /&gt;&lt;br /&gt;We also found some precedence problems in the &lt;a href="http://www.phpcompiler.org/"&gt;PHC&lt;/a&gt;, which were fixed very shortly after the &lt;a href="https://altoure.vm.bytemark.co.uk/pipermail/phc-general/2006-December/thread.html#168"&gt;report&lt;/a&gt; was send in.  I was aware of the fact that there are some problems in PHP-front regarding operator precedence. In fact, it was one of the reasons for making these tools. The number of about 400 precedence problems was a still bit overwhelming at first. But most of these problems are due to the same operators and just produce about 49 warnings because all of the other operators report an error on it. We still have a lot of work to do, but we now have &lt;a href="http://www.stratego-language.org/Stratego/GrammarEngineeringTools"&gt;tool-support&lt;/a&gt; for checking the precedence rules!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-8168855018110993868?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/8168855018110993868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=8168855018110993868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8168855018110993868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/8168855018110993868'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/12/operator-precedence.html' title='Operator precedence'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116558774592307916</id><published>2006-12-08T15:11:00.000+01:00</published><updated>2006-12-08T15:22:25.936+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><title type='text'>Back from Dublin</title><content type='html'>The trip to Dublin can only be subscribed as really great. My dad and I had a great time and I can really recommend it to everyone to visit this divers city.&lt;br /&gt;&lt;br /&gt;We took an &lt;a href="http://www.flyaerlingus.com/"&gt;Aer Lingus&lt;/a&gt; flight from Amsterdam to Dublin and where only 30 minutes late, but this is something you get used to when you use the public transportation in Holland. The cab that we took drove straight through Dublin, the city is really huge! Traffic all over the place (on the wrong side of the road), almost no bikers and crowded streets. After we checked in we spend the afternoon walking around the main streets of Dublin and I went to Trinity to meet &lt;a href="http://www.edsko.net/"&gt;Edsko&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There seemed to be some confusion about the time of the meeting, but eventually Edsko and John showed up so we could get something to eat at the &lt;a href="http://www.dublintourist.com/details/mona_lisa.shtml"&gt;Mona Lisa&lt;/a&gt;. The food and the conversation was really nice. We talked about parsing PHP, the differences between the internal representations and living in Dublin. We concluded that the projects are not really compatible because the internal representations are really different. These internal representations of the PHP-sources can be made compatible from PHP-Sat to PHC, but not the other way around. The goals of the projects are also quit different, but we could probably learn something from each other. Although this conclusion is a bit of a disappointment I had a really nice time. Edsko also showed me some of the inside of Trinity College, which is definitely worth a visit. Thank you Edsko and John for a fun evening, I hope we meet again sometime.&lt;br /&gt;&lt;br /&gt;The visit to Google was on Tuesday at 12 o'clock, so we still had to fill the morning with something useful. We visited to the national gallery which had an interesting exposition about the Irish culture in the last 200 years. They also have a (very large) collection of other paintings which were less interesting to me, but my dad seemed to like them. &lt;br /&gt;&lt;br /&gt;And then it was finally time to go to the Google Office. Leslie could not make it because she was sick, but Rob Holland was kind enough to take over the coordination. We started the visit in the game-room which is filled with video-games, a snooker-table and a massage chair. We left our bags there and Rob showed us around the floor and the different teams. Everybody seemed to be busy, but they also took the time to say 'hi'.&lt;br /&gt;After the tour we went downstairs to the restaurant. There was plenty of food (all free), drinks (all free) and ice-cream (again all free). The conversation with the engineers during lunch was very interesting. They have done some fun (and dangerous) experiments with various (expensive) toys, but they also work very hard.&lt;br /&gt;We finished the visit with the lightning presentations of our projects. The topics of the  projects were pretty far apart, but it is good to broaden your horizon. &lt;br /&gt;The visit confirmed my expectations that working at Google is pretty cool, but you will still have to work hard. This is not so bad because the people seem to be very nice and intelligent and the atmosphere is great. Thank you Google for making this visit possible!&lt;br /&gt;&lt;br /&gt;We flew back on Wednesday after visiting the Guinness-brewery, you just have to visit this brewery when you are in Dublin. &lt;br /&gt;&lt;br /&gt;The overall conclusion is that the trip was fun, exciting and really interesting. It is hard to describe everything in words, but it was definitely cool!&lt;br /&gt;&lt;br /&gt;But onto the next challenge. After spending about one hour figuring out all the dependencies for some yacc-converting tools I am going to hack some interesting functionality together. Stay tuned for more information about this incomprehensible remark.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116558774592307916?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116558774592307916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116558774592307916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116558774592307916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116558774592307916'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/12/back-from-dublin.html' title='Back from Dublin'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116508182678873037</id><published>2006-12-02T17:34:00.001+01:00</published><updated>2008-09-24T22:10:44.913+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='Conference'/><title type='text'>SUD 2007 roundup</title><content type='html'>&lt;i&gt;Warning: rather long story with a lot of my own opinions up ahead!&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I attended  my first &lt;a href="http://www.stratego-language.org/Stratego/SeventhStrategoUserDays"&gt;Stratego User Days&lt;/a&gt; this week without really knowing what to expect. I had seen the titles of the talks, but some of them still made me wonder about what was going to be presented. So I took the train to Delft with sleepy eyes and a blank mind. &lt;br /&gt;&lt;br /&gt;If you think that the SUD is like a conference then you are wrong, it is more of an informal gathering of people that use Stratego. They explain to each other what they do, how they handle problems and what they would like to see in the next release of Stratego. At first this gave me the idea that the room would be filled with _all_ of the users of Stratego, which was probably true for some of the earliest SUD's, but the first presentation of the day already proved that this idea was wrong. Martin Bravenboer started the SUD with a presentation about the current status of Stratego. He did not only explain how hard they worked on the 0.17 release, but also showed a list of papers and projects, including one complete slide about PHP-SAT, that use Stratego. Some of the people on this list use Stratego without any help from 'the core people', Martin and Eelco, so this probably shows that Stratego is catching on. Martin also mentioned that they are several (Phd) positions to fill, so if anybody is interested they should contact him. &lt;br /&gt;&lt;br /&gt;Eelco Visser gave a presentation about the new compilation scheme of Stratego.The presentation was a bit too technical for me, but it showed some nice goals and resulted in a (short) discussion. The discussion ended at the moment that Eelco gave the right example by getting himself some coffee. &lt;br /&gt;&lt;br /&gt;Martin continued after the break with a presentation about the new library structure of Stratego. He explained why almost all of the functionality is moved to the library in order to target the portability problem. The funny thing is that some of the presentations that where about to come would complain about this problem, which shows that the needs from the community are actually being fulfilled. I liked the fact that Martin gave lot's of examples that used php-front to illustrate the new features, always nice to see your own stuff used. &lt;br /&gt;&lt;br /&gt;We had lunch a little late because we already hopelessly behind schedule, but it was still very nice. I have to say that I like the cafeteria in Delft, the money/food ratio is pretty good. The presentation of PHP-SAT started after the lunch and went very well. The people looked interested even after the moment that the laptop shut himself down because the battery was empty. Karl Trygve Kalleberg mentioned that IBM also had a project about static analysis of source code called &lt;a href="http://wala.sourceforge.net/wiki/index.php/Main_Page"&gt;Wala&lt;/a&gt;, but he did not remember whether it supported PHP. So I tried to find the PHP-part, but I could not find it so it is probably not supported. &lt;br /&gt;&lt;br /&gt;Benoit Sigoure talked about his project in which he extended PRISM to deal with real life problems. I always enjoy it when somebody talks about projects that are really useful to them. He also mentioned some problems that he encountered and gave a 'wish list' of items he wanted to see in Stratego. I have experienced most of the problems he has and I totally agree with the fact that he wants some more static checking. One of the other wishes was a debugger and I would like to put this on top of the list. Being able to step through my Stratego program is something that would help me a lot, and others as well.&lt;br /&gt;&lt;br /&gt;During the coffee break that followed the presentation of Benoit one of the girls in the room next-door asked me what kind of meeting we had. I explained the concepts of the SUD to here and she replayed with the phrase: &lt;i&gt;..I already thought that it was something with programming, you are all wearing those nerdy-code-t-shirts..&lt;/i&gt;, thank you very much indeed. &lt;br /&gt;&lt;br /&gt;After I had probably been insulted by the girl, Mikal Ziane and Nicolas Pierron talked about Lutin. They use java-front and dryad to do some kind of code refactoring, but it wasn't completely clear to me. I think I might have understand things better if we weren't interrupted by the fire-alarm. It gave us a change to see some of the campus and the other people in the building, but it didn't help us to keep up with the schedule. &lt;br /&gt;&lt;br /&gt;The presentation of Wouter Caarls about embedding Stratego in C showed another thing that can be done with Stratego. The techniques he used where not very complicated, most of them where also covered in program transformation course in Utrecht, but the combination was interesting. &lt;br /&gt;&lt;br /&gt;Valentin David his presentation ended the day by giving an overview of the current C++-front-ends. This presentation was not very interesting to me because I (currently) do not use C++, but I can at least find it again when I need to. But during the talk he mentioned &lt;a href="http://www.semanticdesigns.com/"&gt;semantic designs&lt;/a&gt;, which offers support for analysis. They also have a front-end for PHP, so I probably should take the time to take a look at this. &lt;br /&gt;&lt;br /&gt;The second day of the SUD started with a presentation about a system that comparable with Stratego, but written in Java. The system is called &lt;a href="http://tom.loria.fr/"&gt;TOM&lt;/a&gt; and it has some very nice properties. They borrowed some features of Stratego and I hope we also will borrow some of their features. The small features, like matching on a sort without specifying the number of children or the not-match, are most likely not difficult to implement but useful additions to Stratego. They also showed an eclipse-plugin for their project and a graphical debugger, great things to have and very useful. Another project that is added to the list of things to checkout.&lt;br /&gt;&lt;br /&gt;Another connection between Stratego and Java was presented by Karl Trygve Kalleberg. He showed the  &lt;a href="http://www.spoofax.org/"&gt;Spoofax&lt;/a&gt; project, which also holds a plugin for Eclipse. I haven't really thought about looking at this for the syntax highlighter for Context, but it might be a good idea to check how he did this.&lt;br /&gt;&lt;br /&gt;Bernd Fischer gave a presentation about what he wanted to get from the Stratego community. Some of the ideas could also be useful for other Stratego developers, but most of his wishes could probably be solved by implementing a separate library for ACI1-terms. Some of the problems that he mentioned are actually handled by &lt;a href="http://www.mathcs.sjsu.edu/faculty/beeson/Papers/mpdescr.html"&gt;MathPert&lt;/a&gt;, so he might want to take a look at it. &lt;br /&gt;&lt;br /&gt;The talk of Alexandre Borghi about vectorization was a bit to technical for me. I think I understand why you want it, but could not figure out completely how everything worked. I do not have a problem with this, I do not intend to use it in the near future, but other people will certainly find it interesting.&lt;br /&gt;&lt;br /&gt;A presentation that was really interesting for myself was the presentation of Bogdan Dumitriu. He did his master thesis on improving support for data-flow transformations for Object-Oriented programs. Many ideas from his thesis and his talk are very useful for me and the PHP-Sat project, so I am definitely going to read the complete thesis. His support for break- and continue-constructs can easily be added to PHP-Sat and his ideas about customized transformations are definitely cool. As soon as a get a copy of the thesis, and some spare time, I will write a blog about these cool subjects. &lt;br /&gt;&lt;br /&gt;My own version of the SUD ended with the presentation of Karl Trygve Kalleberg and Valentin David in which they present some ideas for extending Stratego. Some of the extensions, like an attribute grammar system,  are already implemented in &lt;a href="http://www.lrde.epita.fr/cgi-bin/twiki/view/Transformers/"&gt;Transformers&lt;/a&gt; and look interesting. Other proposal are still in the 'this-would-be-a-nice-idea'-stage, so we will have to wait and see what the future brings us.&lt;br /&gt;&lt;br /&gt;To conclude this roundup I wanted to say that the whole experience was very cool. It was nice to see what other people are doing with Stratego and was a good opportunity to do some feature-requests. I am already looking forward to the SUD of next year. &lt;br /&gt;&lt;br /&gt;The SUD also gave raise to a great quote coming from Pierre-Ettienne Moreau which I probably will going to use more often. The quote displays a great sense of a pragmatic attitude which really appeals to me. During the presentation about TOM Pierre-Ettienne explained some side-effect that could occur during the application of a strategy. After someone asked him whether it was pure he replied: &lt;br /&gt;&lt;br /&gt; &lt;i&gt;..it is not pure, but it is practical.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116508182678873037?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116508182678873037/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116508182678873037' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116508182678873037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116508182678873037'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/12/sud-2007-roundup.html' title='SUD 2007 roundup'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116465787982990579</id><published>2006-11-27T20:44:00.000+01:00</published><updated>2006-11-27T21:04:39.843+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><title type='text'>Interesting things</title><content type='html'>I noticed that it was already a week ago since I wrote my last blog, time flies when one is having fun. So this week should go really fast because all sorts of interesting things are going to happen!&lt;br /&gt;&lt;br /&gt;The first interesting event is going to be the &lt;a href="http://www.stratego-language.org/Stratego/SeventhStrategoUserDays"&gt;Stratego User Days&lt;/a&gt; where I will be presenting PHP-Sat. This presentation will be a bit more technical then my &lt;a href="http://www.cs.uu.nl/wiki/Stc/PHP-Sat-AnalyzingPHP"&gt;STC-presentation&lt;/a&gt;, but it will also contain the more theoretical stuff (I think).&lt;br /&gt;&lt;br /&gt;The other even that is interesting, certainly for me, is that I am going to Dublin next Monday. I will be staying there for three days and I am going to do at least two interesting things there. I am part of the &lt;a href="http://www.red-bean.com/ospowiki/GoogleDublin"&gt;GSoc-group&lt;/a&gt; that is going to visit the Google Office. Someone else who was going to come was Paul Biggar, one of the people behind the &lt;a href="http://www.phpcompiler.org/"&gt;Phc&lt;/a&gt;. It is to bad that I cannot meet him to talk about some of the problems/choices/gizmos involved in parsing and transforming PHP-code. But I will be meeting the other two &lt;a href="http://www.phpcompiler.org/authors.html"&gt;authors&lt;/a&gt; of Phc. I am really looking forward to this meeting, it's going to be very interesting.&lt;br /&gt;&lt;br /&gt;I promise that I will write about all of these events, so don't worry about missing all this interesting stuff. I am even considering to subscribe to something like &lt;a href="http://www.flickr.com/"&gt;Flickr&lt;/a&gt; so that I can share some pictures with you, although I think that the SUD will be covered by &lt;a href="http://www.flickr.com/photos/eelcovisser/"&gt;Eelco Visser&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;For those people that want to read about something that actually happened already I have a little &lt;a href="http://ericbouwers.blogspot.com/2006/10/doh-situation.html"&gt;Doh&lt;/a&gt;-anecdote. I spend a day working on PHP-Sat together with Martin to fix the last DoubleQuoted string-ambiguities. The problem was that there where some literals that kept breaking apart within strings that where used for regular expressions. The reason for this was a missing follow restriction, so we fixed it and where very happy with ourselves. So I took another look at the problem yesterday and noticed that there where still more situations that showed this behavior. After about an hour I realized that we already fixed this problem for HereDoc by writing out the allowed order of literals and escapes. But I can not remember why we didn't do this for DoubleQuoted strings, isn't that interesting?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116465787982990579?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116465787982990579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116465787982990579' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116465787982990579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116465787982990579'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/11/interesting-things.html' title='Interesting things'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116396020480557505</id><published>2006-11-19T17:52:00.000+01:00</published><updated>2006-11-19T19:16:46.216+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Who's idea is it anyway?</title><content type='html'>I started with the research for my thesis proposal this week. For those who&lt;br /&gt;wonder about the subject: please read on. For everybody else: skip to the next paragraph. My master thesis will explore an idea of &lt;a href="http://www.google.com/search?q=%22johan%20jeuring%22"&gt;Johan Jeuring&lt;/a&gt;&lt;br /&gt;and &lt;a href="http://www.google.com/search?q=%22Harrie%20Passier%22"&gt;Harrie Passier&lt;/a&gt;. The eventual goal is to provide feedback in educational tools (well actually educational tools that allow you to rewrite a certain input step by step to an answer), as if the feedback comes from a teacher. One of the hurdles that has to be taken is the guessing of which step the student &lt;i&gt;wanted&lt;/i&gt; to take when a faulty answer is inserted in the program.&lt;br /&gt;The idea for guessing this step is that you take the last correct tree and then generates all the trees that can be obtained by rewrite-rules that are allowed. You then calculate the difference between these trees and the faulty answer to find out which tree is nearest to the faulty answer. The rewrite-rule used to get this nearest tree is probably the rule that the student wanted to apply.&lt;br /&gt;This simple and short explanation does not expose all the problems very well, but I will probably come back to that in a later blog. For more information about the idea you can take a look at &lt;a href="http://www.google.com/search?q=%22Feedback+in+an+interactive+equation+solver%22"&gt;this&lt;/a&gt; paper.&lt;br /&gt;&lt;br /&gt;Last Monday I was in Leusden to meet the people from 'TeamInternet' again. Apart from going through some new code of the &lt;a href="http://www.scoutshop.nl"&gt;scoutshop&lt;/a&gt;, I also showed PHP-Sat to the people there. &lt;a href="http://www.google.com/search?q=%22Bjarni%20van%20Berkum%22"&gt;Bjarni van Berkum&lt;/a&gt; came up with a new idea for a &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-84"&gt;bugpattern&lt;/a&gt; and this resulted in another &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-85"&gt;idea&lt;/a&gt;. He told me that he was interested in the results of PHP-Sat on the code base because it would probably find the first pattern a few times. I told him that it shouldn't be hard to implement, but it turns out that this is not completely true.&lt;br /&gt;I was right about the fact that it is easy to implement, for normal and static function calls that is. The retrieving of these functions are pretty straightforward because they are directly available in the environment. The problems lays in the fact that most of the codebase of TI is ObjectOriented, which means that there are lots of objects passed to lots of functions. But we currently do not descent into functions, nor do we know about objects. This poses somewhat of a problem if you want to find out which objects are used within functions. So unfortunately, there is a lot of work to be done in order to support this.&lt;br /&gt;&lt;br /&gt;But there where more ideas that came from people at TI. &lt;a href="http://www.google.com/search?q=%22Frits%20Zwegers%22"&gt;Frits Zwegers&lt;/a&gt; talked about an &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-86"&gt;idea&lt;/a&gt; for a tool that can give an overview of which files are needed for a given file. This can be done by collecting all directly included files and all the files that declare a class or a function that is used within the file. The implementation of this tool is also delayed because of the problem mentioned above, but I am pretty sure that it will be available some day :)&lt;br /&gt;&lt;br /&gt;The people mentioned above already came up with great ideas, so if you also have a great idea: share it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116396020480557505?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116396020480557505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116396020480557505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116396020480557505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116396020480557505'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/11/whos-idea-is-it-anyway.html' title='Who&apos;s idea is it anyway?'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116310415442279069</id><published>2006-11-09T21:02:00.000+01:00</published><updated>2006-11-09T21:30:12.100+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>The first presentation</title><content type='html'>The last three days where filled with only 1 thought: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt;Prepare Presentation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Every student that follows the &lt;a href="http://www.cs.uu.nl/wiki/Master/WebHome"&gt;master program&lt;/a&gt; at the &lt;a href="http://www.cs.uu.nl/wiki/Master/CenterForSoftwareTechnology"&gt;Center For Software Technology&lt;/a&gt; has to give a talk as part of the &lt;a href="http://www.cs.uu.nl/wiki/Stc/WebHome"&gt;Software Technology Colloquium&lt;/a&gt;. Students usually pick a topic that is researched by other people and present projects, ideas or tools that are the result of this research.&lt;br /&gt;&lt;br /&gt;Since the ideas and concepts of PHP-Sat could be interesting for others as well, and since I already know some things about it, I started working on the slides and preparing the presentation. On Tuesday I practiced the talk and got some pointers on how to improve the structure of the talk. I gave the presentation today and it was actually fun to do. I was a bit nervous before I started, but after a few slides the story just came out very smoothly. So the first presentation of PHP-Sat was a success, on to the next one?&lt;br /&gt;&lt;br /&gt;(For those who are interested, the announcement and the slides can be found &lt;a href="http://www.cs.uu.nl/wiki/Stc/PHP-Sat-AnalyzingPHP"&gt;here&lt;/a&gt;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116310415442279069?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116310415442279069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116310415442279069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116310415442279069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116310415442279069'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/11/first-presentation.html' title='The first presentation'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116265945314582286</id><published>2006-11-04T17:32:00.000+01:00</published><updated>2006-11-04T18:02:52.910+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Something to celebrate</title><content type='html'>This is the 50th post in this blog, a number to celebrate because it is a nice round number. It is also the first blog-entry that contains some real-world results, another thing to celebrate. It also comes at the time that I am reading the book &lt;a href="http://www.joelonsoftware.com/articles/BestSoftwareWriting.html"&gt;&lt;i&gt;The best software writing&lt;/i&gt;&lt;/a&gt;, thank you Michiel, which might help me to improve my blog-entries. Something that is definitely worth celebrating.&lt;br /&gt;&lt;br /&gt;So let's look at some results. I found out that there 91 detections of pattern &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-sat/trunk/doc/optimization/O000_for-with-count.txt"&gt;O000&lt;/a&gt; in the &lt;a href="http://www.phpdoc.org/"&gt;PhpDocumentor&lt;/a&gt;-project. Since &lt;a href="http://www.php.lt/benchmark//phpbench.php"&gt;this&lt;/a&gt; suggests that you should always pre-calculate the size of an array I decided to do a little test. I first used the original sources of PhpDocumentor to extract the documentation of 'phorum', 'phpBB2' and 'phpMyAdmin'. After this I modified all the for-loops of PhpDocumentor that where flagged by PHP-Sat and extracted the documentation again. &lt;br /&gt;The results where rather disappointing, maybe a single second somewhere, but nothing really substantial. When I showed this my girlfriend I realized that none of the projects have phpdoc-comments. So I found out that this optimization does not matter for projects that you would not process. Anyone else want to state the obvious?&lt;br /&gt;So I repeated the experiment with the sources of PhpDocumenter itself, which are well-documented. The results for these sources are less disappointing. It turns out that pre-computing the size of the array saves 6 seconds in the frames/default configuration, and up to 9 seconds in the DOM/default configuration. These number are not very large, but it seems that this simple optimization really saves some time. If you want to know more about optimizations that are more useful, please click &lt;a href="http://phplens.com/lens/php-book/optimizing-debugging-php.php"&gt;here&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Optimization is nice, but has been discussed a lot and not very original anymore. So let's look at some results that indicate logical errors. A pattern that is not PHP-specific is &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-sat/trunk/doc/correctness/C006_ignored_return.txt"&gt;C006&lt;/a&gt;, which is an ignored return statement. I have implemented this pattern because &lt;a href="http://www.owasp.org/"&gt;OWASP&lt;/a&gt; has an &lt;a href="http://www.owasp.org/index.php/Ignored_function_return_value"&gt;article&lt;/a&gt; about it. When I inspected the results I learned that Pear actually has functions that will &lt;emp&gt;always&lt;/emp&gt; return 'true'. This situation is probably worth a pattern, but it also generates extra detections because the result of these functions are ignored. &lt;br /&gt;But there also was an ignore that was not legit and this resulted in the first &lt;a href="http://pear.php.net/bugs/bug.php?id=9219"&gt;bug-report&lt;/a&gt; coming from PHP-Sat. Let's hope that it will get accepted and is fixed in the near future.&lt;br /&gt;&lt;br /&gt;When I looked at the results from the C006 pattern I also read the comments in some of the files in Pear. The following piece of comment caught my eye:&lt;br /&gt;&lt;verbatim&gt;&lt;br /&gt; .. constructor&lt;br /&gt;@param ....&lt;br /&gt;@param ....&lt;br /&gt;@return mixed  True on success else PEAR error class.&lt;br /&gt;&lt;/verbatim&gt;&lt;br /&gt;How can a constructor return either True or an other object? A constructor is supposed to return the newly created object, so a return statement in a constructor is useless. (PHP4 allows you to return something else from a constructor by assigning a value to the '$this'-variable, but this is not compatible with PHP5 or good practice.) I have also found a &lt;a href="http://beeblex.com/lists/index.php/php.pear.qa/531?s=l:php.pear.qa"&gt;thread&lt;/a&gt; that shows that these patterns should be checked. &lt;br /&gt;So I added the patterns &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-sat/trunk/doc/correctness/C007_return_statement_in_constructor.txt"&gt;C007&lt;/a&gt; and &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-sat/trunk/doc/correctness/C008_assignment_to_this.txt"&gt;C008&lt;/a&gt; to PHP-Sat. I could not find any assignments to '$this' in the stable packages of Pear, but I found 13(!) occurrences of a return value within a constructor. Good luck for me, bad luck for the package maintainers?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116265945314582286?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116265945314582286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116265945314582286' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116265945314582286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116265945314582286'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/11/something-to-celebrate.html' title='Something to celebrate'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116220210956159819</id><published>2006-10-30T10:44:00.000+01:00</published><updated>2006-10-30T11:17:42.766+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>A Doh-situation</title><content type='html'>I had a real &lt;a href="http://wilk4.com/humor/doh.htm"&gt;'Doh'&lt;/a&gt;-situation yesterday, it happened when I was trying out php-sat on several PHP-projects. I began with trying php-sat on the sources of &lt;a href="http://www.phorum.org/"&gt;Phorum&lt;/a&gt;, &lt;a href="http://www.phpbb.com/"&gt; phpBB&lt;/a&gt;, &lt;a href="http://www.phpmyadmin.net/home_page/index.php"&gt;phpMyAdmin&lt;/a&gt; and &lt;a href="http://www.joomla.org/"&gt;Joomla&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The results for these projects are very nice, considering the current status of the tool. I was surprised to see that the pattern &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-sat/trunk/doc/correctness/C003_required-after-optional.txt"&gt;C003&lt;/a&gt;, which is very simple and even documented in the PHP-documentation, was actually flagged in both phpMyAdmin and Joomla. The functions to blame can be found in &lt;i&gt;Table.class.php&lt;/i&gt; (&lt;i&gt;generateAlter&lt;/i&gt; and &lt;i&gt;generateFieldSpec&lt;/i&gt;) from the phpMyAdmin-source, and &lt;i&gt;database.php&lt;/i&gt; (&lt;i&gt;database&lt;/i&gt;) from the Joomla-source.&lt;br /&gt;&lt;br /&gt;A pattern that was found quiet often in phpMyAdmin is pattern &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-sat/trunk/doc/optimization/O001_echo-with-concat.txt"&gt;O001&lt;/a&gt;. &lt;br /&gt;I have done some simple tests and it turns out that passing multiple parameters is roughly twice as fast as using concatenation. &lt;a href="http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html%5D"&gt;This&lt;/a&gt;  blog-entry confirms this by explaining what happens behind the scenes in both cases.&lt;br /&gt;So the pattern describes a possible optimization that is not very useful if this patterns occurs only once. But if it happens in 32 cases in a single source file that is called &lt;i&gt;common.lib.php&lt;/i&gt;, which is probably used commonly in the project, then it might be useful to take a look at it.&lt;br /&gt;&lt;br /&gt;But back to the 'Doh'-situation. After trying php-sat in the projects I wanted to run it on a large php-codebase. A great resource of PHP-code can be found in the &lt;a href="http://pear.php.net/"&gt;PEAR&lt;/a&gt; repository. The PHP-code for PEAR itself is about 30000 LOC so I gave this to php-sat first. I was not surprised that it took a while because the code is pretty large. But I got a little suspicious after about 10 minutes of just seeing files being parsed. So I put some more log-messages in the php-front-library and tried again. It turned out that php-sat was including 3 files in a cycle, but the includes happened because of a 'require_once'. I was pretty sure that I had fixed this problem by checking whether a file was previously included, and this was indeed the case. The only problem was that I put the files that where included in the environment &lt;u&gt;after&lt;/u&gt; going into a file. The solution is pretty obvious, but such situations just call for a slap on your own forehead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116220210956159819?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116220210956159819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116220210956159819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116220210956159819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116220210956159819'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/10/doh-situation.html' title='A Doh-situation'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116163423720665286</id><published>2006-10-23T21:43:00.000+02:00</published><updated>2006-10-23T22:10:37.223+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Propagation</title><content type='html'>So this week was still filled with constant propagation techniques, but also with software metrics. I have given a presentation about functional software metrics which was based on &lt;a href="http://www.cs.kent.ac.uk/pubs/2004/2236/index.html"&gt;this&lt;/a&gt; PhD thesis. It is very hard to find papers about software metrics for functional languages, but it is even harder to find them for scripting languages! Please let me know if you know a website that covers metrics specifically for scripting languages, I don't expect there to be any papers about this subject.&lt;br /&gt;&lt;br /&gt;I am looking for software metrics for scripting languages because I think that metrics can help in finding the weak spots in a program, but there has to be evidence to support this. Validation of software metrics is rather time-consuming,  so hopefully done by somebody else :) It shouldn't be hard to make a tool based on php-front to generate a rapport with software metrics about your program, any volunteers?&lt;br /&gt;&lt;br /&gt;But back to the constant propagation. I have added support for the propagation within loop-constructs, if-statements and switch-statements. This was not very hard because I could use the techniques described in &lt;a href="http://www.cs.uu.nl/research/techreps/UU-CS-2005-005.html"&gt;this&lt;/a&gt; paper. The construct that was not discusses in this paper, or on any slide of the &lt;a href="http://www.cs.uu.nl/wiki/Pt"&gt;pt&lt;/a&gt; course (which is not given anymore, unfortunately), is the if-elseif-else construct. It is not very hard to come up with the (hopefully correct) semantics for this, but I could be wrong of course. I will explain my interpretation in the next section, but it might be hard to follow. Feel free to ask for a better explanation!&lt;br /&gt;&lt;br /&gt;The if-elseif-else construct is evaluated as a list of list of statements. The first statement is used as an unit-element in a foldr over this list. This foldr applies a given strategy to every element, which is to be expected. But it also performs an split-and-intersect of the dynamic-rule-set between every two elements. The result of this is that the rule-set will only contain the dynamic rules that are stable in all branches of the if-elseif-else statement. The implementation of the switch-construct was pretty easy after I made the infra-structure for this "split-and-intersect"-foldr.&lt;br /&gt;&lt;br /&gt;So the constant propagation is coming along very fine and is also added to the php-sat-tool. The new flag &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-77"&gt;&lt;i&gt;--complex-inclusion&lt;/i&gt;&lt;/a&gt; triggers the tool to perform constant-propagation and include the files that can be included in that way. The constant propagation is not completely finished, to consider this an 'alpha-feature in this 'beta'-tool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116163423720665286?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116163423720665286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116163423720665286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116163423720665286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116163423720665286'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/10/propagation.html' title='Propagation'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116093850312742286</id><published>2006-10-15T20:53:00.000+02:00</published><updated>2006-10-15T21:48:21.736+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Not the only one</title><content type='html'>It is always nice to know that you belong to a group. I discovered this week that I am part of a large group of people that still works on their SoC project. It turns out that many people still try to work on their project, but at a slower pace. I am one of those people :) I am also one of the people that can walk around in a Summer of Code 2006 t-shirt (&lt;a href="http://soc.bouwers.info/google_soc_t-shirt_2006_front.jpg"&gt;front&lt;/a&gt;,&lt;a href="http://soc.bouwers.info/google_soc_t-shirt_2006_back.jpg"&gt;back&lt;/a&gt;), it arrived this week.  But enough about bragging, let's talk about PHP-Sat again..&lt;br /&gt;&lt;br /&gt;You will probably know already that Google has released &lt;a href="http://www.google.com/codesearch"&gt;Code Search&lt;/a&gt;, a search engine specifically for code. It turns out that it can be used to &lt;a href="http://paradigma.pt/ja/slog/index.php/2006/10/google-code-search-as-a-security-vulnerability-database.html"&gt;find &lt;/a&gt; &lt;a href="http://shiflett.org/archive/269"&gt;vulnerabilities&lt;/a&gt; &lt;a href="http://ilia.ws/archives/133-Google-Code-Search-Hackers-best-friend.html#extended"&gt;in &lt;/a&gt; PHP sources. The regexp for &lt;i&gt;XSS due to echoing raw input&lt;/i&gt;, which is heavenly quoted on the Internet, gives around 7000 results. There are off course false positives in these results, but many of the results would be 'useful'.  Could there be a better way to show that PHP-Sat is needed? &lt;br /&gt;&lt;br /&gt;So I have been working on PHP-Sat and, more specifically, on the completion of the constant-propagation. I have rearranged the tests for the simple-evaluation. There used to be one big testsuite with over 450 tests on almost 3000 LOC. There are now separate testsuites for expressions, operators, primitives and so on. &lt;br /&gt;&lt;br /&gt;Functionality is added in the sense that constants can now be defined and actually used. I have also begun with the implementation of references. The manual &lt;a href="http://www.php.net/manual/en/language.references.php#language.references.whatare"&gt;says&lt;/a&gt; that references are just pointers to the same memory location. I have mimicked this behavior by adding an extra step between a variable and its value. Every variable is rewritten to a 'variable-identifier', this 'variable-identifier' is rewritten to the actual value. Introducing a reference is now a simply introducing a rewrite from a variable to a 'variable-identifier'. &lt;br /&gt;&lt;br /&gt;Oh, and I have also updated the implementation of pattern C002 to handle static function calls. Mmmm ... I should really put more time into those patterns.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116093850312742286?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116093850312742286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116093850312742286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116093850312742286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116093850312742286'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/10/not-only-one.html' title='Not the only one'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-116032890584851327</id><published>2006-10-08T19:33:00.000+02:00</published><updated>2006-10-08T21:39:18.256+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>New and Improved inclusion</title><content type='html'>This week was not only filled with going to the university and playing around with PHP-SAT, it was also filled with (a lot of) preparation for the &lt;a href="http://www.flitsjacht.nl/main/news.php"&gt;Flitsjacht&lt;/a&gt;, a game for scouts in our region. Organizing a game that is played by over 150 people in 11 teams in an area of about 10 square kilometers takes a lot of time, but the photo's are priceless.&lt;br /&gt;&lt;br /&gt;Organizing this game does not mean that there is no progress on PHP-SAT,  revision 256 holds a few new things. It includes some new tests, a few extra lines of source code and a lot of new functionality! The basis for the '--complex-inclusion'-flag is finished with the evaluation of the internal functions 'include','include_once', 'require' and 'require_once'.&lt;br /&gt;&lt;br /&gt;The implementation of this evaluation was not that easy because of a small detail in the strategy 'find-in-path'. This strategy takes a list of paths and tries to find a file in those paths with a given file name. It does this by checking the existence of each 'path + file name'. This would always return the full 'path + file name', the next paragraph explains why this is useful, and worked like a charm. Until I tried it with a file name that was available at the current-directory! I did not get back the absolute path, but the original given file name. It took me a while to figure out that the strategy first checks for a file with only the given file name without taking the paths into account. I solved this by just looping over the list with directories and now everything is fine.&lt;br /&gt;&lt;br /&gt;But why do we need the absolute path to include files? This makes it a lot easier to implement the logic of the 'include_once'  and 'require_once' functions. Before we include a file we check if the file was already included by using the absolute path.  The absolute path is necessary to prevent false positives in this case. False negatives are prevented by normalizing every path after a file is found. This normalization removes all '.' and '..' steps in a path and returns the direct and absolute path.&lt;br /&gt;&lt;br /&gt;Next step: evaluate some more internal functions, especially the 'define' function that defines constants.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-116032890584851327?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/116032890584851327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=116032890584851327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116032890584851327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/116032890584851327'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/10/new-and-improved-inclusion.html' title='New and Improved inclusion'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115971991672299719</id><published>2006-10-01T18:13:00.000+02:00</published><updated>2006-10-01T18:25:16.733+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>I love my test suite</title><content type='html'>When I started to implement the evaluation of control-statements for the constant propagation I realized that I made a wrong decision. This occurred to me when I implemented the control-flow with a single if statement. One of the side-effects of such a statement is that it should undefine variables that are changed within the body when the condition can not be evaluated. &lt;br /&gt;For example: &lt;pre&gt;&lt;&amp;#63;php&lt;br /&gt; $foo = 'bar';&lt;br /&gt; if($bar == 1){&lt;br /&gt;   $foo = 'foo';&lt;br /&gt; }&lt;br /&gt;//Value of $foo is unknown&lt;br /&gt;?&gt;&lt;/pre&gt;Because we do not know the value of $bar we do not know the value of $foo after the condition. So the dynamic rule that maps $foo to the string-value "bar" should be undefined. Stratego has special syntax for these kind of situations and this makes the implementation very easy. &lt;br /&gt;&lt;br /&gt;When I wanted to do this for arrays I realized that arrays where implemented as a key-value mapping in a hashtable. This is correct, useful and it works, but undefining mappings takes a lot of work because the special notation would not work with this implementation. So I had to change this implementation and use dynamic rules. &lt;br /&gt;&lt;br /&gt;My test suite really helped me in the refactoring of this implementation. It showed which part where updated correctly and I could use the tests to analyze why the rest still failed. It also made me aware of the fact the when a dynamic rule is undefined the key still exists. The application to this undefined key will always fail, as expected, but the key still remains in the set of all keys of a dynamic rule. The test suite also identified some hidden assumptions in the old implementation, which where immediately removed.&lt;br /&gt;&lt;br /&gt;All this information would not have been available to me without the test suite. To quote a large company: &lt;i&gt;"I'm loving it!"&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115971991672299719?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115971991672299719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115971991672299719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115971991672299719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115971991672299719'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/10/i-love-my-test-suite.html' title='I love my test suite'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115930149211593798</id><published>2006-09-26T22:03:00.000+02:00</published><updated>2006-09-26T22:11:32.133+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>And the answer is...</title><content type='html'>Did you have enjoy thinking about the problem? I definitely had fun during this weekend, pictures will be put on the website soon. &lt;br /&gt;&lt;br /&gt;But back to the question off last friday, what will be the result? It would not have surprised me if PHP would raise a NOTICE, but this is not the case. It might have surprised me if PHP used the last statement in the definition as the result, but this is also not the case. The variable &lt;i&gt;$result&lt;/i&gt; is just null, not initialized, nothing happens! This is probably not the intention of a programmer, either the function is misspelled or the function is not correctly implemented. So this pattern is added to the correctness-category and has id &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/php-sat/trunk/doc/correctness/C005_assign_function_no_return.txt"&gt;C005&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I have also worked on the constant-propagation again. There is now support for superglobals and the list-statement. The support for superglobals also implies that every variable is also accessible through the $GLOBALS array.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115930149211593798?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115930149211593798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115930149211593798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115930149211593798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115930149211593798'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/09/and-answer-is.html' title='And the answer is...'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115892851252812272</id><published>2006-09-22T14:32:00.000+02:00</published><updated>2006-09-22T14:35:12.536+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Getting through the weekend</title><content type='html'>My upcoming weekend will be filled with a lot of fun and excitement, I have another &lt;a href="http://www.wsj.scouting2007.org/english/index.php"&gt;World Jamboree&lt;/a&gt; troop-weekend. Check out &lt;a href="http://bontbekplevieren.wj2007.nl/index.php?page=index"&gt;this&lt;/a&gt; site to see the other people of my troop. &lt;br /&gt;&lt;br /&gt;For the people that can not spend a weekend without wondering about PHP I have a little exercise. What is the output of the following piece of code: &lt;pre&gt;&lt;&amp;#63;php &lt;br /&gt;  function foo($param1, $param2){&lt;br /&gt;    $param1 + $param2;&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  $result = foo(1,2);&lt;br /&gt;&lt;br /&gt;  echo $result;&lt;br /&gt;&lt;br /&gt;?&gt; &lt;/pre&gt;&lt;br /&gt;Will it be an error, the result of the function or nothing at all? Don't spoil the fun by running it in PHP without thinking about it! The answer was a little surprising for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115892851252812272?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115892851252812272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115892851252812272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115892851252812272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115892851252812272'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/09/getting-through-weekend.html' title='Getting through the weekend'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115868300963920645</id><published>2006-09-19T18:12:00.000+02:00</published><updated>2006-09-19T18:23:29.713+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>I proudly present: the logo</title><content type='html'>The PHP-Sat logo is made by &lt;a href="http://www.lamacha.nl/index.html"&gt;Robert van Geenhuizen&lt;/a&gt;. &lt;br /&gt;I am very grateful that he took the time to develop this logo. I think it is 'compleet hip', which means so much as 'very trendy'.  &lt;br /&gt;&lt;br /&gt;Robert made this logo with a concept in mind. The following quote describes this concept: &lt;pre&gt;&lt;br /&gt;The creation of the PHP-Sat logo is based &lt;br /&gt;upon the following:&lt;br /&gt;&lt;br /&gt;Develop a conceptually strong logo that &lt;br /&gt;uses modern illustration techniques to &lt;br /&gt;make a simple, yet strong ideograph.&lt;br /&gt;This results in a "Bug" stopped by a &lt;br /&gt;imaginary (debug)-filter, the conceptual &lt;br /&gt;base principal behind PHP-Sat. &lt;br /&gt;&lt;br /&gt;The logo consists of many complex items &lt;br /&gt;with gradient mesh and three tints, but &lt;br /&gt;together they still form the basis for &lt;br /&gt;this strong and modern ideograph.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The statement is very hard to translate, so this is the statement in Dutch. If anyone can provide me with a better translation, please let me know. &lt;pre&gt;&lt;br /&gt;Bij de creatie van het PHP-SAT logo is &lt;br /&gt;uitgegaan van het volgende:&lt;br /&gt;&lt;br /&gt;Een conceptueel sterk logo neerzetten &lt;br /&gt;dat door middel van moderne &lt;br /&gt;illustratietechnieken een modern maar &lt;br /&gt;toch simpel en sterk beeldmerk is. &lt;br /&gt;Dit resulteert in een Bug die door een &lt;br /&gt;denkbeeldig (debug)-filter vliegt, het &lt;br /&gt;conceptuele basisprincipe achter PHP-SAT.&lt;br /&gt;&lt;br /&gt;Het logo bestaat uit veel complexe items &lt;br /&gt;met verloopnetten en 3 kleurtinten, maar &lt;br /&gt;toch vormen zij samen de basis voor dit &lt;br /&gt;sterke en aanwezige, moderne beeldmerk.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here it comes: &lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.program-transformation.org/pub/PHP/PhpSatLogo/PHP-SAT-LOGO4.jpg"  alt= "php-sat logo"/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115868300963920645?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115868300963920645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115868300963920645' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115868300963920645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115868300963920645'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/09/i-proudly-present-logo.html' title='I proudly present: the logo'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115851650431512150</id><published>2006-09-17T20:02:00.000+02:00</published><updated>2006-09-17T20:08:24.330+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>What is going on?</title><content type='html'>If you have been wondering about what is going on, here is the answer. I have attended a conference of the &lt;a href="http://www.nluug.nl/events/nj06/index.html"&gt;NLUUG&lt;/a&gt; last Thursday. I actually worked there to check badges, but I could also attend the talks that where given. The main reason for being at the conference was the change to talk to people that would probably be interested in PHP-sat. I gave a demo to some of the partners of &lt;a href="http://www.madison-gurkha.com/"&gt;madison-gurkha&lt;/a&gt;, which went well I think. They where introduced to me by Armijn Hemel, who has a brother (Tim) that works there. I already presented the tool to Tim last Monday and he seemed to like it too. He is even learning Stratego to be able to adapt the tool. &lt;br /&gt;&lt;br /&gt;Armijn also helped me out with some typo's in the documentation and with testing the tool. He &lt;a href="https://bugs.cs.uu.nl/secure/IssueNavigator.jspa?reset=true&amp;&amp;pid=10180&amp;reporterSelect=specificuser&amp;reporter=armijn&amp;sorter/field=issuekey&amp;sorter/order=DESC"&gt;found some things&lt;/a&gt; that where not support by the SDF. Some of them where rather easy to fix, others require an update of Stratego or a post-processor for the parsing. &lt;br /&gt;&lt;br /&gt;If you have checked the issue tracker recently you might have noticed things are a bit more organized now. I have added some milestones to be able to plan more. So you can check out the &lt;a href="https://bugs.cs.uu.nl/browse/PSAT?report=com.atlassian.jira.plugin.system.project:roadmap-panel"&gt;roadmap&lt;/a&gt; to see what is going on. &lt;br /&gt;&lt;br /&gt;Another thing that is going on is the creation of a paper. I have to write a paper for the &lt;a href="http://www.cs.uu.nl/wiki/Stc/WebHome"&gt;STC&lt;/a&gt; and Martin suggested that it would be nice to write for a real conference as well. I will try to get it published so that the project will get an even more solid foundation. But I will certainly talk about the project at the STC and maybe also at the Stratego User Days.&lt;br /&gt;&lt;br /&gt;To conclude this entry with a cliffhanger, the logo for the project should be ready very soon!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115851650431512150?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115851650431512150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115851650431512150' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115851650431512150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115851650431512150'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/09/what-is-going-on.html' title='What is going on?'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115813118229341419</id><published>2006-09-13T08:49:00.000+02:00</published><updated>2006-09-13T09:06:22.353+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Anything new?</title><content type='html'>Sorry for the late update, college is really getting started so I have to get used to going to lectures and meetings again. But my php-*-projects are still going strong. The evaluation strategy can handle construction of, assigning to and reading entries from arrays now. An array in the interpreter is modeled as a map which maps keys to values. Some useful strategies have been implemented to easily add and retrieve values from the arrays. The &lt;a herf="http://nl2.php.net/manual/en/language.types.array.php"&gt;documentation about arrays&lt;/a&gt; tells us that PHP also sees an array as a map, so the implementation of the semantics was not that hard. The only thing that it does not support (yet) is references. These will be added later.&lt;br /&gt;&lt;br /&gt;The second thing that has been added is the fix for the long lasting &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-2"&gt;psat-2&lt;/a&gt; bug-entry. This states that HereDoc should be parsed as a sequence of  literals and escapes, just like double-quoted strings. This turns out to be very tricky. Double-quoted strings have a very straight-forward start and end-point, HereDoc does not have this. The end of a HereDoc is marked with a newline-label-newline sequence. So the newline was added as an escape in a literal, we have to treat this newline in a special way if it is followed by a label. The problem that arises here is that we cannot express this within SDF. This should be written down as a follow-restriction on the newline, but then we would have to know the length of the label. This length is not fixed, so we can not do this. By not setting the follow restriction a literal became ambiguous when there was a variable in front of it. The solution here was to write out the definition of 'a list of literals or escapes'. This definition was extended by 'where there are no two literals in a row'. This solved all the problems for that moment and everybody was happy! &lt;br /&gt;This happiness lasted until I tried to parse a file with a statement after the HereDoc, this failed. So a statement after a HereDoc caused the parser to keep parsing until the end of the file, something that we definitely do not want. So the problem here was that the end of a HereDoc was not strict enough. I tried several things, but nothing seemed to work. The optional semicolon was causing big problems. It turns out that this optional semicolon was a misinterpretation of the documentation. The documentation mentions this semicolon and I thought that it was part of the end of the HereDoc. But this semicolon is only allowed because the HereDoc is probably part of a bigger expression that needs to be closed by the semicolon. So I simplified the HereDoc-end and this allowed a nice follow-restriction. All the problems are over and everybody is happy again :) &lt;br /&gt;So there is now a more expressive support for HereDoc, with a restriction. This was already true with the first implementation, but never really mentioned. The problem is that one can not express the fact that the labels of the HereDoc should match within SDF. So HereDoc is parsed from the first open label until the last closing label, even if there are statements in between. This restriction is unfortunate, but reality for all parsers that are based on SDF. It is simply not possible to solve this within the syntax definition. It can be solved by adding a post-processing step,  so an issue for this is already &lt;a href="https://bugs.cs.uu.nl/browse/PSAT-7"&gt;created&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The finish this entry with some good news, there are windows-builds for both php-front and php-sat! It took us some time and some hackery implementation of stratego-routines to get everything right, but we succeeded. The hackery stuff will be moved to the stratego libraries as soon as possible. I have tested the build on my own machine and it seems to work fine. Please try it out if you have a windows machine that you can (ab)use. Windows-builds for stratego programs are relatively new, so there could be some hidden problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115813118229341419?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115813118229341419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115813118229341419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115813118229341419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115813118229341419'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/09/anything-new.html' title='Anything new?'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115755965571778057</id><published>2006-09-06T18:11:00.000+02:00</published><updated>2006-09-06T18:20:55.826+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Finding differences</title><content type='html'>Here is another example that shows that testing is useful. I had implemented the type-juggling from Integer- to String-value and written some tests for this. All the tests succeeded on my machine so I could commit. I was surprised when I got a mail about &lt;a href="http://nix.cs.uu.nl/dist/stratego/php-sat-0.1pre171-hfh9j6cn/"&gt;a failing build&lt;/a&gt;. If you look at the page then you will notice that the check passed for i686-linux, but failed for i686-darwin. The tests that fail have in common that they handle a non-empty string that does not start with a number. Thus my code applied &lt;a href="http://nix.cs.uu.nl/dist/stratego/stratego-lib-docs-stable-latest/docs/html/term/integer.str.html#298"&gt;string-to-int&lt;/a&gt; to an empty string. This strategy is implemented in C and calls &lt;a href="http://homepages.cwi.nl/~aeb/linux/man2html/man3/strtol.3.html"&gt;strtol&lt;/a&gt;. It turns out that the result of this function is not the same for both platforms if the input is an empty-string. I am not a C-expert, but i686-darwin seems to give an error and i686-linux does not do this. The problem is solved and tests are added to the Stratego-libraries for this. But it might be useful to know for others.&lt;br /&gt;&lt;br /&gt;These implementation details might be interesting for some, others prefer an update. So what has been added to PHP-SAT? It is now possible to include files in a simple way. This means that all files are included without looking at the context. They can only be included if the file names are coded in Strings, so no concatenation. They should also be on the include-path. But this is the same for PHP. &lt;br /&gt;&lt;br /&gt;It is also possible to print the included files. All files are printed to a file with the same file name and a post-fix '.psat'.  The bug patterns within PHP-SAT are also applied to the included files, so these are checked automatically. &lt;br /&gt;&lt;br /&gt;I am currently improving the simple evaluation to be able to handle more complex file inclusion. It should also improve file-inclusion by having the normal semantics for include_- and require_once. &lt;br /&gt;&lt;br /&gt;The last cool thing is that almost all calls to the stratego-xtc-library are gone. This means that we could make windows-builds soon!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115755965571778057?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115755965571778057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115755965571778057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115755965571778057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115755965571778057'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/09/finding-differences.html' title='Finding differences'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115722264907397878</id><published>2006-09-02T20:33:00.000+02:00</published><updated>2006-09-02T23:51:35.143+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><category scheme='http://www.blogger.com/atom/ns#' term='Summer of Code'/><title type='text'>Thanks and progress</title><content type='html'>I think that there are many people with great ideas for projects. Most people do not get around to actually starting up these projects. It takes a lot of time which is usually not available. Without the Summer of Code I would not have had the time to start the project, let alone work on it for so many hours. Thank you &lt;a href="http://www.google.nl"&gt;Google&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;The project would not be in his current state without my mentor. He helped me in setting up the development environment and automating the build- and test-process. Our meetings motivated me and helped me in keeping focused. I would recommend all (future) participants of the Summer of Code to meet with his/her mentor face-to-face, or at least in some interactive way. It helped me a lot, thank you &lt;a href="http://www.cs.uu.nl/wiki/Martin/WebHome"&gt;Martin&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;The following section is taken from my evaluation for the Summer of Code. I think it nicely summarizes the current progress of the project. The project has produced the following two libraries, together with tools to interface with them.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nix.cs.uu.nl/dist/stratego/php-front-unstable-latest/"&gt;PHP-Front&lt;/a&gt; is a library with support for parsing and pretty-printing php, reflection of parsed sources, some generic traversals and a simple evaluation. This part is available as a separate package which provides a solid basis for transforming or inspecting PHP source code. I think that there will be more projects that are going to use this package for this purpose. One of the projects that I am already aware of is &lt;a href="http://www.stringborg.org"&gt;StringBorg&lt;/a&gt;. &lt;br /&gt; &lt;br /&gt;&lt;a href="http://nix.cs.uu.nl/dist/stratego/php-sat-unstable-latest/"&gt;PHP-SAT&lt;/a&gt; is the library that actually performs an analysis on the given source code. It tries to detect  7 bug patterns, more will be implemented later. It also check pre-conditions for functions and language construct to detect possible vulnerabilities. This last analysis will be improved over time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115722264907397878?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115722264907397878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115722264907397878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115722264907397878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115722264907397878'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/09/thanks-and-progress.html' title='Thanks and progress'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115695368376283036</id><published>2006-08-30T17:49:00.000+02:00</published><updated>2006-08-30T18:02:56.846+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Introducing eval-php</title><content type='html'>After spending a weekend in the woods, hearing a lot of information about the &lt;a href="http://www.wj2007.scouting.nl/"&gt;World Jamboree&lt;/a&gt;,  I dived into the operators of PHP. Some of them could already be evaluated, but I wanted to add support for other operators as well. I have made a tool to check the evaluation and named it 'eval-php'. This tool is capable of evaluation a subset of PHP. It cannot handle control-flow (yet?), but it can support several operators on the integer, string, null, Boolean and float type.  The following list of operators are supported: &lt;ul&gt;&lt;li&gt;&lt;a href="http://www.php.net/manual/en/language.operators.arithmetic.php"&gt;Arithmetic operators&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.php.net/manual/en/language.operators.comparison.php"&gt;Comparison operators&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.php.net/manual/en/language.operators.logical.php"&gt;Logical operators&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.php.net/manual/en/language.operators.string.php"&gt;String operators&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.php.net/manual/en/language.operators.assignment.php"&gt;Assignment operators&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.php.net/manual/en/language.operators.increment.php"&gt;Incrementing/Decrementing operators&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; Small note about the arithmetic operator 'mod'. It has no support for floats until issue  &lt;a href="https://bugs.cs.uu.nl/browse/STR-630"&gt;STR-630&lt;/a&gt; is fixed.&lt;br /&gt;&lt;br /&gt;This also means that the &lt;a href="http://www.php.net/manual/en/language.operators.bitwise.php"&gt;bitwise operators&lt;/a&gt;, &lt;a href="http://www.php.net/manual/en/language.operators.errorcontrol.php"&gt;error control operators&lt;/a&gt; and &lt;a href="http://www.php.net/manual/en/language.operators.execution.php"&gt;execution operators&lt;/a&gt; are not supported at this moment. But as said before, it supports a subset. Supporting the Error Control operator when there are no errors generated is a bit strange anyway.  &lt;br /&gt;&lt;br /&gt;It is fun to be able to evaluate thing, but it is even more fun to see things that are evaluated. So the tool produces evaluated output. This means that everything that is not within PHP-tags is outputted. There is also support for the 'echo' statement, so this produces output too. I have put a small test-file online &lt;a href="http://soc.bouwers.info/eval-php-test.txt"&gt;here&lt;/a&gt;. The output of eval-php is available &lt;a href="http://soc.bouwers.info/eval-php-output.txt"&gt;here&lt;/a&gt;, it can be compared with the real output of PHP itself &lt;a href="http://soc.bouwers.info/eval-php-test.php"&gt;here&lt;/a&gt;, take a look at the source of the page. &lt;br /&gt;I think it is all pretty fancy :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115695368376283036?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115695368376283036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115695368376283036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115695368376283036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115695368376283036'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/introducing-eval-php.html' title='Introducing eval-php'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115651424371182637</id><published>2006-08-25T15:54:00.000+02:00</published><updated>2006-08-25T16:07:21.513+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Working on evaluation</title><content type='html'>I have been working on evaluation the past few days. Not the evaluation of the SoC, this is something I am going to do that next Monday, but that of PHP. The reason for this evaluation can be found in &lt;a href="http://ericbouwers.blogspot.com/2006/08/including-files-and-hidden-tasks.html"&gt;the first blog of Monday&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;There is currently support for arithmetic operators on the following types: integer, float, Boolean, null and string. Types can also be juggled to an other type.  It took some time to get this juggling right. Especially the juggling from &lt;a href="http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion"&gt;String to numbers&lt;/a&gt;. The string is now sort of parsed within Stratego to get the part that can be recognized as a integer / float. But it works :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115651424371182637?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115651424371182637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115651424371182637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115651424371182637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115651424371182637'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/working-on-evaluation.html' title='Working on evaluation'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115635154539394501</id><published>2006-08-23T18:41:00.000+02:00</published><updated>2006-08-23T18:45:45.410+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Speeding things up</title><content type='html'>There has been some major performance boost implemented today. The build and tests of the package took about 7 hours in the build farm, which is a lot. Even for Stratego standards and even if it is build on 3 different platforms. The problem was the processing of the test-input. A lot of small inputs are processed by writing it to a file, parsing the file and reading the result. This involves a lot of IO actions. So the inputs are not written to files anymore. This helps a little, but the major boost came with caching the parse tables. The parse-table is now opened once for every process instead of every test / input. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Splitting up&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The project holds two libraries in it's source. The first library is php-front and holds a parser, pretty-printer, a reflection part and a set of common strategies. The other library holds the strategies that are used within PSAT. The PSAT-part depends on php-front. The base library can be useful for more libraries and will be branched from psat soon. It will be a separate package called, how surprising, php-front. It will be available &lt;a href="http://www.stratego-language.org/Stratego/PhpFront"&gt;here&lt;/a&gt;. You can also find a link there to the page that will be the home for &lt;a href="http://www.php-sat.org/"&gt;php-sat&lt;/a&gt;. They will both be filled soon. &lt;br /&gt;Note that the name has slightly changed. This is to prevent confusion with possible tools that will statically analyze Perl, Phyton, Pascal,  PL or Prolog. The other reason is that &lt;a href="http://www.psat.org"&gt;psat.org&lt;/a&gt; was already taken. All the names will hopefully be updated as soon as the packages are separated from each other.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115635154539394501?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115635154539394501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115635154539394501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115635154539394501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115635154539394501'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/speeding-things-up.html' title='Speeding things up'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115617185809022863</id><published>2006-08-21T16:45:00.000+02:00</published><updated>2006-08-21T16:50:58.103+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Summer of Code'/><title type='text'>Project deadline</title><content type='html'>The project deadline is today at 17.00 hours, at least here in Holland. This means that the project is due in a few minutes. My mentor needs to fill in the evaluation based on the code that I have now. &lt;br /&gt;&lt;br /&gt;This deadline does not mean that the project will stop. I am satisfied with my results up until now, but I will continue to improve the code and the tool. A more elaborate report about the SoC and the progress of the project will probably follow in a few days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115617185809022863?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115617185809022863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115617185809022863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115617185809022863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115617185809022863'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/project-deadline.html' title='Project deadline'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115615094304166098</id><published>2006-08-21T10:23:00.000+02:00</published><updated>2006-08-21T11:02:23.096+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Including files and hidden tasks</title><content type='html'>File inclusion within PHP can really work on your nerves. I can remember an occasion when it took me about an hour to find out why a file was not included. This was because PHP first looks in the working-directory and then in the current directory. If there is a file with the same name in both directories the first one is included. If I had taken a look at the &lt;a href="http://www.php.net/include/"&gt;documentation&lt;/a&gt; then this would not have come as a surprise to me.&lt;br /&gt;&lt;br /&gt;Way this paragraph about including files? Because this feature is added to php-front. There is now a strategy available that uses the 'require' and 'include' statements within a PHP-file to find and parse other PHP-files. These PHP-files are added to the environment and can be accessed anywhere in the traversal. &lt;br /&gt;&lt;br /&gt;The implementation of this inclusion strategy included the modeling of the different paths that PHP used. As mentioned above, PHP uses two different directories to search for files. The working directory, where the process was initiated, and the current directory, where the current file resides. These directories are the same if there is only one file to be processed. &lt;br /&gt;&lt;br /&gt;I did not want to mess with the current-directory of the tool when including files, so the paths are kept internally. This requires some string manipulation to make up the right include-path, but it works. By keeping track of the include-path and working-directory within the application there is even support for the functions &lt;a href="http://www.php.net/ini-set"&gt;ini-set&lt;/a&gt; and &lt;a href="http://www.php.net/chdir"&gt;chdir&lt;/a&gt;!&lt;br /&gt;&lt;br /&gt;All this could not have been done without moving things around and adding some small but useful strategies. This included: a separate section is added to the library that holds common strategies, the parsing is moved to the library and the environment can now store complete AST's. All of these things are small and easily done. But unfortunately, many small things take up a lot of time.&lt;br /&gt;&lt;br /&gt;The mechanism of including files can be improved by adding partial evaluation of PHP-code to the library. This will add annotations with known values to terms. By using this, and some constant-propagation, the following will succeed:&lt;pre&gt;&lt;&amp;#63;php&lt;br /&gt;    $path = './some/path/';&lt;br /&gt;&lt;br /&gt;    require_once $path.'filename.php';&lt;br /&gt;?&gt; &lt;/pre&gt; This is commonly used within projects so this should be supported. So on to the simple evaluation and constant-propagation!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115615094304166098?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115615094304166098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115615094304166098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115615094304166098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115615094304166098'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/including-files-and-hidden-tasks.html' title='Including files and hidden tasks'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115583610196385556</id><published>2006-08-17T19:08:00.000+02:00</published><updated>2006-08-17T19:35:02.023+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>One week later</title><content type='html'>I flew back from Spain yesterday evening, no problems with my luggage, and spend this day getting everything organized again. I had planned on going to &lt;a href="http://www.lowlands.nl"&gt;Lowlands&lt;/a&gt; this weekend, but I have to skip it this year. But I will join the party again next year I hope.&lt;br /&gt;&lt;br /&gt;But what have we done the past week. I have added a few patterns to the code: &lt;ul&gt;&lt;li&gt;&lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/correctness/C002_to-many-parameters.txt"&gt;C002&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/correctness/C003_required-after-optional.txt"&gt;C003&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/style/S002_direct-database-functions.txt"&gt;S002&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The last one needs some work though, the rest of the function-names should be added to the list.&lt;br /&gt;&lt;br /&gt;I have also spend some time on improving the pretty-printer. I have added unit-tests for the different parts (expressions, statements, documents) and made sure that things are consistent. An example of this is that every construct that has a list of expressions is printed in the same way. The expressions in the list are separated with a comma and a space. A small example:&lt;br /&gt; &lt;pre&gt; //used to be:&lt;br /&gt;  array($foo,$bar,$fred);&lt;br /&gt;&lt;br /&gt;  //is now&lt;br /&gt;  array($foo, $bar, $fred); &lt;/pre&gt;&lt;br /&gt;I have also made the strategy that extracts the safety-type build a default value of 'Safe()'. This makes the application more conservative because if it has no knowledge about a variable it will consider it to be safe. This should prevent a lot of false positives. &lt;br /&gt;&lt;br /&gt;The last item of interest is a &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/general/constantpropegationandincludes.txt"&gt;small document&lt;/a&gt; with some considerations about constant propagation and including files. The response to the user should show the code that the user has entered. So constant propagation should not be done on the current ATerm, but the information should be added to it. The only thing I could come up with is to add the information in an annotation. But if you have a better idea don't hesitate to comment.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115583610196385556?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115583610196385556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115583610196385556' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115583610196385556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115583610196385556'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/one-week-later.html' title='One week later'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115513512303241410</id><published>2006-08-09T16:45:00.000+02:00</published><updated>2006-08-09T16:57:22.003+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Relaxed working</title><content type='html'>It is not easy to get some work done while there is a private pool nearby, but I managed to get some things done. I have added the syntactic rules that make sure that an end-tag ends a line-comment. This involved another rule that recognizes nothing as a constructor. The follow-restrictions are really important in this case, but I think I managed to get them right.&lt;br /&gt;&lt;br /&gt;I have also added the right syntax for backticks. This syntax is quit similar to the syntax for double-quoted strings. So the productions that make up the double-quoted strings could be reused to make the syntax for backticks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115513512303241410?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115513512303241410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115513512303241410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115513512303241410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115513512303241410'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/relaxed-working.html' title='Relaxed working'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115469205289782826</id><published>2006-08-04T13:46:00.000+02:00</published><updated>2006-08-04T13:47:32.910+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>A small note</title><content type='html'>I have added two more patterns to the correctness category. They have the codes &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/correctness/C002_to-many-parameters.txt"&gt;C002&lt;/a&gt; and &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/correctness/C003_required-after-optional.txt"&gt;C003&lt;/a&gt;. The last one is also mentioned in the PHP manual, but it can't hurt to point this out to the programmer. The other thing that I have added is the test-suite-file for the tests of phase 4. This suite contains only two tests for now, but more will be added during my vacation.&lt;br /&gt;"Until next time, take care of yourself and each other."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115469205289782826?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115469205289782826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115469205289782826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115469205289782826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115469205289782826'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/small-note.html' title='A small note'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115463630379821881</id><published>2006-08-03T22:13:00.000+02:00</published><updated>2006-08-03T22:18:23.810+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>working on other things</title><content type='html'>I have done interesting things today, but they did not all involve psat. What I did for psat was the adding of a strategy "analyse-safetylevel" to replace the "annotate-sources" strategy. This strategy is set up in a different way to make it easier to add support for other constructs. &lt;br /&gt;&lt;br /&gt;What I have also done for psat is changing the way safety types are combined. My first thought was to combine safety types if they have the same level. Variables can then have the safety types "escaped-html" and "escaped-slashes" at the same time. This is something one would expect. &lt;br /&gt;However, combining safety types of other levels would results in variables that can have both the safety types "formatted-string" and "encoded-string", or even "object-type" and "integer-type"! This is definitely not desirable. So the only types that can be combined from now on are the types that are on the "escaped-something"-level. Writing this makes me realize that I will have to add some more terminology.&lt;br /&gt;&lt;br /&gt;You might want to know what other activities I did today. If you are not interested you might want to skip this paragraph. I have had my first experience with compiling and installing PHP on my linux machine, a nice little laptop. Quit nice, but the real cool activity was a pair-programming session with my mentor. The commit-message of the result can be found &lt;a href="https://svn.cs.uu.nl:12443/viewvc/StrategoXT?rev=15506&amp;view=rev"&gt;here&lt;/a&gt;. And the module with my name in it is located over &lt;a href="https://svn.cs.uu.nl:12443/repos/StrategoXT/strategoxt/trunk/stratego-libraries/sglr/lib/stratego/sglr/parse-report-errors.str"&gt;here&lt;/a&gt;. Always nice to have your name in a software package that you are using a lot.&lt;br /&gt;&lt;br /&gt;I have also finished setting up my laptop as a development environment. This had to be done because I will be flying to Spain on Saturday. One and a half week of nice weather, a private pool and a lot of relaxing. I will be working on some things during my vacation, so don't panic :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115463630379821881?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115463630379821881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115463630379821881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115463630379821881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115463630379821881'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/working-on-other-things.html' title='working on other things'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115455212827774218</id><published>2006-08-02T22:49:00.000+02:00</published><updated>2006-08-02T22:55:28.313+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>straight to phase 4</title><content type='html'>The tool has upgraded from phase 2 to phase 4. This is the current phase that needs to be implemented.  I will give a short sketch of what the tool supports at this moment, besides a hand-full of common patterns.&lt;br /&gt;&lt;br /&gt;The tool is configured with a text-file of which some sections where &lt;a href="http://ericbouwers.blogspot.com/2006/08/from-phase-one-into-phase-two.html"&gt;explained&lt;/a&gt; yesterday. A default configuration file can be found &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/src/tools/PSAT.ini"&gt;here&lt;/a&gt;. This is definitely not complete, but it already produces useful results. &lt;br /&gt;Two features are added to the configuration file. The first feature makes it possible to define a precondition for the language-constructs 'echo', 'die', 'exit' and 'print'. The syntax for this is: &lt;pre&gt; construct: construct-name (  precondition  )&lt;/pre&gt; The second feature is the possibility to define functions with a default level. This can be done in the '[function result]' section. The functions that are specified there are assumed to always return values with the specified safety-type. This is not limited to build-in functions, user-defined functions can also be assigned a default safety-type result.&lt;br /&gt;&lt;br /&gt;But which results are produced? The following example shows two things that are supported right now: &lt;pre&gt;&lt; ?php&lt;br /&gt;&lt;br /&gt;      echo "hello ", $_GET['name'];   //is flagged&lt;br /&gt;&lt;br /&gt;      print $_POST['param'];  //is flagged&lt;br /&gt;?&gt; &lt;/pre&gt;  &lt;br /&gt;Keep in mind that the results depend on the configuration. These results will appear when the default configuration is used. A more precise configuration will give more precise results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115455212827774218?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115455212827774218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115455212827774218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115455212827774218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115455212827774218'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/straight-to-phase-4.html' title='straight to phase 4'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115446623330905586</id><published>2006-08-01T22:56:00.000+02:00</published><updated>2006-08-02T22:20:59.260+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>From phase one into phase two</title><content type='html'>Major leap today. The implementation of phase one is ready. This phase consisted of parsing a configure-file and using this configuration to identify tainted sources. A typical configuration file for tainted sources will look like this: &lt;pre&gt; [tainted sources]&lt;br /&gt;     array: _GET&lt;br /&gt;     array: _POST&lt;br /&gt;     function: file_get_contents&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;But then there will be a lot more entries off course.&lt;br /&gt;The configuration file is used because people should be able to easily tweak the tool. This is why I have also included the option to specify a certain level for each source. A little example:&lt;pre&gt; [tainted sources]&lt;br /&gt;     array: _GET   level: escaped-slashes,escaped-shell&lt;br /&gt;  &lt;/pre&gt;This means that the variables coming from the $_GET-array return values in which both slashes and shell-characters are escaped. These safety-levels are used in the static analysis. &lt;br /&gt;&lt;br /&gt;That was phase one, on to phase two. This is also a configuration file-issue, namely the identification of sensitive sinks. They can be specified in almost the same way as tainted-sources. &lt;pre&gt;[sensitive sinks]&lt;br /&gt;     function: foo ( safe )&lt;br /&gt;     function: bar ( int-type, esc-h )&lt;/pre&gt; This configuration file means that the function "foo" expects one argument and this argument should have the safety-type "safe". Function "bar" has two parameters which should be of "integer-type" and "escaped-html" level. For each parameter the safety-type should be specified. Parameters in which the safety-type does not matter can be assigned the type 'unsafe'. &lt;br /&gt;One can also specify that a certain parameter needs to have one of more types, or it must have multiple types. &lt;pre&gt;[sensitive sinks]&lt;br /&gt;     function: foo ( esc-h || esc-sh , esc-h &amp;&amp; esc-sh)&lt;br /&gt;&lt;/pre&gt; This means that the first parameter needs to have either the type escaped-html, or the type escaped-shell. The second parameter needs to have both types, and thus levels, of safety. &lt;br /&gt;There are two things to consider when writing such a configuration file. The first one is that it does not allow functions without parameters. This is not that strange because what is the use of a sink in which nothing can be thrown? The other thing is that the and- and or-operator should be used with care. Since the level that are specified represents the minimal level of safety, the safety-types that are used in operators should be of the same level. The following represents something that must be both safe and unsafe. Which can only be true when the variable given has type  'safe'. &lt;pre&gt;[sensitive sinks]&lt;br /&gt;     function: foo ( safe &amp;&amp; unsafe ) &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Tomorrow I will be adding some more configuration details for the sensitive sinks. Some language constructs must be configurable and it does not take very long to add this. I will also be working on checking the safety-types of parameters given to sensitive sinks. So the first useful results should appear soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115446623330905586?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115446623330905586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115446623330905586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115446623330905586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115446623330905586'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/08/from-phase-one-into-phase-two.html' title='From phase one into phase two'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115438062495584110</id><published>2006-07-31T22:26:00.000+02:00</published><updated>2006-07-31T23:17:05.743+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Reflection support</title><content type='html'>Sometimes you have to reflect on something, and it is now even possible in php-front. The inspection of functions during a traversal was already possible, but the first implementation also retrieved all the functions within classes. Since these functions are not in the global scope this could result in some serious errors. So this is fixed and support is added for classes and interfaces. &lt;br /&gt;&lt;br /&gt;To be able to do reflection in a analysis you have to create an environment and initialize it so that it contains all the functions. This is off course captured in some strategies so it is very easy. The only thing that you have to do is make a choice between an environment for PHP4 or PHP5. The grammar is split up in this way and I found it more cleaner to also separate the&lt;br /&gt;environment. This is also use full when the internal functions are added to the environments. PHP5 has a few more of those. &lt;br /&gt;&lt;br /&gt;The reflection library is constructed in the same way as the &lt;a href="http://www.program-transformation.org/Stratego/TheDryad"&gt;dryad-library&lt;/a&gt;. It is actually set-up in a OO-way. So there is a notion of an PHPEnvironment, which is abstract, and a PHPFunction, which is also abstract. Each version has his own kind of environment and function which makes it easier to reason about. &lt;br /&gt;&lt;br /&gt;The only problem is the implementation of all this. It requires very careful thinking and precise notation. It is very easy to confuse some strategies and this can result in some long debug sessions. But luckily each part of the reflection is carefully tested, but that is normal right ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115438062495584110?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115438062495584110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115438062495584110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115438062495584110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115438062495584110'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/reflection-support.html' title='Reflection support'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115412284497785979</id><published>2006-07-28T23:29:00.000+02:00</published><updated>2006-07-28T23:40:45.000+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Results from the meeting</title><content type='html'>So this afternoon I talked to my mentor. Several things where discussed and all of them where positive. The structure of the code for the project was good and organized. Only some miner points about the formatting of the code. Really not a bad result. He also has a cool idea about the organization of the patterns. We might be able to organize it in such a way that patterns can be plugged in at will, which will really boost the extensibility of the tool. But we will have a look at that later.&lt;br /&gt;&lt;br /&gt;Then there was an issue of the type-states. After the response of Christian yesterday I have come up with a set of &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/general/safety_types_description.txt"&gt;safety levels&lt;/a&gt;. Each variable in the program will be assigned such a safety level. When a computation is made the result will get a level of safety which is normally the minimum of the levels of the variables involved. The sensitive sinks will get a precondition for each parameter. This precondition describes the minimal level of safety needed for that parameter. When a variable does not meet the precondition the function will be flagged by the tool. Simple isn't it :) &lt;br /&gt;Since the preconditions will not be equal for all applications, and some functions can be trusted sometimes, the configuration regarding sensitive sinks and tainted-data sources needs to be configurable. I will be writing a small syntax for three ini-files that allow everyone to tweak the application.&lt;br /&gt;&lt;br /&gt;The last thing that we did was making a start with the reflection-library. When traversing the tree of a program it is use full to have access to the functions and classes that are defined. Since some of the functions are defined by the user there should be a way to access the implementation of the functions. This can be done by traversing the tree every time a function is needed. You can imagine that this is expensive. So the trick is to traverse the tree once and build up hash-tables for things that one wants to access frequently. &lt;br /&gt;So it is now possible to get the AST of a function by it's name. So when a function call is made the implementation of the called function can be retrieved on the spot. I will have to add support for classes and some more strategies to get interesting properties of the AST's, but I now know how to do it. A lot of new and fun stuff to do!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115412284497785979?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115412284497785979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115412284497785979' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115412284497785979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115412284497785979'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/results-from-meeting.html' title='Results from the meeting'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115402609850694449</id><published>2006-07-27T20:47:00.000+02:00</published><updated>2006-07-27T20:48:18.516+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Adding patterns</title><content type='html'>Today I have added the documentation of eleven bug patterns: C001, O000, O001, O002, O003, S001, S002, S003, S004, S005 and S006. You can find the description of each of the patterns &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/"&gt;here&lt;/a&gt;. Remember that each category has it's own prefix, so you will have to look within the directories.&lt;br /&gt;&lt;br /&gt;I have also added the tests and implementation for patterns C001, O000 and O001. The patterns that are not implemented yet have [Not implemented] in their description. They will be added (hopefully soon).&lt;br /&gt;&lt;br /&gt;Their was also some disappointment today. I received a reply from Christian who I had mailed yesterday. They can not share the research that they have done regarding the list with preconditions and type states. The algorithm has been put in the products of &lt;a href="http://www.armorize.com/"&gt;Armorize Technologies&lt;/a&gt;. Sharing the crucial part of your products is not a good idea for a commercial company it seems :)&lt;br /&gt;&lt;br /&gt;But he gave me some pointers on how to start, so that is what I will be doing tomorrow morning. I will be having a meeting with my mentor about the set-up off the tool, but I think it is okay.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115402609850694449?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115402609850694449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115402609850694449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115402609850694449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115402609850694449'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/adding-patterns.html' title='Adding patterns'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115393590912958663</id><published>2006-07-26T19:42:00.000+02:00</published><updated>2006-07-26T19:45:09.140+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Testing 3 4</title><content type='html'>I have added support for SUnit tests to the project today. This also includes some tests for the two patterns that where already in the tool. I have also added tests and the implementation for a style-pattern. This one has the code, you can probably guess it, &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/style/S000_ifElseSwitch.txt"&gt;S000&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It took me some time to get all the tests working and the compilation of the tools is not that fast. So I have the feeling that I am not making that much progress the last few days. But the adding of patterns an such should go a lot faster now because there is a method to do it. So I can focus on the implementation of the patterns instead of how to add them. &lt;br /&gt;&lt;br /&gt;I have also send an email to the authors of the paper I mentioned yesterday. I hope to hear from them soon because I am reluctant to start the implementation of the phases. They should have a lot of use full information which I can use. I will wait until Friday and otherwise I will just have to start with the phases. So I will be adding patterns to the tool as fast as possible until Friday :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115393590912958663?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115393590912958663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115393590912958663' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115393590912958663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115393590912958663'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/testing-3-4.html' title='Testing 3 4'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115385263356160308</id><published>2006-07-25T20:28:00.000+02:00</published><updated>2006-07-25T20:37:13.600+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>A long one</title><content type='html'>After a whole day of doing research I just had to do some coding. So that is what I did today. I have added the basic stuff to add &lt;a href="http://www-128.ibm.com/developerworks/library/j-diag1.html"&gt;'bug patterns'&lt;/a&gt; to psat.  This should not have taken long because the detection of these patterns can be very simple. So I could have done this by simply dumping the rule in a file be done with it. The rule is certainly put into a file, but I have also added a directory structure within the library to make sure that the patterns stay organised. &lt;br /&gt;&lt;br /&gt;As my mentor mentioned, the patterns should be organised. It is natural to put each pattern into a certain category. The following categories seem to be use full to start with:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Style&lt;/li&gt;&lt;li&gt;Correctness&lt;/li&gt;&lt;li&gt;Performance&lt;/li&gt;&lt;li&gt;Malicious code vulnerability&lt;/li&gt;&lt;li&gt;Information leak&lt;/li&gt;&lt;/ol&gt; The first three are straightforward. The fourth category is mostly dedicated to the initial goal of PSAT. The last category will hold bug patterns that can expose data which is not intended for normal users and should not be shown in a production environment. Each category will get his own directory and each pattern will get his own file. Each pattern will also get an unique code which holds the category and the follow number. &lt;br /&gt;&lt;br /&gt;The first bug pattern to be in PSAT is using the If-construct to check the existence of a variable. This pattern falls into the category of Correctness and therefore has the code &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/correctness/C000_if_variable.txt"&gt;C000&lt;/a&gt;. I know it is a bit optimistic, reserving space for 999 bug patterns in one category, but you can never be sure :) &lt;br /&gt;&lt;br /&gt;I also wanted to write something about the categories of the functions. While I was reviewing them I thought about how different functions need different escapes. A query can hold HMTL-characters but needs to have escapes for all the quotes to prevent SQL-injection. Data that is send to the user should escape slashes, but also HTML-tags. So I will have to go over the collected functions and give each sensitive sink a certain level of safety needed. This is the same approach as the one taken in [1] and it seems to work there. They have implemented this in a tool called WebSSARI, but the site of this tool seems to be deleted. So I will try to get in contact with the authors of the tool, but it probably means a few hours of research.&lt;br /&gt;&lt;br /&gt;1: &lt;a href="http://www.cs.ucsb.edu/~yuf/paper/DSN04.pdf"&gt;Yao-Wen Huang, Fang Yu, Christian Hang, Chung-Hung Tsai, D. T. Lee, and Sy-Yen Kuo. Verifying web applications using bounded model checking. In DSN, 2004. &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115385263356160308?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115385263356160308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115385263356160308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115385263356160308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115385263356160308'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/long-one.html' title='A long one'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115375616062065346</id><published>2006-07-24T17:38:00.000+02:00</published><updated>2006-07-24T18:46:56.690+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Doing research</title><content type='html'>I have to do some research before I can start with the different phases of PSAT. Some of that research is relaxing and fun to do, an other part is quit annoying. Let's start with the first part. Since I want to add the possibility of providing feedback about code smells I have to find code smells to give feedback about. Besides the &lt;a href="http://gathering.tweakers.net/forum/list_messages/1148459"&gt;topic on GoT&lt;/a&gt; I start reading up on my subscription to &lt;a href="http://www.phparch.com/"&gt;PHPArchitect&lt;/a&gt;. I still had to read four issues, now two. You might wonder why this is fun to do. Well, I have a balcony with just enough space for a hammock and I have printed the issues. You can figure out the rest yourself.&lt;br /&gt;&lt;br /&gt;But there was also a more annoying part. I have to divide the internal functions of PHP into three major categories: &lt;ol&gt;&lt;li&gt;Functions that can return tainted data&lt;/li&gt;&lt;li&gt;Functions that can untaint data&lt;/li&gt;&lt;li&gt;Functions that are sensitive sinks&lt;/li&gt;&lt;/ol&gt; See the Terminology section of the &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/phase_description.txt"&gt;Phase description&lt;/a&gt; for some explanation about the terms.&lt;br /&gt;When I was going over the list I also made a list of functions of which the information should not go to the user. Such as functions that retrieve all kind of information about the system. &lt;br /&gt;&lt;br /&gt;It is interesting to check out which functions PHP has, but it becomes less interesting when there are over &lt;a href="http://www.php.net/manual/en/index.functions.php"&gt;3500(!) internal functions&lt;/a&gt;. So I spend my day was with reading function-descriptions, but I have at least seen all functions. I will explain some more things about the categories tomorrow. I will also add some stuff to the tool that will make it actually use full :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115375616062065346?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115375616062065346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115375616062065346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115375616062065346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115375616062065346'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/doing-research.html' title='Doing research'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115350763962826239</id><published>2006-07-21T20:44:00.000+02:00</published><updated>2006-07-21T20:47:19.646+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>And what have we done today?</title><content type='html'>This morning I worked on the actual psat-tool. It parses a file (using parse-php), applies a strategy to the ATerm and pretty-prints it (using pp-php). The strategy it now applies is: &lt;pre&gt;strategies&lt;br /&gt;  dangerous-variables = topdown(try(matchthing))&lt;br /&gt;&lt;br /&gt;rules&lt;br /&gt;  matchthing: Simple(_) -&gt; Simple("foo")&lt;/pre&gt; &lt;br /&gt;So what does this do? It matches on a Simple-node and gives it the name 'foo'. This means that every variable ('$name') is renamed to '$foo'. Not really use full, actually quit bad, but it shows the power of what can be done. Two actual lines of code and all variables are renamed. &lt;br /&gt;&lt;br /&gt;This rule will be deleted in the next commit because it is not use full. But what is use full then? I have &lt;a href="http://gathering.tweakers.net/forum/list_message/26173990#26173990"&gt;asked&lt;/a&gt; the people at &lt;a href="http://gathering.tweakers.net/forum"&gt;GoT&lt;/a&gt; and gotten some reactions. Still hoping for more feedback off course. &lt;br /&gt;&lt;br /&gt;The other thing I worked on today was the specification of the phases. I had a plan two posts back but I rewrote it a bit after some feedback of my mentor. The result can be read &lt;a href="https://svn.cs.uu.nl:12443/repos/psat/trunk/doc/phase_description.txt"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;The last thing I did today, besides writing this entry, was making the pretty-printer simpler. I had a strategy that rewrote a list of statements, but the framework could do this for me. The cleaned up about 30 lines of code, which is always nice :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115350763962826239?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115350763962826239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115350763962826239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115350763962826239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115350763962826239'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/and-what-have-we-done-today.html' title='And what have we done today?'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115341985703059830</id><published>2006-07-20T20:02:00.000+02:00</published><updated>2006-07-20T20:24:17.093+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>Adjusting the plan</title><content type='html'>Today was filled with some bug fixing and new ideas. I have fixed a few small things in the pretty-printer that caused the failure of test-cases test-cases. I admit, I was a bit optimistic yesterday. The results of the round-trip tests is looking very cool now, if you want to see a lot of sunglasses I suggest you take a &lt;a href="http://nix.cs.uu.nl/dist/stratego/psat-testing-unstable-latest/docs/report/"&gt;look&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The new idea came from martin in his &lt;a href="http://mail.cs.uu.nl/pipermail/psat-dev/2006q3/000005.html" &gt;reply&lt;/a&gt; to the phases-description (which I will rewrite/improve tomorrow). The idea was to add other indicators for bugs to psat. Just simple things that can help developers to improve their code. One example of this is the usage of a variable that is not declared. This can great problems if &lt;a href="http://nl3.php.net/register_globals"&gt;register globals&lt;/a&gt; is on. Another example comes from the &lt;a href="http://pear.php.net/manual/en/standards.including.php"&gt;PEAR-coding standard for including files&lt;/a&gt;. Adding these use full remarks would turn PSAT into a PHP-equivalent of &lt;a href="http://findbugs.sourceforge.net/"&gt;FindBugs&lt;/a&gt;, which has a long list with &lt;a href="http://findbugs.sourceforge.net/bugDescriptions.html"&gt;descriptions&lt;/a&gt;. Some of them also use full for PHP.&lt;br /&gt;&lt;br /&gt;But I could not find lists of specific &lt;a href="http://en.wikipedia.org/wiki/Code_smell"&gt;code smells&lt;/a&gt; for PHP. There are some &lt;a href="http://c2.com/xp/CodeSmell.html"&gt;general&lt;/a&gt; code smells that can be used, but I think there are more things specifically for PHP. So if you have any ideas about what a PHP-programmer should not do, or tricks that can improve the performance of PHP-scripts, please let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115341985703059830?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115341985703059830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115341985703059830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115341985703059830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115341985703059830'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/adjusting-plan.html' title='Adjusting the plan'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115334211297344931</id><published>2006-07-19T22:43:00.000+02:00</published><updated>2006-07-19T22:48:32.986+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Pretty problems</title><content type='html'>Today was a wonderful and, for Dutch standards very, hot day. The fan in my room was pointing at my computer instead of me to keep the temperature of the processor at a decent level. So what has been done in this heat for psat? The pretty printer is somewhat finished! If you take a look at the parse-results you will see a lot of cool smilies. There are just some minor problems to be solved. A trailing slash at the end of inlineHtml and some diff that do not go as planned. Some of the constructors could also be printed prettier, but this is something that can always be done.&lt;br /&gt;&lt;br /&gt;I decided to split the pretty-printer into three different tools. Just as the parser is, so one where you can specify the release and two tools for the specific releases. Consistency is always nice. I have also added constructors and pretty-print rules for the alternative syntax. The reason for this is that the same constructor could have children of different formats. This introduces if-then-clauses in the rewrite rules which are not really intuitive. With specific constructors I could also print the alternative syntax in the same way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115334211297344931?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115334211297344931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115334211297344931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115334211297344931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115334211297344931'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/pretty-problems.html' title='Pretty problems'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115322978605698927</id><published>2006-07-18T15:32:00.000+02:00</published><updated>2006-07-18T15:36:26.076+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-SAT'/><title type='text'>The next phase(s)</title><content type='html'>The round trip has been added to the test-script. The new smileys should be popping up soon in the parse-results page.&lt;br /&gt;&lt;br /&gt;Since the pretty printing is coming along fine, I considered the phases for PSAT itself. I have also posted this to the psat-dev list. But this could also be discussed here off course. Any comments or suggestions are most welcome.&lt;br /&gt;&lt;br /&gt;Phase 1:&lt;br /&gt;   Identify and annotate the variables that come from the user with 'un-safe'&lt;br /&gt;  This includes the research of which variables can be altered by the&lt;br /&gt;  user.  &lt;a href=http://nl2.php.net/manual/en/reserved.variables.php#reserved.variables.server&gt;Some info&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Phase 2:&lt;br /&gt; Identify and annotate the functions that can cause vulnerabilities&lt;br /&gt;to occur if a 'un-safe' variable is used.&lt;br /&gt;&lt;br /&gt;Phase 3:&lt;br /&gt; Generate a rapport in some form to show the user the possible vulnerability&lt;br /&gt; At the end of this phase the following should give use full info:&lt;br /&gt;&lt;pre&gt; echo $_GET['name'];    &lt;/pre&gt; The design of the rapport is also considered in this phase.&lt;br /&gt;&lt;br /&gt;Phase 4:&lt;br /&gt; Identify and annotate the functions that make variables safe for use&lt;br /&gt;within the  'un-safe' functions. The annotation should also be added to the variables used and propagated.&lt;br /&gt;&lt;br /&gt;Phase 5:&lt;br /&gt;  Add support for assignment variables and the (simple) propagation thereof&lt;br /&gt;&lt;br /&gt;Phase 6:&lt;br /&gt;  Add support for reference variables and the (simple) propagation thereof&lt;br /&gt;&lt;br /&gt;Phase 7:&lt;br /&gt; Add support for the propagation within and coming from(user-defined) functions&lt;br /&gt;&lt;br /&gt;Phase 8:&lt;br /&gt; Add support for the propagation within and coming from objects&lt;br /&gt;&lt;br /&gt;Notice that the phases are build upon each other. The base-foundation&lt;br /&gt;is made in the first four phases, the simplest case. The other phases&lt;br /&gt;each add a layer of complexity. Each phase should result in a working&lt;br /&gt;tool that supports the mentioned constructions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115322978605698927?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115322978605698927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115322978605698927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115322978605698927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115322978605698927'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/next-phases.html' title='The next phase(s)'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115315050392886010</id><published>2006-07-17T17:33:00.000+02:00</published><updated>2006-07-17T17:35:03.946+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Me'/><title type='text'>Back from the woods</title><content type='html'>Great wheat er, great terrain and nobody has become ill from my cooking, a successful trip. Now that I am back the fun is starting again. The pretty-printer can parse all literals such as variables, strings and operators. There is some support for expressions, but more will be added tomorrow. &lt;br /&gt;&lt;br /&gt;The test-script will also be expanded with a pretty-print,parse,pretty-print and diff round trip. The difference between the original pretty-printed and the parsed-pretty-printed version should be totally empty off course. This will show the 'correctness' of the pretty-printer. If everything goes according to plan then this will be also be finished tomorrow. The script that is...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115315050392886010?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115315050392886010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115315050392886010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115315050392886010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115315050392886010'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/back-from-woods.html' title='Back from the woods'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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-28873279.post-115271730914955412</id><published>2006-07-12T17:13:00.000+02:00</published><updated>2006-07-12T17:15:09.163+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP-Front'/><title type='text'>Tools!</title><content type='html'>What is the thing that every programmer wants? Tools off course! The current revision 74 has a few tools that let you parse php-files to the ATerm-format. 'parse-php' is a common tool with a option to choose the release you want. For everyone who wants to have a separate tool for each version we have 'parse-php4' and 'parse-php5'.&lt;br /&gt;&lt;br /&gt;The other tool that is available is 'pp-php'. This tool will pretty-print a php-file in ATerm format to an actual PHP-file. This will also be tested with the distribution files, but it is not yet finished. It supports variables and operators. The rest will be supported as soon as I come back. Yes I'm going away for a couple of days to cook for a group of girl-scouts. So no ATerms, SDF or command-line tools for a few days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/28873279-115271730914955412?l=ericbouwers.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ericbouwers.blogspot.com/feeds/115271730914955412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=28873279&amp;postID=115271730914955412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115271730914955412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28873279/posts/default/115271730914955412'/><link rel='alternate' type='text/html' href='http://ericbouwers.blogspot.com/2006/07/tools.html' title='Tools!'/><author><name>Eric Bouwers</name><uri>http://www.blogger.com/profile/05864327906016269431</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></feed>
