<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Stefan-Marr.de</title>
	<atom:link href="http://soft.vub.ac.be/~smarr/feed/" rel="self" type="application/rss+xml" />
	<link>http://soft.vub.ac.be/~smarr</link>
	<description>personal and research notes</description>
	<lastBuildDate>Sat, 20 Feb 2010 23:19:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Towards an Actor-based Concurrent Machine Model</title>
		<link>http://soft.vub.ac.be/~smarr/2010/02/towards-an-actor-based-concurrent-machine-model/</link>
		<comments>http://soft.vub.ac.be/~smarr/2010/02/towards-an-actor-based-concurrent-machine-model/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 23:19:08 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Actors]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[Manycore]]></category>
		<category><![CDATA[multicore]]></category>
		<category><![CDATA[paper]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Virtual Machines]]></category>
		<category><![CDATA[VMs]]></category>
		<category><![CDATA[workshop]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=289</guid>
		<description><![CDATA[Already quite a while ago, I was involved in writing a workshop paper about an actor model for virtual machines. Actually, the main idea was to find a concurrency model for a VM which supports multi-dimensional separation of concerns. However, AOP is not that interesting for me at the moment, so I am focussing on [...]]]></description>
			<content:encoded><![CDATA[<p>Already quite a while ago, I was involved in writing a workshop paper about an actor model for virtual machines. Actually, the main idea was to find a concurrency model for a VM which supports multi-dimensional separation of concerns. However, AOP is not that interesting for me at the moment, so I am focussing on the concurrency, especially the actor-based VM model.</p>
<p>After one year, I am back looking at that paper, and it still looks like a great model. Think, I will incorporate it into my manycore VM now <img src='http://soft.vub.ac.be/~smarr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Abstract</h3>
<blockquote>
<p>In this position paper we propose to extend an existing delegation-based machine model with concurrency primitives. The original machine model which is built on the concepts of objects, messages, and delegation, provides support for languages enabling multi-dimensional separation of concerns (MDSOC). We propose to extend this model with an actor-based concurrency model, allowing for both true parallelism as well as lightweight concurrency primitives such as coroutines. In order to demonstrate its expressiveness, we informally describe how three high-level languages supporting different concurrency models can be mapped onto our extended machine model. We also provide an outlook on the extended model&#8217;s potential to support concurrency-related MDSOC features.</p></blockquote>
<ul>
	<li>Towards an Actor-based Concurrent Machine Model, <em>Hans Schippers, Tom Van Cutsem, Stefan Marr, Michael Haupt, Robert Hirschfeld</em>, Proceedings of the fourth workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS), New York, NY, USA, ACM (2009), p. 4&#8211;9.</li>
	<li>Paper: <a title="Towards an Actor-based Concurrent Machine Model" href="http://soft.vub.ac.be/~smarr/downloads/icooolps09-schippers.pdf">PDF</a><br /> ©ACM, 2009. This is the author&#8217;s version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ICOOOLPS’09 July 6, 2009, Genova, Italy. <a href="http://doi.acm.org/10.1145/1565824.1565825">http://doi.acm.org/10.1145/1565824.1565825</a></li>
	<li>BibTex: <a href="http://www.bibsonomy.org/bibtex/243d4b86261eac5a70d28160c493e70d1/gron">BibSonomy</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2010/02/towards-an-actor-based-concurrent-machine-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intermediate Language Design of High-level Language Virtual Machines: Towards Comprehensive Concurrency Support</title>
		<link>http://soft.vub.ac.be/~smarr/2010/02/intermediate-language-design-of-high-level-language-virtual-machines-towards-comprehensive-concurrency-support/</link>
		<comments>http://soft.vub.ac.be/~smarr/2010/02/intermediate-language-design-of-high-level-language-virtual-machines-towards-comprehensive-concurrency-support/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 21:38:21 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bytecode]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Instruction Set]]></category>
		<category><![CDATA[Intermediate Language]]></category>
		<category><![CDATA[OOPSLA]]></category>
		<category><![CDATA[Survey]]></category>
		<category><![CDATA[Virtual Machines]]></category>
		<category><![CDATA[VMIL]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=285</guid>
		<description><![CDATA[My second workshop paper got published at the ACM Digital Library. This is actually only an abstract, but nonetheless, it might be interesting for people looking into the design of virtual machines and especially bytecodes/intermediate languages.
Abstract

Today&#8217;s major high-level language virtual machines (VMs) are becoming successful in being multi-language execution platforms, hosting a wide range of [...]]]></description>
			<content:encoded><![CDATA[<p>My second workshop paper got published at the ACM Digital Library. This is actually only an abstract, but nonetheless, it might be interesting for people looking into the design of virtual machines and especially bytecodes/intermediate languages.</p>
<h3>Abstract</h3>
<blockquote>
<p>Today&#8217;s major high-level language virtual machines (VMs) are becoming successful in being multi-language execution platforms, hosting a wide range of languages. With the transition from few-core to many-core processors, we argue that VMs will also have to abstract from concrete concurrency models at the hardware level, to be able to support a wide range of abstract concurrency models on a language level. To overcome the lack of sufficient abstractions for concurrency concepts in  VMs, we proposed earlier to extend VM intermediate languages by special  concurrency constructs[<a href="http://www.stefan-marr.de/2010/02/virtual-machine-support-for-many-core-architectures-decoupling-abstract-from-concrete-concurrency-models/">PLACES09</a>].</p>
<p>As a first step towards this goal, we try to fill a gap in the current literature and survey the intermediate language design of VMs.  Our goal is to identify currently used techniques and principles as well as to gain an overview over the available concurrency related features in intermediate languages.</p>
<p>Another aspect of interest is the influence of the particular target language, for which the VM is originally intended, on the intermediate language.</p></blockquote>
<ul>
	<li>Paper: <a title="Intermediate Language Design of High-level Language Virtual Machines: Towards Comprehensive Concurrency Support" href="http://soft.vub.ac.be/~smarr/downloads/vmil09-smarr.pdf">PDF</a><br /> ©ACM, 2009. This is the author&#8217;s version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in VMIL&#8217;09, October 25, 2009. <a href="http://doi.acm.org/10.1145/1711506.1711509">http://doi.acm.org/10.1145/1711506.1711509</a></li>
	<li>BibTex: <a href="http://www.bibsonomy.org/bibtex/24cadae2ab990d54d761d2233f8a21505/gron">BibSonomy</a></li>
</ul>
<h3>Slides of the Talk at VMIL09/OOPSLA</h3>
<div id="__ss_2357339" style="width: 425px; text-align: left;"><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=vmil09-005-091027084911-phpapp01&amp;rel=0&amp;stripped_title=intermediate-language-design-of-highlevel-language-vms-towards-comprehensive-concurrency-support" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=vmil09-005-091027084911-phpapp01&amp;rel=0&amp;stripped_title=intermediate-language-design-of-highlevel-language-vms-towards-comprehensive-concurrency-support" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2010/02/intermediate-language-design-of-high-level-language-virtual-machines-towards-comprehensive-concurrency-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Machine Support for Many-Core Architectures: Decoupling Abstract from Concrete Concurrency Models</title>
		<link>http://soft.vub.ac.be/~smarr/2010/02/virtual-machine-support-for-many-core-architectures-decoupling-abstract-from-concrete-concurrency-models/</link>
		<comments>http://soft.vub.ac.be/~smarr/2010/02/virtual-machine-support-for-many-core-architectures-decoupling-abstract-from-concrete-concurrency-models/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 21:37:42 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Actors]]></category>
		<category><![CDATA[Bytecode]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[CSOM]]></category>
		<category><![CDATA[Intermediate Languages]]></category>
		<category><![CDATA[locks]]></category>
		<category><![CDATA[Position Paper]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[STM]]></category>
		<category><![CDATA[threads]]></category>
		<category><![CDATA[Virtual Machines]]></category>
		<category><![CDATA[VMs]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=282</guid>
		<description><![CDATA[Finally, my first workshop paper got published, which was a little odyssey with some misunderstandings, but anyway, now it is out. It is just a position paper, thus, do not expect to many insights. However, what it describes is my big plan, and hopefully the story of my PhD. Am working on it&#8230;
Abstract

The upcoming many-core architectures [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, my first workshop paper got published, which was a little odyssey with some misunderstandings, but anyway, now it is out. It is just a position paper, thus, do not expect to many insights. However, what it describes is my big plan, and hopefully the story of my PhD. Am working on it&#8230;</p>
<h3>Abstract</h3>
<blockquote>
<p>The upcoming many-core architectures require software developers to exploit concurrency to utilize available computational power. Today&#8217;s high-level language virtual machines (VMs), which are a cornerstone of software development, do not provide sufficient abstraction for concurrency concepts. We analyze concrete and abstract concurrency models and identify the challenges they impose for VMs. To provide sufficient concurrency support in VMs, we propose to integrate concurrency operations into VM instruction sets.</p>
<p>Since there will always be VMs optimized for special purposes, our goal is to develop a methodology to design instruction sets with concurrency support. Therefore, we also propose a list of trade-offs that have to be investigated to advise the design of such instruction sets.</p>
<p>As a first experiment, we implemented one instruction set extension for shared memory and one for non-shared memory concurrency. From our experimental results, we derived a list of requirements for a full-grown experimental environment for further research.</p></blockquote>
<ul>
	<li>Paper: <a title="Virtual Machine Support for Many-Core Architectures: Decoupling Abstract from Concrete Concurrency Models" href="http://arxiv.org/pdf/1002.0939v1">PDF</a></li>
	<li>EPTCS: <a href="http://cgi.cse.unsw.edu.au/~rvg/eptcs/content.cgi?PLACES2009">Proceedings Second International Workshop on  Programming Language Approaches to Concurrency and Communication-cEntric Software</a></li>
	<li>BibTex: <a href="http://www.bibsonomy.org/bibtex/288f7f1a18d61f2db356e0658d392215c/gron">BibSonomy</a></li>
</ul>
<h3>Slides of the Talk at PLACES09</h3>
<div id="__ss_1872959" style="width: 425px; text-align: left;"><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=places-090817140006-phpapp01&amp;rel=0&amp;stripped_title=virtual-machine-support-for-manycore-architectures-decoupling-abstract-from-concrete-concurrency-models" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=places-090817140006-phpapp01&amp;rel=0&amp;stripped_title=virtual-machine-support-for-manycore-architectures-decoupling-abstract-from-concrete-concurrency-models" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2010/02/virtual-machine-support-for-many-core-architectures-decoupling-abstract-from-concrete-concurrency-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This year at the MoVES event: Winning the Poster Award :)</title>
		<link>http://soft.vub.ac.be/~smarr/2009/12/this-year-at-the-moves-event-winning-the-poster-award/</link>
		<comments>http://soft.vub.ac.be/~smarr/2009/12/this-year-at-the-moves-event-winning-the-poster-award/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 15:02:26 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[award]]></category>
		<category><![CDATA[MoVES]]></category>
		<category><![CDATA[poster]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=277</guid>
		<description><![CDATA[Spending the time on coming up with a nice poster eventually paid off.And here is the winner of this year&#8217;s MoVES poster award:
&#160;


Thanks to anyone at the event, and for the interest in my research  
&#160;
]]></description>
			<content:encoded><![CDATA[<p>Spending the time on coming up with a nice poster eventually paid off.<br />And here is the winner of this year&#8217;s <a title="Annual Meeting of the Belgian inter-university MoVES " href="http://jointevents2009.evolumons.be/doku.php?id=m_home">MoVES</a> poster award:</p>
<p>&nbsp;</p>

<div class="wp-caption alignnone" style="width: 410px"><a href="http://www.stefan-marr.de/downloads/many-core-virtual-machines-poster-moves.pdf"><img title="Many-Core Virtual Machines (Poster)" src="http://www.stefan-marr.de/downloads/many-core-virtual-machines-poster-moves.png" alt="Many-Core Virtual Machines" width="400" height="283" /></a><p class="wp-caption-text">Many-Core Virtual Machines</p></div>

<p>Thanks to anyone at the event, and for the interest in my research <img src='http://soft.vub.ac.be/~smarr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2009/12/this-year-at-the-moves-event-winning-the-poster-award/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Theory and Practice of Language Implementation, part 3</title>
		<link>http://soft.vub.ac.be/~smarr/2009/09/theory-and-practice-of-language-implementation-part-3/</link>
		<comments>http://soft.vub.ac.be/~smarr/2009/09/theory-and-practice-of-language-implementation-part-3/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 13:36:40 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[abstract interpretation]]></category>
		<category><![CDATA[approximation]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[garbage collection]]></category>
		<category><![CDATA[GC]]></category>
		<category><![CDATA[pointer analysis]]></category>
		<category><![CDATA[summer school]]></category>
		<category><![CDATA[TPLI]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=259</guid>
		<description><![CDATA[The third and last part of the summer school started with Ondrej Lhotak talking about pointer analysis. David Bacon presented a basic introduction to garbage collection and detailed description of the real-time Metronome GC. The last lecturer for this summer school was Patrick Cousot, who gave a very basic and thus understandable introduction to abstract [...]]]></description>
			<content:encoded><![CDATA[<p>The third and last part of the summer school started with <a href="http://plg.uwaterloo.ca/~olhotak/">Ondrej Lhotak</a> talking about pointer analysis. <a href="http://domino.research.ibm.com/comm/research_people.nsf/pages/bacon.index.html">David Bacon</a> presented a basic introduction to garbage collection and detailed description of the real-time Metronome GC. The last lecturer for this summer school was <a href="http://www.di.ens.fr/~cousot/">Patrick Cousot</a>, who gave a very basic and thus understandable introduction to abstract interpretation.</p>

<h3>Pointer Analysis</h3>

<p><a href="http://www.cs.uoregon.edu/research/summerschool/summer09/curriculum.html#lhotak">Ondrej’s lectures</a> were focused on pointer analysis for C and Java-like languages. He introduced it as a static analysis for several problems like for instance optimization, call-graph construction, dependency analysis and optimization, cast elimination, side effect, and escape analysis. 
The major problem seems to be that it is a very broad subject with many different applications, and thus, many different techniques to do the analysis.</p>
<p>So, before applying pointer analysis the right abstraction for a specific problem has to be chosen.
Usually, this kind of analysis will result in an over approximation of the actual problem. Under approximations are unsound and the exact points-to sets are not computable. Thus, a suitable over approximation has to be found which is exact enough for a specific question to be answered.</p>
<p>Just to recapitulate two examples, he introduced abstractions based on type filtering, i.e, points-to sets are calculated on the bases of types of the potential object during a program execution. Furthermore, he explained field sensitive abstractions. Here the main property of interest is the field to which an object is assigned and this information is used to calculate the points-to sets.
More examples and more advance techniques like refinement demand-driven analysis are shown in the slide set which will hopefully appear on the summer school webpage.</p>

<h3>Garbage Collection and the Metronome GC</h3>

<p>David started <a href="http://www.cs.uoregon.edu/research/summerschool/summer09/curriculum.html#bacon">his lectures</a> by showing off a bit <img src='http://soft.vub.ac.be/~smarr/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  He showed a nice demo of what the Metronome system is able to achieve in terms of real-time constraints. Definitely very interesting and it fortifies my belief that a Java-like language will be the next system programming language succeeding C/C++.</p>

<p>Afterwards, he gave a short introduction to mark/sweep and semi-space collectors. Useful was his explanation about the actual semantics of StopTheWorld, parallel, concurrent, and incremental GCs supported with an illustration (should remember that one). BTW: The world needs a better book on garbage collection. I don’t like the one of Jones and Lins. It does not solve my problems <img src='http://soft.vub.ac.be/~smarr/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>

<p>Eventually, he started explaining the Metronome-2 systems. The paging approach let me wonder whether there is anything an operating system is actually doing for a modern VM. Well there is, but is it enough to justify the additional trouble? Dreaming of Singularity…
The second lesson was basically dedicated to synchronization issues and parallel/concurrent data structures like lock-free stacks and which strategies are out there to implement them. This was a nice addition to what we discussed during Yannis’ lectures and gave me some basic inspiration to implement a lock-free ring buffer for multiple writers and a single reader.</p>

<p>His explanation of all the details of the metronome algorithm and how the different phases interact was quite difficult, and well, not to easy to follow especially since I lost the overall picture from time to time. But well, it is a hard problem and a lot of engineering without a simple solution as it seems.</p>

<h3>Abstract Interpretation</h3>

<p>The <a href="http://www.cs.uoregon.edu/research/summerschool/summer09/curriculum.html#cousot">last topic</a> at the summer school was abstract interpretation and the lectures were given by Mr. Abstract Interpretation Patrick Cousot himself. Even so it is a theoretical topic, I liked his introduction. Probably for some of the people it was to basic, but since I never had looked at it before, for me it was the right level of detail and complexity to get an idea what abstract interpretation is actually about.</p>

<p>Unfortunately, my own notes are very spares, and I was not able to retrieve the slide set up to now. However, abstract interpretation tries to provide a sound approximation of the semantics of a computer program, to enable various kinds of static analysis. The main problem here is, similar to pointer analysis, to choose the right abstraction for a given problem.</p>

<p>The examples I recall could have fit into Summit’s presentation about bound computation of loops as well. He introduced ideas like step-wise approximation and other techniques. But, well, unfortunately my memory is too blurry to write something down here with certainty.
Beside the introduction of the formal techniques, he also spent some time on how to implement them with Ocaml examples. He also made quite some advertisement for his product ASTRÉE, which originally was developed to analyze code for avionic systems.
Well, if I can get my hands on his slides, I might add some more information about the content, but for the moment that’s it.</p>

<h3>Where to go next Year?</h3>
Need less to say, that I really enjoyed the summer school. The lectures had different levels and quality, but the overall experience was great. Hope, that there will be a VM summer school next year, somewhere on this nice planet. I would love to attend it, too. <img src='http://soft.vub.ac.be/~smarr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2009/09/theory-and-practice-of-language-implementation-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use Pharo/Squeak from the Command-line</title>
		<link>http://soft.vub.ac.be/~smarr/2009/09/how-to-use-pharosqueak-from-the-command-line/</link>
		<comments>http://soft.vub.ac.be/~smarr/2009/09/how-to-use-pharosqueak-from-the-command-line/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 07:54:15 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Benchmarks]]></category>
		<category><![CDATA[Command-line]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Language Shootout]]></category>
		<category><![CDATA[Pharo]]></category>
		<category><![CDATA[Smalltalk]]></category>
		<category><![CDATA[Squeak]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=254</guid>
		<description><![CDATA[Along the way to measure the performance of a Smalltalk implementation for commodity multi-core systems, I tried to use Pharo as a more convenient development platform. Well, and I failed in the first attempt&#8230;
To remind myself and document some of the necessary steps in this environment, I wrote up the following tutorial.

Command-line Scripts with a [...]]]></description>
			<content:encoded><![CDATA[<p>Along the way to measure the performance of a Smalltalk implementation for commodity multi-core systems, I tried to use Pharo as a more convenient development platform. Well, and I failed in the first attempt&#8230;</p>
<p>To remind myself and document some of the necessary steps in this environment, I wrote up the following tutorial.</p>

<h1>Command-line Scripts with a Headless Pharo</h1>


<p>For some tasks like benchmarking and automated testing, an integration
with other tools comes in handy.
For such use cases, Pharo can be used headless, i.e., without its  
graphical
user interface.</p>

<p>This brief tutorial will demonstrate how to use the Debian Language  
Shootout
benchmarks with a fresh Pharo image.</p>

<h2>Step 1: Setup Pharo and a Fresh Image</h2>

<ul>
  <li>download a Pharo image, the sources file, and a VM from the
    <a href="http://www.pharo-project.org/pharo-download">download page</a></li>
  <li> extract all archives in the same folder</li>
  <li> start Pharo, from the commandline, on a MacOSX it should look  
like this:
<code>"Squeak 4.2.1beta1U.app/Contents/MacOS/Squeak VM Opt" \
          pharo1.0-10418-BETAdev09.08.3.image
    </code></li></ul>

<h2>Step 2: Load OSProcess</h2>

<p>For output on the shell, we need an extra package from the SqueakSource
repository.</p>

<p>It can be loaded by simply executing the following code in a workspace  
window:
<br/>
<pre>
ScriptLoader loadLatestPackage: 'OSProcess' from:
'http://www.squeaksource.com/OSProcess'
</pre>

<p>To execute this code snippet, select it and press cmd+d or use the &#8220;do  
it&#8221;
item in the context menu.</p>

<h2>Step 3: Load Common Benchmark Code</h2>

<p>Now we can load the common parts of all shootout benchmarks into our  
image.</p>
<ul>
<li>On way to do this is to grab the code shown <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&amp;lang=squeak&amp;lang2=squeak">here</a></li> and save it to a file called <code>common.st</code>.</li>
  <li>Open the file browser from the Menu -&gt; Tools -&gt; File Browser.</li>
  <li>Select <code>common.st</code> and press <code>filein</code> to load the code.</li></ul>

<p>Now you can close all windows in your image and save and quit it.</p>

<h2>Step 4: Run a Benchmark</h2>
<ul>
<li>Grab the code of a benchmark like <a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=fannkuch&amp;lang=squeak&amp;id=1">Fannkuch</a></li>
  <li>Save it to a file named like <code>fannkuch.st</code></li>
  <li>Add a run script to the end of the code in <code>fannkuch.st</code>, like  
this:<br/>
<pre>
    Tests fannkuch.
    SmalltalkImage current snapshot: false andQuit: true.
</pre></li>
  <li>Run it with a headless Pharo:<br/>
<pre>
    "Squeak 4.2.1beta1U.app/Contents/MacOS/Squeak VM Opt" \
        -headless pharo1.0-10418-BETAdev09.08.3.image \
        $PWD/fannkuch.st 6
</pre><br/>
important is here the absolute path to the script, clearly inconvenient and uncommon on the command-line.</li></ul>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2009/09/how-to-use-pharosqueak-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Traits Patch Updated, Backported, and Available on GitHub</title>
		<link>http://soft.vub.ac.be/~smarr/2009/09/traits-patch-updated-backported-and-available-on-github/</link>
		<comments>http://soft.vub.ac.be/~smarr/2009/09/traits-patch-updated-backported-and-available-on-github/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 07:06:10 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Language Design]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[traits]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=248</guid>
		<description><![CDATA[PHP 5.3 is already released for a while and starts to settle in.
Now it seems to be a good time to philosophize about the future language development of PHP again. To promote this discussion, I backported my Traits-patch to PHP 5.3, fixed some bugs, and used GitHub to publish it. Lets hope that this will [...]]]></description>
			<content:encoded><![CDATA[<p>PHP 5.3 is already released for a while and starts to settle in.</p>
<p>Now it seems to be a good time to philosophize about the future language development of PHP again. To promote this discussion, I backported my Traits-patch to PHP 5.3, fixed some bugs, and used GitHub to publish it. Lets hope that this will allow a painless maintenance of the patch.</p>
<p>For the moment, there is no uptodate standalone patch file anymore, but only the GitHub repository.</p>
<ul>
	<li>PHP 6: <a href="http://github.com/gron/php-src/tree/PHP_6-traits">http://github.com/gron/php-src/tree/PHP_6-traits</a></li>
	<li>PHP 5.3: <a href="http://github.com/gron/php-src/tree/PHP_5_3-traits">http://github.com/gron/php-src/tree/PHP_5_3-traits</a></li>
</ul>
<p>For a basic introduction please refer to the RFC (<a href="http://wiki.php.net/rfc/horizontalreuse">http://wiki.php.net/rfc/horizontalreuse</a>) and the test cases available in the source folder Zend/tests/traits.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2009/09/traits-patch-updated-backported-and-available-on-github/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Theory and Practice of Language Implementation, part 2</title>
		<link>http://soft.vub.ac.be/~smarr/2009/08/theory-and-practice-of-language-implementation-part-2/</link>
		<comments>http://soft.vub.ac.be/~smarr/2009/08/theory-and-practice-of-language-implementation-part-2/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 05:17:21 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bounds]]></category>
		<category><![CDATA[interpreter]]></category>
		<category><![CDATA[locks]]></category>
		<category><![CDATA[loops]]></category>
		<category><![CDATA[threads]]></category>
		<category><![CDATA[TPLI]]></category>
		<category><![CDATA[VMs]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=240</guid>
		<description><![CDATA[The second part of the summer school was a bit more applied and more in the direction of my own interests. Chandra Krintz talked about managed runtime environments. Yannis Smaragdakis introduced multi-threaded programming and transactional memory. Sumit Gulwani as the third lecturer taught us symbolic bounds computation.
As a cherry on the cake, Oliver Danvy talked [...]]]></description>
			<content:encoded><![CDATA[<p>The second part of the <a href="http://www.cs.uoregon.edu/research/summerschool/summer09/">summer school</a> was a bit more applied and more in the direction of my own interests. <a href="http://www.cs.ucsb.edu/~ckrintz/">Chandra Krintz</a> talked about managed runtime environments. <a href="http://www.cs.umass.edu/~yannis/">Yannis Smaragdakis</a> introduced multi-threaded programming and transactional memory. <a href="http://research.microsoft.com/en-us/um/people/sumitg/">Sumit Gulwani</a> as the third lecturer taught us symbolic bounds computation.</p>
<p>As a cherry on the cake, Oliver Danvy talked about general <a href="http://www.brics.dk/~danvy/">tips and tricks</a> for PhD students.</p>
<h3>Managed Runtime Environments: Implementations and Opportunities</h3>
<p>The <a href="http://www.cs.uoregon.edu/research/summerschool/summer09/curriculum.html#krintz">content-part of her lecture</a> started with an overview of how VMs execute programs. Well, as usual, it was limited to Java, Python, and Ruby. This gives me the feeling, that there are only very few people looking into the similarities between runtimes for functional and imperative languages. She talked about stack-based VM instruction sets and briefly mentioned register-based as well as register-memory-based designs, but mainly referring to CPU instruction set architectures. Interpretation techniques, just-in-time compilation, problems associated with profiling and instrumentation had been discussed, but neither of them in detail.</p>
<p>One topic, she was spending more time on was her own research, i.e., communication between independent JVM instances via shared memory. It was interesting, especially her approach to share classes between the VM instances by using shared pages and direct pointers from the instances.</p>
<p>The last lecture was a broad overview of cloud computing, available techniques and the current challenges, but not really technical.</p>
<h3>Multi-Threaded Programming and Transactional Memory</h3>
<p>Yannies gave more or less a <a href="http://www.cs.uoregon.edu/research/summerschool/summer09/curriculum.html#smaragdakis">hands-on introduction to locks and threads</a> with programming examples/exercises. From the poll in the audience, there are actually people, which never have used threads before. I thought this is just one of the assumptions professors usually get wrong, but well… From my point of view, I have heard a lot of it already before, but it was still nice to be reminded of some of the details we discussed. The primitives for monitor-style/traditional shared-memory concurrency he identified were lock/unlock, wait, signal, and broadcast. They allow building any kind of more complex critical sections on top.</p>
<p>The basic points he emphasized are to use while-loops on all conditions and the rule for single signals vs. broadcast signals. In short, a single signal, i.e., a notify, can only be used when all threads waiting on a condition are equal, but only one at a time can make progress. If more then one can make progress, a broadcast, i.e., a notifyAll has to be used to avoid livelocks.</p>
<p>After some typical examples of problems with locks, for instance, locking order leading to deadlocks, he introduced transactional memory. His focus was on the implications of this programming model, the different variations, performance questions, and the problem of irreversible operations.</p>
<h3>Art of Invariant Generation applied to Symbolic Bound Computation</h3>
<p>The <a href="http://www.cs.uoregon.edu/research/summerschool/summer09/curriculum.html#gulwani">computation of bounds for e.g. loops</a> has a broad range of applications. The knowledge about bounds allows estimating the necessary runtime or memory utilization, thus in general resource utilization. Furthermore, it can be used to identify secrecy properties in terms of information leakage due to repetitive patterns and problems of robustness due to errors and uncertainty for instance introduced by rounding.</p>
<p>After a short introduction and a simple example, he introduced a countless number of approaches to this problem and explained how to apply them to specific problems. His lectures was stuffed with a lot of content, think much more then any other lecturer tried to convey. Moreover, he managed to speak with an incredible speak. Have never heard someone before, putting an infinite number of words into one minute. Sometimes less is more…</p>
<h3>Edutainment for the Night Lecture</h3>
<p>Oliver was giving a <a href="http://www.brics.dk/~danvy/Papers/practical-PhD-requirements-2007.pdf">Tips and Tricks</a> lecture about being a PhD student, writing and reviewing papers, and giving talks. Presented in a quite entertaining style <img src='http://soft.vub.ac.be/~smarr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2009/08/theory-and-practice-of-language-implementation-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Theory and Practice of Language Implementation, part 1</title>
		<link>http://soft.vub.ac.be/~smarr/2009/07/theory-and-practice-of-language-implementation-part-1/</link>
		<comments>http://soft.vub.ac.be/~smarr/2009/07/theory-and-practice-of-language-implementation-part-1/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 21:53:58 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CFA]]></category>
		<category><![CDATA[CPS]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[summer school]]></category>
		<category><![CDATA[synthesis]]></category>
		<category><![CDATA[TPLI]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=233</guid>
		<description><![CDATA[Thanks to the financial support of FWO and a grant by the summer school itself, I was able to go to Eugene, Oregon and learn about theory and practice of language implementation.
The first part of this summer school had three different topics. Ras Bodik presented highly interesting approaches for program synthesis. Oliver Danvy taught us [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to the financial support of <a href="http://www.fwo.be/">FWO</a> and a grant by the <a href="http://www.cs.uoregon.edu/research/summerschool/summer09/">summer school</a> itself, I was able to go to Eugene, Oregon and learn about theory and practice of language implementation.</p>
<p>The first part of this summer school had three different topics. <a href="http://www.eecs.berkeley.edu/~bodik/">Ras Bodik</a> presented highly interesting approaches for program synthesis. <a href="http://www.brics.dk/~danvy/">Oliver Danvy</a> taught us how to use continuations and how to transform a program into continuation passing style. <a href="http://matt.might.net/">Matt Might</a> tried to explain control-flow analysis(CFA) for high-order programs, starting with 0-CFA(zero-CFA) and k-CFA.</p>
<h3>Algorithmic Program Synthesis</h3>
<p>The <a href="http://www.cs.uoregon.edu/research/summerschool/summer09/curriculum.html#bodik">program synthesis lectures</a> were from my perspective the most comprehensible and interesting ones. Ras gave a high-level overview over different approaches to utilize expert knowledge i.e. domain insights to guide the synthesis of algorithms. He presented two different directions: derivative and selective synthesis. The derivative synthesis has its roots in the formal world. The idea is to define a problem with a formal language and to automatically derive a proof for it. As a by-product of this proof, an algorithm to solve the problem is synthesized. This approach is limited mainly by the formal skills of the programmers, and thus, was not successful in a larger scale.</p>
<p>Selective synthesis tries to circumvent these limitations by trying to preserve the usual tools for the programmers as the basic foundation. One example he explained in more detail was SKETCH. Here, the programmer has to describe a space of possible programs and the synthesizer can chose an exemplar of this space by testing/verifying whether it fulfills a specification, which also has to be given by the programmer. An example could be an optimized sort algorithm, which might be tailored to a specific memory model. The programmer implements the basic sketch and leaves some open holes, which needs to be synthesized. She also can give a simple bubble sort as specification, or as an alternative, a checking algorithm, whether the resulting data is sorted. He concluded his lectures with a demonstration of angelic programming, which uses the idea of sketching a solution and automatically deriving an implementation.</p>
<h3>Continuations to Go</h3>
<p><a href="http://www.cs.uoregon.edu/research/summerschool/summer09/curriculum.html#danvy">Oliver</a> was the first lecturer asking us to do exercises. This was a good way to force us to really think about the content of his lectures. At first he taught us the three basic steps to transform a program to continuation-passing style (CPS): 1. name all immediate values, 2. sequentialize immediate evaluations, and 3. introduce the actual continuation. Then, he gave us some exercises, for instance to build the list of suffixes of a list and the list of prefixes. In a language supporting linked lists, the list of suffixes can be realized by sharing the data between all suffixes. The list of suffixes, thus is comprised of pointers pointing to the according element of the original list, where the suffix starts. For the list of prefixes, it is not possible to share the data, but, by implementing it in a continuation-passing style. You can share the computation of the prefixes similar to sharing the data in the case of the suffixes.</p>
<p>Another example, he ask to implement was a convolution of two lists. Thus, the result is a list of pairs of elements of each list, where the second list is reverse beforehand. The interesting thing here is, that it can be implemented in a recursive way with n steps of recursion for lists with n elements. The solution is simple, if you figure out that you can use the return time of a recursion to traverse the second lists, which is equal to a reverse. Later he pointed out, that an implementation of this, using CPS and defunctionalization will result in a plain usual zip/reverse like it would be done in Haskell.</p>
<h3>Control-flow Analysis of Higher-Order Languages</h3>
<p>Well, and then there was the <a href="http://www.cs.uoregon.edu/research/summerschool/summer09/curriculum.html#might">control-flow analysis</a> (CFA). At the moment, I have not figured out completely how to read the slides, since my Greek is rather limited. What I was able to take away from this course was, that there are several different techniques where 0-CFA is a robust and efficient one. In general, the k in k-CFAs denotes the amount of history, which is considered in the analysis. Usually, only 0-CFA and 1-CFA are applied in practice, i.e. in compilers, since the state space of the analysis explodes very fast. The concrete semantics of a program would be described by an infinite-CFA. He also talked about possible optimizations, like applying garbage collection, to eliminate unreachable states/possibilities during the CFA and thereby increasing the efficiency of the analysis significantly.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2009/07/theory-and-practice-of-language-implementation-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Traits Patch Ready for Testing</title>
		<link>http://soft.vub.ac.be/~smarr/2009/01/new-traits-patch-ready-for-testing/</link>
		<comments>http://soft.vub.ac.be/~smarr/2009/01/new-traits-patch-ready-for-testing/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 14:58:15 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[traits]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=230</guid>
		<description><![CDATA[Finally, I managed to complete the changes for the traits patch. Since, PHP 5.3 already entered the release cycle and it is not sure whether there will be a PHP 5.4 with new language features, the new patch is written for the PHP6 codebase.
In its current version, it implements the RFC with the proposed syntax [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, I managed to complete the changes for the traits patch. Since, PHP 5.3 already entered the release cycle and it is not sure whether there will be a PHP 5.4 with new language features, the new patch is written for the PHP6 codebase.</p>
<p>In its current version, it implements the <a href="http://www.stefan-marr.de/artikel/rfc-horizontal-reuse-for-php.html">RFC</a> with the proposed syntax and functionality. There are still some parts missing for a complete integration into the PHP landscape. Most noticeable is the lack of reflection support at the moment. I will add it, when the patch has reached a level of stability to be included in the official language.</p>
<p>For testing purpose, you can use the following patch, archive with test cases.</p>
<p>The patch is build for <code>cvs -d :pserver:cvsread@cvs.php.net:/repository checkout php6</code>. More information on how to build the PHP source from CVS is available at <a href="http://www.php.net/anoncvs.php">php.net</a>.</p>
<p>Patch:</p>
<ul>
	<li><a href="http://www.stefan-marr.de/traits/traits.patch">traits.patch</a></li>
	<li><a href="http://www.stefan-marr.de/traits/zend-tests-traits.bz2">Test Cases</a></li>
</ul>
<p>In case of any problems applying the patch on the CVS checkout, you can use this code snapshot with traits: <a href="http://www.stefan-marr.de/traits/php6-traits.tar.bz2">php6-traits.tar.bz2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2009/01/new-traits-patch-ready-for-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
