<?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 &#187; summer school</title>
	<atom:link href="http://soft.vub.ac.be/~smarr/tag/summer-school/feed/" rel="self" type="application/rss+xml" />
	<link>http://soft.vub.ac.be/~smarr</link>
	<description>personal and research notes</description>
	<lastBuildDate>Wed, 04 Aug 2010 14:28:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Trends in Concurrency 2010, part 3</title>
		<link>http://soft.vub.ac.be/~smarr/2010/06/trends-in-concurrency-2010-part-3/</link>
		<comments>http://soft.vub.ac.be/~smarr/2010/06/trends-in-concurrency-2010-part-3/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 08:40:14 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[rock]]></category>
		<category><![CDATA[stack]]></category>
		<category><![CDATA[summer school]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[TiC'10]]></category>
		<category><![CDATA[transactional memory]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=312</guid>
		<description><![CDATA[This is the last post about the TiC’10 summer school and covers the two remaining lectures. Mark Moir talked about concurrent data structures and transactional memory, and last but not least, Madan Musuvathi presented the work they did at Microsoft Research to improve the testing of concurrent applications. Mark Moir: Concurrent Data Structures and Transactional Memory [...]]]></description>
			<content:encoded><![CDATA[<p>This is the <a href="http://www.stefan-marr.de/2010/06/trends-in-concurrency-2010-part-2/">last post</a> about the TiC’10 summer school and covers the two remaining lectures. <a href="http://labs.oracle.com/people/moir/">Mark Moir</a> talked about concurrent data structures and transactional memory, and last but not least, <a href="http://research.microsoft.com/en-us/people/madanm/">Madan Musuvathi</a> presented the work they did at Microsoft Research to improve the testing of concurrent applications.</p>
<h3>Mark Moir: Concurrent Data Structures and Transactional Memory</h3>
<p>Stacks are the basic data structure in computer science, so it seams, well, at least they are used to introduce concurrency issues like the ABA problem. After presenting the lock-free stack with a version counter, which he claimed is for some people even with 64bit not safe enough, he presented a strategy to implement a stack much more scalable. The idea is that pairs of push-pop operations leave the actual stack unchanged as a result. Thus, these pairs could meet up in parallel and independent of the actual stack to avoid bottlenecks and contention. However, such a strategy still has to maintain some correctness criterion. Which he defines to be that it is linearizable with respect to a specific sequential semantics.</p>
<p>Afterwards he discusses and defines non-blocking progress conditions, i.e., wait-free, lock-free, and obstruction-free. The general idea is that weakening the requirements can enable more efficient or simpler implementation strategies.</p>
<p>As an example of how weakening the requirements allows to achieve an implementation strategy, which matches better the performance requirements, he introduced their SNZI counter-like constructs. SNZI means Scalable Non-Zero Indicator.</p>
<p>In the second lecture, he reports about their experience with transactional memory, not only software transactional memory, but also hardware TM, and hybrid approaches. He presented several interesting insights they gained while experimenting with the TM provided by Sun’s Rock processors. Very interesting was the report on the several factors, which lead to problems in the HTM systems. For instance, one of the main problems was, that a transaction could fail because the branch predictor was going down the wrong path and speculatively executing instructions, which then in return lead to transaction aborts.</p>
<p>Thereafter, he discussed the performance they managed to gain by using the different TM or lock-based systems. The result is that it very much depends on the algorithms and its parallel behavior. But the general conclusion is: STM, HTM, and also hybrid approaches do not just yet provide the necessary performance for general applications.</p>
<p>Another experiment he reported on was the attempt to simplify the implementation of concurrent data structures, which was mostly a success. They also need carful tuning with TM but enable simplified algorithms and even performance improvements depending on the use-case/algorithm.</p>
<h3>Madan Musuvathi: Concurrency Testing: Challenges, Algorithms, and Tools</h3>
<p>First Madan tried to wake us up by engaging in a discussion about the tradeoffs of testing vs. verification. Well, this is obviously about the effort you have to spend to achieve reasonable results. However, if the question comes to critical systems, which might cause the loss of life, it ends up in weighting ethical concerns with economic decisions. So, yes, he achieved his goal and of course, people were expressing their strong opinions.</p>
<p>He then continued with giving a demo of <a href="http://chesstool.codeplex.com/">CHESS</a>. It is a tool for debugging concurrent programs. It tries to explore the possibly problematic instruction interleavings with different algorithms since a brute force approach would not be feasible for real programs. The tool supports two different modes. In the fast mode, it inserts scheduling points before every synchronization, volatile access, and interlocked operation. This allows to find many bugs in practices, but not all. The second mode, the data-race mode inserts scheduling operations before every memory access, which allows to identify race-conditions, since it captures all sequentially consistent executions. What the tool does not do is generating and testing different inputs, which is a hard problem on its own.</p>
<p>The remainder of the talk discusses two different strategies to approach the exploding number of possible interleavings. The first approach is a reduction approach. The goal is to eliminate behavioral equivalent interleavings. Here he describes a number of different opportunities. The second approach is to prioritize interleavings, which might exhibit problematic behavior. Well, his claim is that random is the best heuristic here but of course can be combined with the reduction approach.</p>
<p>In the second lecture he details the randomization approach and presents another tool called Cuzz, which allows disciplined randomization of schedules. Now he goes into the theory behind this approach to establish an estimate of how likely it is to find bugs with this approach. The general idea is that bugs have different complexity if it comes to the necessary preconditions and possible constellations of interleavings. Another point is, that many bugs share the same root cause. This is expressed by a metric called ‘bug depth’, which is the number of ordering constrains that are sufficient to find the bug. In his experience, most bugs have a rather small bug depth. With the bug depth, he can calculate the probability of being able to find every bug in the program.</p>
<p>His claim is, that with all the optimizations applied to the algorithms they use, in practice, Cuzz beats the theoretical boundary. Most programs exhibit a lot of bugs, and these bugs are executed often which allows to find many of them in a few hundred runs through Cuzz.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2010/06/trends-in-concurrency-2010-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trends in Concurrency 2010, part 2</title>
		<link>http://soft.vub.ac.be/~smarr/2010/06/trends-in-concurrency-2010-part-2/</link>
		<comments>http://soft.vub.ac.be/~smarr/2010/06/trends-in-concurrency-2010-part-2/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 07:09:34 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[abstract interpretation]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[formalisms]]></category>
		<category><![CDATA[separation logic]]></category>
		<category><![CDATA[summer school]]></category>
		<category><![CDATA[TiC'10]]></category>
		<category><![CDATA[X10]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=307</guid>
		<description><![CDATA[This post is a follow up on my first report on the TiC’10 summer school. It covers mainly the talks about X10 and formal aspects of concurrency. Vijay Saraswat gave an overview about X10, Matthew Parkinson introduced separation logic and deny-guarantee reasoning, and Ganesan Ramalingam reported on Analysis and Verification of Concurrent Programs. Vijay Saraswat: [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a follow up on my <a href="http://www.stefan-marr.de/2010/06/trends-in-concurrency-2010-part-1/">first report on the TiC’10 summer school</a>. It covers mainly the talks about X10 and formal aspects of concurrency.</p>
<p><a href="http://www.saraswat.org/">Vijay Saraswat</a> gave an overview about X10, <a href="http://www.cl.cam.ac.uk/~mjp41/">Matthew Parkinson</a> introduced separation logic and deny-guarantee reasoning, and <a href="http://research.microsoft.com/en-us/people/grama/">Ganesan Ramalingam</a> reported on Analysis and Verification of Concurrent Programs.</p>
<h3>Vijay Saraswat: The X10 Language: Design and Implementation</h3>
<p>The talk started with a brief description of the usual application scenarios IBM tries to address. They are looking for a language, which allows to program homogenous multi- or many-core systems as well as potentially heterogeneous cluster or HPC systems. The main goal is to design an expressive, productive and efficient programming model for application developers. The means to that end are a type system, static analysis, a comfortable debugger, and optimized standard libraries.</p>
<p><a href="htttp://www.x10-lang.org/">X10</a> is part of the PGAS family, but compared to UPC or Co-Array Fortran, X10 is an asynchronous PGAS (APGAS) language, which means that accesses over location boundaries are handled asynchronous by the runtime.</p>
<p>Some of the language properties, which were discussed, are briefly summarized below. As an APGAS language writes are only local. For remote writes you need to use a place-shift operation. The semantics of it is synchronous, but usually the implementation is asynchronous via messages. In that regard, Vijay also mentioned a tail-call like optimization to minimize the number of messages, which need to be exchanged. The atomic semantics is, well, rough. They use a per-place lock for atomics, but atomic operations on primitive values like integers are mapped to atomic operations provided by the underlying system, thus it is inherently ‘broken’, i.e., it is up to the programmer to ensure that different atomic blocks do not interfere with each other.</p>
<p>The implementation uses the notion of workers, which represent threads of the underlying system. There are 1 to n workers per place and activities are executed by workers. At the moment they use a model similar to Java’s fork/join, where the number of workers can grow over time. A problematic point is the implementation of the &#8216;when(C)&#8217; construct, which currently requires to spawn new threads since the thread executing the activity which uses the &#8216;when&#8217; construct will actually block on it. They will later change to a Cilk-like work-stealing system, which will allow to use a constant number of threads.</p>
<p>The place structure is static from the beginning, and currently a flat structure. In the future, this might be changed. Currently, they think about a hierarchical model as a better fit for GPGPUs. The plan is to explore two-level hierarchical places.</p>
<p>The design with workers and activates allows the compiler to coarsen up concurrency to remove the overhead of very fine-grained activities.</p>
<p>Another more flexible language construct they introduced recently is labeled finishes to allow the implementation of server-like programs where you do not want a pure hierarchical relation between asyncs and finishs but need more flexibility. Thus, an async can indicate on which finish it wants to announce its completion.</p>
<h3>Matthew Parkinson: Deny-Guarantee Reasoning</h3>
<p>The largest portion of his lectures was about the foundation for his own work. Thus, he was introducing separation logic. The goal is to have logic foundation to reason about programs, which can use pointer data structures, i.e., a heap like in usual object oriented programs. As far as I understood, this logic provides the means to establish statements about the behavior of programs. More precisely, it is possible to prove certain semantic assertions about their stacks and heaps.</p>
<p>One thing, which can be done, is to check whether the sets of memory locations modified by a program a disjoint, and thus, whether the program is race-free.</p>
<p>Rely-guarantee reasoning is a logic framework to reason about composed concurrent programs and is independent of separation logic. However, this logic is not able to capture the typical fork/join parallelism of many programs.</p>
<p>Deny-Guarantee reasoning is a reformulation of both, which explicitly supports dynamic parallelism, and thus, enables a formal reasoning about these kind of concurrent programs.</p>
<p>Well, I think I understand what it is useful for. The next thing I would need is a good textbook introducing all the basics very patiently. Might be necessary to prove that my barrier/phaser algorithm is actually correct :-/</p>
<h3>Ganesan Ramalingam: Analysis &amp; Verification of Concurrent Programs</h3>
<p>Another Greek talk *sigh*. Anyway, lets see what it is good for: The goal of the work Mr. Ramalingam presented is to verify programs for some correctness criterion and for instance find concurrency bugs. To this end, they are using technique called concurrent shape analysis, which allows static verification in the presence of a dynamic heap and a statically unbounded number of threads by using abstract interpretation.</p>
<p>Before he goes into the details, he presents a typical stack example, and how it breaks if concurrency comes into play. To be able to reason about the correctness of the implementation a sequential specification of the stack is necessary. In a concurrent setting, this implies that the operations have to be linearizable in some form. The definition for that is: an interleaved execution is said to be linearizable iff it is equivalent to a legal sequential execution that preserves the order of non-overlapping operations.</p>
<p>Well, and then he goes on to explain the technique in detail.</p>
<p>In the second lecture, he starts with talking about serializability, similar to what is done in databases. His goal is to use the techniques presented earlier, to synthesize correct locking-schemes for originally sequential data-structures, while avoiding the trivial solution but providing an efficient scheme. The simplified idea is to compute a sequential proof, introduce the locks, and then afterwards eliminate redundant locks to achieve performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2010/06/trends-in-concurrency-2010-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trends in Concurrency 2010, part 1</title>
		<link>http://soft.vub.ac.be/~smarr/2010/06/trends-in-concurrency-2010-part-1/</link>
		<comments>http://soft.vub.ac.be/~smarr/2010/06/trends-in-concurrency-2010-part-1/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 08:17:37 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[data-flow]]></category>
		<category><![CDATA[memory model]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[STM]]></category>
		<category><![CDATA[summer school]]></category>
		<category><![CDATA[TiC'10]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=301</guid>
		<description><![CDATA[I already posted the presentation I gave at the summer school earlier. In the following posts, I will report a bit about the lectures of the summer school, similar to my posts about the TPLI summer school of last year. Like last year, my thanks go to FWO and the summer school, for providing me [...]]]></description>
			<content:encoded><![CDATA[<p>I already posted the <a href="http://www.stefan-marr.de/2010/05/locality-and-encapsulation-my-students-presentation-at-the-tic-summer-school/">presentation</a> I gave at the summer school earlier. In the following posts, I will report a bit about the lectures of the summer school, similar to my posts about the <a href="http://www.stefan-marr.de/tag/tpli/">TPLI summer school</a> of last year.</p>
<p>Like last year, my thanks go to <a href="http://www.fwo.be/">FWO</a> and the <a href="http://web.me.com/vitekj/TIC10/Welcome.html">summer school</a>, for providing me with grants to cover all the costs. Thanks <img src='http://soft.vub.ac.be/~smarr/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The first two days covered four different topics. <a href="http://www.adamwelc.org/">Adam Welc</a> started with an introduction to <em>Software Transactional Memory</em>, <a href="http://www.irisa.fr/prive/talpin/">Jean-Pierre Talpin</a> gave lectures on the topic <em>Virtual Prototyping Embedded Architectures</em>, <a href="http://research.microsoft.com/en-us/people/satnams/">Satnam Singh</a> reported on his experience with <em>Data-Parallel Programming</em>, and last but not least, <a href="http://www.cl.cam.ac.uk/~pes20/">Peter Sewell</a> introduced us to the mystics of hardware memory models with his talk titled <em>Low-Level Concurrency – For Real</em>.</p>
<h3>Adam Welc: Software Transactional Memory</h3>
<p>Adam, who works for <a href="http://whatif.intel.com/">Intel Labs</a>, talked in his first presentation mainly about the semantics of STM and the different approaches for designing a STM system. The second presentation concentrated on how the implementation of such a system could work.</p>
<p>His presentations were very much in the spirit of <a href="http://software.intel.com/en-us/articles/intel-c-stm-compiler-prototype-edition-20/">the STM system Intel provides as a prototype</a>, but the general ideas are used in other systems as well.</p>
<p>The different options for semantics of an STM included open or closed transaction nesting, transaction flattening as well as abort and retry. Furthermore, he discussed the interaction for instance with legacy code, which leads to the question of weak and strong atomicity properties, or the semantics of single global lock atomicity. The last semantic question he discussed was how consistency should be provided, and how pointer-privatization could be supported by the system. Afterwards, he outlined the design space for STM systems, introducing optimistic vs. pessimistic transactions as well as write buffering vs. in-place updates.</p>
<p>In the second talk, he presented the implementation details.</p>
<p>For their C++-based STM the compiler needs additional information about the characteristics of all code, which is done by annotations on class and method level. Similar, the compiler supports atomic blocks, abort, and retry statements. Beside all the implementation details, he also discussed several optimizations the compiler attempts to reduce the STM overhead with regard to read/write-barriers wherever possible. My gut feeling tells me, someone should write a STM+TracingJIT story. Not sure whether that buys anything, but what I have seen with STM looks a lot like the trace-guards.</p>
<p>The last slides he presented were about performance. The basic conclusion still is: performance is an issue. However, he gave me an interesting pointer to one of his papers, which basically states, that transaction can be used for looks without contention, quite straight forwardly: <a href="http://dx.doi.org/10.1007/11785477_8">Transparently reconciling transactions with locking for Java synchronization</a>.</p>
<h3>Jean-Pierre Talpin: Virtual Prototyping Embedded Architectures</h3>
<p>Unfortunately, I missed the introductorily part of these lectures due to problems with our accommodation *sigh*. However, as far as I understood, in the domain of embedded systems for large scale applications like aircrafts, there is always a need to combine a large number of different technologies, and the final goal is to simulate, analyze, and verify the software before it is deployed into production use. Especially the verification part is important for critical systems like in avionics.</p>
<p>The systems in this domain are mostly event driven, i.e., in his terminology it is an asynchronous composition of reactive processes.</p>
<p>For these purpose, they developed Polychrony including an Eclipse integration. It allows using data-flow models for computation and mode automata for control. These models are verified with model-checking techniques and allow controller synthesis.</p>
<p>At the heart of this system is a data-flow language, which allows expressing such an asynchronous event system in terms of synchronous modules, which have better characteristics with respect to verification. Furthermore, they established the means to prove certain correctness criteria.</p>
<p>For an aerospace project, they used this as a basis and code-generation framework. One of their techniques uses a SSA as an intermediate representation to model existing software. They use SSA to translate the input to their synchronous data-flow formalism enabling their analysis’.</p>
<h3>Satnam Singh: Data-Parallel Programming</h3>
<p>The motivation behind his work is to allow users to utilize parallelism in a civil manner, i.e., with a reasonable effort/gain ratio. His premise is that programming models like SIMD, OpenMP, and MPI are inherently low-level and require very detailed knowledge about the target architecture, which restricts their applicability. Not only increases it the development cost, but it also restricts the application to a single platform. With the <a href="http://connect.microsoft.com/acceleratorv2">Microsoft Accelerator</a>, they develop a high-level data-parallel library to target various platforms, starting with standard multi-core CPUs with SIMD instruction extensions, GPGPUs, and FPGAs.</p>
<p>The user describes the computation by defining a data-flow graph, which describes the intention instead of the detailed mapping to an execution. Most notably, they provide parallel array structures, on which operations can be performed without necessarily using an index, but deferring these details to the runtime, which can optimize the relevant array operations for the target architecture. Furthermore, it provides certain standard mechanisms to work in a data-parallel way. This includes various operations on the parallel arrays, which for instance can be combined with appropriate reduce operations. An important operation he emphasized is the array shift operation, which is extensively used to describe necessary data transformations. Instead of doing these kind of transformations explicitly, the runtime system can highly-optimize them to the target platform.</p>
<p>The resulting program description is just-in-time compiled for the target machine, and only then executed. For the typical problems they are approaching, the construction of the program describing graph and the JIT overhead are negligible.</p>
<p>However, this form of nested data parallelism brings also some problems. Especially the distribution of the problem over the computing platform is hard since the shape of the resulting computational graph depends on the input data.</p>
<h3>Peter Sewell: Low-Level Concurrency – For Real</h3>
<p>The basic conclusion of his talk is: it is impossible to write portable, correct, and efficient concurrent code for any existing hardware platform, because they do not actually tell you all the constrains/properties in their specifications.</p>
<p>So he basically starts to rant about all processor manufacturers and their specs. He starts with a seemingly simple example, and demonstrates that the expected outcome is not guaranteed.</p>
<p>Then he goes on and describes various examples for x86 and relates them to the tricks a CPU applies, which result in rather weak memory models.</p>
<p>Based on that, he presents a model they developed called x86-TSO (Total Store Order), which allows to reason about the correctness of concurrent x86 programs. This model is eventually used to introduce the notion of <a href="http://www.cl.cam.ac.uk/~so294/documents/ecoop10.pdf">triangular races</a>. This allows to reason about a class of programs, which can contain data races, for instance lock implementations.</p>
<p>From here, he goes on to rant about all the other existing hardware architectures and their semantics or lack of specification. They tried for years to come up with a formal model like x86-TSO but failed.</p>
<p>To conclude his lectures, he presents 10 different options how to define a sane memory model for instance for a programming language. He starts out with option 1: DON’T i.e. no concurrency. Well, my personal impression still is, that this is his favorite option. It has several advantages. Especially, it is very simple. In the end he comes to option 10, which means to have a memory model similar to C++0x. It is a data-race free model, which provides low-level concurrency primitives, and allows to break abstractions. Beside the notion of the data-race free part, that is something, I have expected/thought about earlier for a good VM.</p>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2010/06/trends-in-concurrency-2010-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Locality and Encapsulation: My Student&#8217;s Presentation at the TiC Summer School</title>
		<link>http://soft.vub.ac.be/~smarr/2010/05/locality-and-encapsulation-my-students-presentation-at-the-tic-summer-school/</link>
		<comments>http://soft.vub.ac.be/~smarr/2010/05/locality-and-encapsulation-my-students-presentation-at-the-tic-summer-school/#comments</comments>
		<pubDate>Tue, 25 May 2010 09:27:59 +0000</pubDate>
		<dc:creator>Stefan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Encapsulation]]></category>
		<category><![CDATA[Idea]]></category>
		<category><![CDATA[Locality]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[Slides]]></category>
		<category><![CDATA[summer school]]></category>
		<category><![CDATA[TiC'10]]></category>
		<category><![CDATA[Virtual Machines]]></category>

		<guid isPermaLink="false">http://soft.vub.ac.be/~smarr/?p=297</guid>
		<description><![CDATA[On the first day here at the summer school, the organizers gave us the opportunity to present our research ideas to the lecturers and other participants. I presented my idea on extending the virtual machine models with explicit support for concurrency models. My brief presentation focused on using multiple-language virtual machines to provide support for [...]]]></description>
			<content:encoded><![CDATA[<p>On the first day here at the summer school, the organizers gave us the opportunity to present our research ideas to the lecturers and other participants.</p>
<p>I presented my idea on extending the virtual machine models with explicit support for concurrency models. My brief presentation focused on using multiple-language virtual machines to provide support for domain-specific concurrent languages. It basically states the question whether it is possible to use the concepts of locality and encapsulation as a common foundation for a wide range of different models. Since I am at the very beginning of working on this specific idea, there aren&#8217;t any answers yet.</p>


<div style="width:425px" id="__ss_4284861"><object id="__sse4284861" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=encapsulation-and-locality-final-100524234608-phpapp02&#038;rel=0&#038;stripped_title=encapsulation-and-locality-a-foundation-for-concurrency-support-in-multilanguage-vms" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4284861" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=encapsulation-and-locality-final-100524234608-phpapp02&#038;rel=0&#038;stripped_title=encapsulation-and-locality-a-foundation-for-concurrency-support-in-multilanguage-vms" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://soft.vub.ac.be/~smarr/2010/05/locality-and-encapsulation-my-students-presentation-at-the-tic-summer-school/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>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 [...]]]></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>
	</channel>
</rss>
