<?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-13576821</id><updated>2012-02-13T11:17:14.940+02:00</updated><title type='text'>A Vatful of Fluid</title><subtitle type='html'>Random thoughts on theory of programming languages by &lt;a href="http://www.blogger.com/profile/10262353671943780684"&gt;Andris Birkmanis&lt;/a&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>65</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13576821.post-2292468347060217411</id><published>2008-02-12T13:56:00.000+02:00</published><updated>2008-02-12T14:01:15.086+02:00</updated><title type='text'>A Distributed Object-Oriented Language with Session Types</title><content type='html'>Abstract:&lt;br /&gt;&lt;blockquote&gt;In the age of the world-wide web and mobile computing, programming communication-centric software is essential. Thus, programmers and program designers are exposed to new levels of complexity, such as ensuring the correct composition of communication behaviours and guaranteeing deadlock-freedom&lt;br /&gt;of their protocols.&lt;br /&gt;This paper proposes the language L&lt;sub&gt;doos&lt;/sub&gt;, a simple distributed object-oriented language augmented with session communication primitives and types. L&lt;sub&gt;doos&lt;/sub&gt; provides a flexible object-oriented programming style for structural interaction protocols by prescribing channel usages within signatures of distributed classes.&lt;br /&gt;We develop a typing system for L&lt;sub&gt;doos&lt;/sub&gt; and prove its soundness with respect to the operational semantics. We also show that in a well-typed L&lt;sub&gt;doos&lt;/sub&gt; program, there will never be a connection error, a communication error, nor an incorrect completion between server-client interactions. These results demonstrate that a consistent integration of object-oriented language features and session types offers a compositional method to statically check safety of communication protocols.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-2292468347060217411?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://citeseer.ist.psu.edu/727795.html' title='A Distributed Object-Oriented Language with Session Types'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/2292468347060217411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=2292468347060217411' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2292468347060217411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2292468347060217411'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2008/02/abstract-in-age-of-world-wide-web-and.html' title='A Distributed Object-Oriented Language with Session Types'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-5883966986962575006</id><published>2008-01-02T15:28:00.000+02:00</published><updated>2008-01-02T15:37:06.462+02:00</updated><title type='text'>Ticket-passing style?</title><content type='html'>Upon further reflection, I think it does not make sense for application programmer to control CPU distribution down to the ticks.&lt;br /&gt;This would over-specify the scheduling requirements, which often are quite lax.&lt;br /&gt;Presence of multiple physical processors makes the situation even worse.&lt;br /&gt;&lt;br /&gt;What probably makes sense is to allow the application developer to explicitly track the separate computation parts, assigning to them various properties, and enabling two-way reflective link between the programmer and the real scheduler.&lt;br /&gt;&lt;br /&gt;Think of this as a task management system, e.g., Jira.&lt;br /&gt;Persons acting in one role can create tasks, manage their dependencies, deadlines, estimates and priorities, while persons in another role execute the project making sure the tasks are completed at a satisfactory time.&lt;br /&gt;The first role is like one for the application developer, the second one is for the scheduler of the language's runtime.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-5883966986962575006?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/5883966986962575006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=5883966986962575006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5883966986962575006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5883966986962575006'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2008/01/ticket-passing-style.html' title='Ticket-passing style?'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-8240739411558361053</id><published>2007-12-28T11:10:00.000+02:00</published><updated>2007-12-28T11:12:17.139+02:00</updated><title type='text'>Manticore</title><content type='html'>naasking &lt;a href="http://lambda-the-ultimate.org/node/2569#comment-38967"&gt;mentioned&lt;/a&gt; that Manticore has nested schedulers - sounds very interesting, and similar to what I want to achieve in Fluid. Must read that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-8240739411558361053?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://manticore.cs.uchicago.edu/' title='Manticore'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/8240739411558361053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=8240739411558361053' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/8240739411558361053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/8240739411558361053'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/12/manticore.html' title='Manticore'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-2378641625066797314</id><published>2007-12-27T11:55:00.000+02:00</published><updated>2007-12-27T12:53:58.649+02:00</updated><title type='text'>Fluid preManifesto</title><content type='html'>At this point of my life I don't have much time to actively pursue the research I would like to. I decided to make an overview of what is envisioned, so that at least I do not forget that myself when I have spare minute or two.&lt;br /&gt;&lt;br /&gt;Fluid is a codename for programming language/framework/calculus/tool that should enable experiments with and teaching of various approaches to concurrency and possibly parallelism.&lt;br /&gt;During my initial experiments with join calculus I decided that a lot of interesting stuff is being swept under the carpet. For one thing, scheduling of reactions is implicit on one hand, and rigid on the other. What if one had a language in which diving into the gory details of scheduling would be a matter of using some operator, like call/cc is being used to dive into underlying continuations? No scheduling would be left implicit, all interleaving would be deterministic and controlled - mostly using popular constructs from the library in a very lean syntactic way (monadic reflection?), but occasionally giving possibility to do exactly what is needed. At runtime, something similar to engines looks promising.&lt;br /&gt;&lt;br /&gt;The language would follow the maxim &lt;a href="http://www.doc.ic.ac.uk/~rak/papers/algorithm%20=%20logic%20+%20control.pdf"&gt;Algorithm = Logic + Control&lt;/a&gt;, separating declarative part of the solution from the control of when to pursue which way and for how long. It must be possible to ration CPU cycles and other resources based on the perceived relative utility of the computations, as well as to prune the computations that are believed to have too few value to be worth any future resources. This utility-aware side of the research might come close to the mechanism design (most probably the algorithmic branch of it).&lt;br /&gt;&lt;br /&gt;Having outsourced the scheduling to the user code, the next question is how to express the declarative part of the solution. After playing with various alternatives (promises, MVars, channels) I decided that concurrent constraint programming looks most general of them all. But which constraint system to choose? Or should I choose some specific system at all? As control part is very customizable, why not follow the same path in the logical part? I don't yet know the details, or whether it is possible at all, but the idea is to allow user code to define the constraint system as well.&lt;br /&gt;&lt;br /&gt;To put it all in one line: Program = Logic + Control, Your Way, Best Value for Resources!&lt;br /&gt;&lt;br /&gt;I would like to write much more, but my margin (of time) is too small, so I finish here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-2378641625066797314?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/2378641625066797314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=2378641625066797314' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2378641625066797314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2378641625066797314'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/12/fluid-premanifesto.html' title='Fluid preManifesto'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-5349093719039885882</id><published>2007-12-11T13:28:00.000+02:00</published><updated>2007-12-11T13:34:02.382+02:00</updated><title type='text'>A Software Architecture for Distributed Control Systems and Its Transition System Semantics</title><content type='html'>&lt;blockquote&gt;A software architecture for distributed control systems is presented that is based on a shared data space coordination model. The architecture, named SPLICE, is introduced in two steps.First we give the general structure of the coordination model including the shared data space and the basic operations and we define its semantics by means of a transition system. Second we present a transition system for a refinement of the coordination model: data is distributed and replicated across a communication network using a publication-subscription protocol. We also discuss methods in SPLICE for fault-tolerance and the possibility for on-line system modification and extensions.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Similar to Linda, JavaSpaces, and other paradigms of communication via shared store.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-5349093719039885882?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://citeseer.ist.psu.edu/bonsangue98software.html' title='A Software Architecture for Distributed Control Systems and Its Transition System Semantics'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/5349093719039885882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=5349093719039885882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5349093719039885882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5349093719039885882'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/12/software-architecture-for-distributed.html' title='A Software Architecture for Distributed Control Systems and Its Transition System Semantics'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-1023574291524697867</id><published>2007-11-22T10:24:00.000+02:00</published><updated>2007-11-22T10:35:10.449+02:00</updated><title type='text'>SOA kills ORM?</title><content type='html'>Recently I participated in several projects that heavily utilized services (message-based, shared-nothing, over-the-wire thingies). What I noticed is that object/relational mapping (ORM) tools are virtually useless for such projects. Indeed, significant, if not most value of ORM comes from ability to modify values in memory, using OO language constructs for that, and then just synchronize the memory with the database. This functionality goes completely unutilized in typical SOA application, where reads and writes are separated in time, use different objects and acces paths, and in fact can be performed from different machines. E.g., one service can read a list of tasks from the DB and return them as a message to the network peer. After traveling between peers this information (but not this specific object or message) in combination with information from other sources (e.g., user input) can be used to update a specific property of a specific task (written back to the DB). Has need for service/relational (or message/relational) mapping indeed arrived?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-1023574291524697867?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/1023574291524697867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=1023574291524697867' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1023574291524697867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1023574291524697867'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/11/soa-kills-orm.html' title='SOA kills ORM?'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-4511210623270668620</id><published>2007-11-21T10:16:00.000+02:00</published><updated>2007-11-21T10:51:49.540+02:00</updated><title type='text'>JoinJavaScript</title><content type='html'>Sometimes I have to use JavaScript for my daily programming, and while it takes some time to switch to it, it has certain beauty and allows some expressivity missing in "bigger" languages like Java or C#.&lt;br /&gt;&lt;br /&gt;I tried to identify, what features make it shine, and what features might add even more to the mix.&lt;br /&gt;&lt;br /&gt;So great and already present:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Free extension of any object with properties ("every object is a dictionary").&lt;/li&gt;&lt;li&gt;(Limited) introspection ("for in").&lt;/li&gt;&lt;li&gt;Closures as first-class values ("closure is a value", and even "closure is an object").&lt;/li&gt;&lt;li&gt;Prototypes for ad hoc extensibility, e.g., interception  of closure invocation at prototype level.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Potentially great, but missing:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Ergonomic way to qualify property names (a la XML or RDF).&lt;/li&gt;&lt;li&gt;More and deeper interception - e.g., access to properties (get/put/foreach).&lt;/li&gt;&lt;li&gt;More advanced control operators - e.g., co-routines and generators.&lt;/li&gt;&lt;li&gt;Concurrency at language level.&lt;/li&gt;&lt;li&gt;More like a constraint on other features - capability-based security.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I see certain synergy among proposed features, so adding them may not automatically turn the language into a kitchen sink.&lt;/p&gt;&lt;p&gt;I would try to approach features 3 to 5 via join calculus. Now, if I only had time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-4511210623270668620?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/4511210623270668620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=4511210623270668620' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4511210623270668620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4511210623270668620'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/11/joinjavascript.html' title='JoinJavaScript'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-1341931634775353015</id><published>2007-11-18T12:52:00.000+02:00</published><updated>2007-11-18T12:53:30.681+02:00</updated><title type='text'>A Methodology and Tool for Top-down Relational Database Design</title><content type='html'>&lt;blockquote&gt;This paper presents a methodology for logical design of relational schemas and integrity constraints&lt;br /&gt;using semantic binary schemas. This is a top-down methodology. In this methodology,&lt;br /&gt;a conceptual description of an enterprise is designed using a semantic binary model.&lt;br /&gt;Then, this description is converted into the relational database design.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-1341931634775353015?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://citeseer.ist.psu.edu/rishe93methodology.html' title='A Methodology and Tool for Top-down Relational Database Design'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/1341931634775353015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=1341931634775353015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1341931634775353015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1341931634775353015'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/11/methodology-and-tool-for-top-down.html' title='A Methodology and Tool for Top-down Relational Database Design'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-8992382368037469487</id><published>2007-11-18T12:05:00.000+02:00</published><updated>2007-11-18T12:23:40.933+02:00</updated><title type='text'>THE HISTORICAL RELATIONAL DATA MODEL (HRDM) AND ALGEBRA BASED ON LIFESPANS</title><content type='html'>&lt;blockquote&gt;Critical to the design of an historical database model is the representation of the existence of objects across the temporal dimension &amp;mdash; for example, the "birth," "death," or "rebirth" of an individual, or the establishment or dis-establishment of a relationship. The notion of the "lifespan" of a database object is proposed as a simple framework for epressing these concepts. An object's lifespan is simply those periods of time during which the database models the properties of that object. In this paper we propose the historical relational data model (HRDM) and algebra that is based upon lifespans and that views the values of all attributes as functions from time points to simple domains. The model that we obtain is a consistent extension of the relational data model, and provides a simple mechanism for providing both time-varying data and time-varying schemes.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-8992382368037469487?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://archive.nyu.edu/bitstream/2451/14525/1/IS-86-19.pdf' title='THE HISTORICAL RELATIONAL DATA MODEL (HRDM) AND ALGEBRA BASED ON LIFESPANS'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/8992382368037469487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=8992382368037469487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/8992382368037469487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/8992382368037469487'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/11/historical-relational-data-model-hrdm.html' title='THE HISTORICAL RELATIONAL DATA MODEL (HRDM) AND ALGEBRA BASED ON LIFESPANS'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-7579143114826847402</id><published>2007-09-03T10:12:00.000+03:00</published><updated>2007-09-03T11:02:37.463+03:00</updated><title type='text'>Reducibility Between Classes of Port Graph Grammar</title><content type='html'>... by Charles Stewart (a.k.a. cas).&lt;br /&gt;&lt;br /&gt;It is interesting to compare reducability results for PGGs with those for JCs (especially general SPGG in basic SPGG to general JC in core JC).&lt;br /&gt;&lt;br /&gt;As a side note, I start to become uneasy with too complicated encodings... There should be some more fine-grained equivalence than an ability to encode one transformation system in another (something along the lines of &lt;a href="http://citeseer.ist.psu.edu/felleisen90expressive.html"&gt;expressivity&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;For example, the standard encoding of general JC in core JC is not homomorphic in constructs of core JC - implying it is not identity on core JC terms - so this encoding does not prove expressibility of general JC in core JC Felleisen-wise.&lt;br /&gt;&lt;br /&gt;PS: linearity.org seems to be down for some reason.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-7579143114826847402?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://citeseer.ist.psu.edu/stewart01reducibility.html' title='Reducibility Between Classes of Port Graph Grammar'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/7579143114826847402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=7579143114826847402' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7579143114826847402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7579143114826847402'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/09/reducibility-between-classes-of-port.html' title='Reducibility Between Classes of Port Graph Grammar'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-7613444790264473316</id><published>2007-09-01T10:38:00.000+03:00</published><updated>2007-09-03T10:23:30.946+03:00</updated><title type='text'>Core Join Calculus - too hardcore?</title><content type='html'>After looking closely at core JC, and the proposed encoding of full JC in it, I found it unsatisfactory for my taste.&lt;br /&gt;One problem is that the encoding results in "busy-wait" (stuttering non-termination), even if the original term was "normalizing", which makes the chosen notion of equivalence suspicious. Also, the encoding is sufficiently complicated to ask whether analysis of the resulting &lt;em&gt;terms&lt;/em&gt; will be not harder than that of original ones (I recognize that analysis of core JC as a &lt;em&gt;language&lt;/em&gt; is easier than of full JC, though - that's the usual trade-off between complexity of a language and its terms, sometimes exemplified by English vs. Chinese, or binary vs. hex).&lt;br /&gt;&lt;br /&gt;So maybe I want to take a step back, and pick some variant of JC that is not as spartan as core JC. At the moment I see 3 differences between full and core JCs:&lt;br /&gt;1. Polyadic vs. monadic messages (tuples of channels vs. single channels as payload).&lt;br /&gt;2. N joins per definition vs. 1 join per definition.&lt;br /&gt;3. M patterns per join vs. 2 pattern per join.&lt;br /&gt;&lt;br /&gt;I am considering to look closer at the "monadic N M" variant, though in theory one could analyse all combinations, and how they can be encoded in each other (could make a PhD thesis :) ). If one adds to these 3 dimensions another one for allowing or disallowing free names in definitions, this yields 2&lt;sup&gt;4&lt;/sup&gt; = 16 variants. I suspect, though, that one does not need to define encoding for each pair of combinations separately - they all could be factored via few "encoding patterns" (e.g., encoding of N-M JC in 1-2 JC, polyadic JC in monadic JC, and "higher order/closured" JC in "first order/closureless" JC).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-7613444790264473316?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/7613444790264473316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=7613444790264473316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7613444790264473316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7613444790264473316'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/09/core-join-calculus-too-hardcore.html' title='Core Join Calculus - too hardcore?'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-1694985176607289352</id><published>2007-08-30T11:32:00.000+03:00</published><updated>2007-08-30T11:54:08.501+03:00</updated><title type='text'>Defunc'ed Join Calculus, now in Haskell</title><content type='html'>&lt;code&gt;&lt;br /&gt;&gt;module J where&lt;br /&gt;&lt;br /&gt;This module defines alternative semantics for join calculus (JC) by means of providing an interpreter.&lt;br /&gt;&lt;br /&gt;Major differences from standard semantics are:&lt;br /&gt;1. "Kinda closure-converted/defunctionalized" form of object program&lt;br /&gt;- we do not have nested definitions defining scope of names, all pieces of code are "kinda combinators".&lt;br /&gt;2. Making code closed required introducing notion of object instances (data Obj).&lt;br /&gt;- these objects are just identities (plus "vtable"), and could have been defined as just (Int, Code).&lt;br /&gt;- however, this module models identity of the object as history of reactions (joins) that lead to its creation.&lt;br /&gt;3. As all state is carried by messages, the history must be carried by them, as well.&lt;br /&gt;- as a side-effect, we get unlimited stack-, err, graph-trace of the executed program!&lt;br /&gt;- not that this is practical :)&lt;br /&gt;&lt;br /&gt;&gt;import Data.List as List&lt;br /&gt;&gt;import Data.Maybe (listToMaybe)&lt;br /&gt;&lt;br /&gt;Let us model monadic JC, i.e., messages carrying just one channel as their body.&lt;br /&gt;(see http://citeseer.ist.psu.edu/fournet95reflexive.html, Chapter 5).&lt;br /&gt;&lt;br /&gt;Messages are the main part of the system, carrying all its mutable state.&lt;br /&gt;&lt;br /&gt;"cause" is Nothing for primordial messages.&lt;br /&gt;&lt;br /&gt;&gt;data Msg = Msg {to::Channel, body::Channel, cause::Maybe Join} -- ("from" is redundant, as both causes have it as their "to")&lt;br /&gt;&gt;  deriving (Eq, Ord)&lt;br /&gt;&gt;instance Show(Msg) where&lt;br /&gt;&gt;  show (Msg t b Nothing) = (show t)++"("++(show b)++")"&lt;br /&gt;&gt;  show (Msg t b (Just j)) = (show j)++" -&gt; "++(show t)++"("++(show b)++")"&lt;br /&gt;&lt;br /&gt;Join is just a couple of messages that reacted.&lt;br /&gt;&lt;br /&gt;Forward reference: Messages of Join have equal "to", left one has L port id, right one has R.&lt;br /&gt;&lt;br /&gt;&gt;data Join = Join Msg Msg&lt;br /&gt;&gt;  deriving (Eq, Ord)&lt;br /&gt;&gt;instance Show(Join) where&lt;br /&gt;&gt;  show (Join m1 m2) = "&lt;"++(show m1)++", "++(show m2)++"&gt;"&lt;br /&gt;&lt;br /&gt;Channels are destinations of messages (and in standard monadic JC the only payload of messages).&lt;br /&gt;Channels are identified by a pair of object identity and a port.&lt;br /&gt;&lt;br /&gt;&gt;data Channel = Ch {obj::Obj, port::PortId}&lt;br /&gt;&gt;  deriving (Eq, Ord)&lt;br /&gt;&gt;instance Show(Channel) where&lt;br /&gt;&gt;  show (Ch o p) = (show o)++""++(show p)&lt;br /&gt;&lt;br /&gt;As this is core JC, each definition/code/object has just two channels, identified by their port ids - Left or Right.&lt;br /&gt;&lt;br /&gt;&gt;data PortId = L | R&lt;br /&gt;&gt;  deriving (Show, Eq, Ord)&lt;br /&gt;&lt;br /&gt;Obj is in fact a pair of object identity and procedure for handling messages ("kinda vtable").&lt;br /&gt;Identity is formed by NewId qualified by birthjoin (think birthday).&lt;br /&gt;&lt;br /&gt;"birthjoin" is Nothing for primordial objects.&lt;br /&gt;TODO: "code" should not be a part of Eq's "key"&lt;br /&gt;&lt;br /&gt;&gt;data Obj = Obj {id::NewId, code::Code, birthjoin::Maybe Join}&lt;br /&gt;&gt;  deriving (Eq, Ord)&lt;br /&gt;&gt;instance Show(Obj) where&lt;br /&gt;&gt;  show (Obj i _ (Just j)) = (show j)++"-&gt;"++i&lt;br /&gt;&gt;  show (Obj i _ Nothing) = i&lt;br /&gt;&lt;br /&gt;NewId differentiates multiple objects created during reaction to the same join.&lt;br /&gt;In more bytecode-like implementation this would be integer.&lt;br /&gt;&lt;br /&gt;&gt;type NewId = String&lt;br /&gt;&lt;br /&gt;Code is the procedure to react to a join by creating new objects and sending new messages.&lt;br /&gt;Code is closed, and the only input (capabilities!) it has are:&lt;br /&gt;1. Its left and right channels - via ThisChannel&lt;br /&gt;2. Messages in them (parts of the join causing the reaction) - via ThisMsg&lt;br /&gt;3. Channels in newly created objects - via NewChannel&lt;br /&gt;&lt;br /&gt;The reaction is a list of codes for new objects, keyed by their NewIds,&lt;br /&gt;and a list of to/body references for new messages.&lt;br /&gt;TODO: introduce datatypes for these pairs.&lt;br /&gt;&lt;br /&gt;&gt;data Code = Code [(NewId, Code)] [(Ref, Ref)]&lt;br /&gt;&gt;  deriving (Show, Eq, Ord)&lt;br /&gt;&lt;br /&gt;Reference - means for constructing capabilities.&lt;br /&gt;&lt;br /&gt;&gt;data Ref = ThisChannel PortId&lt;br /&gt;&gt;  | ThisMsg PortId&lt;br /&gt;&gt;  | NewChannel NewId PortId&lt;br /&gt;&gt;  deriving (Show, Eq, Ord)&lt;br /&gt;&lt;br /&gt;Config of the system is currently just a list of messages (order is important to define deterministic scheduling).&lt;br /&gt;&lt;br /&gt;&gt;type Config = [Msg]&lt;br /&gt;&lt;br /&gt;Context is "a config with a hole". It is assumed that in this implementation hole is at the end of list.&lt;br /&gt;&lt;br /&gt;&gt;type Context = [Msg]&lt;br /&gt;&lt;br /&gt;We follow the usual practice:&lt;br /&gt;1. Find in the config a redex and its surrounding context.&lt;br /&gt;2. Reduce redex.&lt;br /&gt;3. Plug the result back.&lt;br /&gt;&lt;br /&gt;One might use Danvy's refocusing here (link?),&lt;br /&gt;but I am reluctant to optimize for speed just right now.&lt;br /&gt;&lt;br /&gt;Just find the first(!) pair of messages having the same object and having left and right channels as destinations:&lt;br /&gt;&lt;br /&gt;&gt;findRedex :: Config -&gt; Maybe (Join, Context)&lt;br /&gt;&gt;findRedex ms = listToMaybe $ [(Join m1 m2, ms \\ [m1, m2])| m1 &lt;- ms, m2 &lt;- ms, (obj $ to m1) == (obj $ to m2), (port $ to m1) == L, (port $ to m2) == R]&lt;br /&gt;&lt;br /&gt;Basically translate capabilities to channels:&lt;br /&gt;&lt;br /&gt;&gt;reduce :: Join -&gt; [Msg]&lt;br /&gt;&gt;reduce j@(Join l r) = (List.map s2m) sends where&lt;br /&gt;&gt;  Code news sends = code this&lt;br /&gt;&gt;  this = obj $ to l&lt;br /&gt;&gt;  s2m (to, body) = Msg (r2c to) (r2c body) $ Just j&lt;br /&gt;&gt;  r2c (ThisChannel p) = Ch this p&lt;br /&gt;&gt;  r2c (ThisMsg L) = body l&lt;br /&gt;&gt;  r2c (ThisMsg R) = body r&lt;br /&gt;&gt;  r2c (NewChannel i p) = Ch (i2o i) p&lt;br /&gt;&gt;  i2o i = case lookup i news of&lt;br /&gt;&gt;    Just c -&gt; Obj i c $ Just j&lt;br /&gt;&gt;    Nothing -&gt; error ("broken ref "++(show i))&lt;br /&gt;&lt;br /&gt;Put result back into the hole:&lt;br /&gt;&lt;br /&gt;&gt;plugBack :: Context -&gt; [Msg] -&gt; Config&lt;br /&gt;&gt;plugBack c ms = c ++ ms&lt;br /&gt;&lt;br /&gt;TODO: externalise scheduling out of findRedex/plugBack (probably use lazy evaluation - link?).&lt;br /&gt;&lt;br /&gt;Now combine all three functions to make a single step:&lt;br /&gt;&lt;br /&gt;&gt;step :: Config -&gt; Maybe Config&lt;br /&gt;&gt;step c = case findRedex c of&lt;br /&gt;&gt;  Nothing -&gt; Nothing&lt;br /&gt;&gt;  Just (j@(Join l r), c2) -&gt; Just $ plugBack c2 $ reduce j&lt;br /&gt;&lt;br /&gt;And now the most dangerous part, as it is potentially non-terminating (unlike step):&lt;br /&gt;&lt;br /&gt;&gt;run :: Config -&gt; Config&lt;br /&gt;&gt;run c = case step c of&lt;br /&gt;&gt;  Nothing -&gt; c&lt;br /&gt;&gt;  Just c2 -&gt; run c2&lt;br /&gt;&lt;br /&gt;A few examples:&lt;br /&gt;&lt;br /&gt;&gt;c1 = Code [] [(ThisMsg L, ThisMsg R)]&lt;br /&gt;&gt;c2 = Code [] [(ThisMsg L, ThisChannel R), (ThisChannel L, ThisMsg R)]&lt;br /&gt;&gt;--c3 = Code [("x", c2)] [(ThisMsg L, NewChannel "x" L), (ThisMsg R, NewChannel "x" R)]&lt;br /&gt;&lt;br /&gt;&gt;ms1 = [Msg (Ch o1 L) (Ch o2 R) Nothing, Msg (Ch o1 R) (Ch o2 R) Nothing, Msg (Ch o2 L) (Ch o1 L) Nothing]&lt;br /&gt;&gt;  where o1 = Obj "a" c1 Nothing ; o2 = Obj "b" c2 Nothing&lt;br /&gt;&lt;br /&gt;Try "step ms1" and "run ms1" to get an idea.&lt;br /&gt;&lt;br /&gt;The next installment should probably include a little compiler from LC terms to Config.&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-1694985176607289352?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/1694985176607289352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=1694985176607289352' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1694985176607289352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1694985176607289352'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/08/defunced-join-calculus-now-in-haskell.html' title='Defunc&apos;ed Join Calculus, now in Haskell'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-1064268880880636120</id><published>2007-08-27T21:16:00.000+03:00</published><updated>2007-08-27T21:17:31.685+03:00</updated><title type='text'>Programming Languages: Application and Interpretation</title><content type='html'>I have to find time to read this textbook - if only to verify my background.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-1064268880880636120?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.ugrad.cs.ubc.ca/~cs311/2006W1/book-etc/plai-2006-01-15.pdf' title='Programming Languages: Application and Interpretation'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/1064268880880636120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=1064268880880636120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1064268880880636120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1064268880880636120'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/08/programming-languages-application-and.html' title='Programming Languages: Application and Interpretation'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-5996202568105527730</id><published>2007-08-24T12:06:00.000+03:00</published><updated>2007-08-24T12:44:36.746+03:00</updated><title type='text'>"Defunctionalization" of Join Calculus</title><content type='html'>(See &lt;a href="http://www.brics.dk/RS/01/23/"&gt;Defunctionalization at Work&lt;/a&gt; for a background on the defunctionalization technique, &lt;a href="http://citeseer.ist.psu.edu/fournet95reflexive.html"&gt;The reflexive CHAM and the join-calculus&lt;/a&gt; for a background on join calculus.) What I do is not really defunctionalization, but I miss the right term for that.&lt;br /&gt;&lt;br /&gt;Lambda calculus can be encoded in join calculus (JC). Algebraic datatypes can be encoded in either. A decent functional PL (think ML) can be encoded in JC. Yesterday I had an idea of looking at the reversal of this encoding - take a JC term, and tell if it is an image of ML term under this encoding (similar in spirit to recovering user-lambdas from brutally CPSed terms). Better yet, take a JC term and split it into functional and (emmm...) superfunctional pieces.&lt;br /&gt;Then I wandered into implementation ideas, and suddenly decided I need to explore some kind of first order JC. I mean, definitions in JC nest and form structures very similar in spirit to closures. What if I closure-convert JC semantics, tinker it a bit, and them put closures back?&lt;br /&gt;&lt;br /&gt;I analyzed pages 5-6 of the JC paper, and started scribbling. Spoiled by UML, I didn't use sets or functions, only informal diagrams. "I'll validate it later", thought I.&lt;br /&gt;&lt;br /&gt;Everything went fine, until I stumbled upon necessity to construct new instances. Need for elegant generation of fresh names and manifestedly safe references to them was what stopped me... Will have to check literature for inspiration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-5996202568105527730?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/5996202568105527730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=5996202568105527730' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5996202568105527730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5996202568105527730'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/08/defunctionalization-of-join-calculus.html' title='&quot;Defunctionalization&quot; of Join Calculus'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-3939999626838316287</id><published>2007-08-24T12:03:00.000+03:00</published><updated>2007-08-24T12:05:31.639+03:00</updated><title type='text'>An Accidental Simula User: Luca Cardelli</title><content type='html'>A personal view of the history behind the calculus of objects!&lt;br /&gt;&lt;br /&gt;Accidentally, just last night I considered playing with defunctionalized Join Calculus (a good topic for the next post).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-3939999626838316287?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://lucacardelli.name/Slides/2007-08-02%20An%20Accidental%20Simula%20User%20(ECOOP%20Prize).pdf' title='An Accidental Simula User: Luca Cardelli'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/3939999626838316287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=3939999626838316287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/3939999626838316287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/3939999626838316287'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/08/accidental-simula-user-luca-cardelli.html' title='An Accidental Simula User: Luca Cardelli'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-6157130945837249546</id><published>2007-08-18T15:04:00.000+03:00</published><updated>2007-08-18T15:06:30.538+03:00</updated><title type='text'>Analyzing the Environment Structure of Higher-Order Languages using Frame Strings</title><content type='html'>Besides tackling a really fundamental issue, the paper has an interesting preface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-6157130945837249546?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://matt.might.net/papers/might2007dcfa.pdf' title='Analyzing the Environment Structure of Higher-Order Languages using Frame Strings'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/6157130945837249546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=6157130945837249546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/6157130945837249546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/6157130945837249546'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/08/analyzing-environment-structure-of.html' title='Analyzing the Environment Structure of Higher-Order Languages using Frame Strings'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-6427611214455973869</id><published>2007-07-13T19:35:00.000+03:00</published><updated>2007-07-13T19:37:10.717+03:00</updated><title type='text'>Abstract And-Parallel Machines</title><content type='html'>I will have to persuade myself I never read this paper before, as reading it induces a deja vu in me.&lt;br /&gt;&lt;br /&gt;Excellent stuff!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-6427611214455973869?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.cs.huji.ac.il/~naomil/passau.ps' title='Abstract And-Parallel Machines'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/6427611214455973869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=6427611214455973869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/6427611214455973869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/6427611214455973869'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/07/abstract-and-parallel-machines.html' title='Abstract And-Parallel Machines'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-2426883547147577470</id><published>2007-07-09T22:35:00.000+03:00</published><updated>2007-07-09T22:55:09.943+03:00</updated><title type='text'>Multiscale Scheduling: Integrating Competitive and Cooperative Scheduling in Theory and in Practice</title><content type='html'>They touch a lot of ideas I was vaguely exploring on this blog (hierarchical scheduling, scheduling as game, utility-driven scheduling).&lt;br /&gt;&lt;br /&gt;E.g., DAG models are superficially similar to cobs (though cobs are not sequential tasks, they are atomic units of rewriting).&lt;br /&gt;&lt;br /&gt;Hope this program will succeed!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-2426883547147577470?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.cs.cmu.edu/~rwh/papers/sched/desc.pdf' title='Multiscale Scheduling: Integrating Competitive and Cooperative Scheduling in Theory and in Practice'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/2426883547147577470/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=2426883547147577470' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2426883547147577470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2426883547147577470'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/07/multiscale-scheduling-integrating.html' title='Multiscale Scheduling: Integrating Competitive and Cooperative Scheduling in Theory and in Practice'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-1296821796889150767</id><published>2007-07-03T20:46:00.000+03:00</published><updated>2007-07-03T20:47:16.060+03:00</updated><title type='text'>Graph Rewriting Semantics for Functional Programming Languages</title><content type='html'>Something I should have read before pontificating on cobs :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-1296821796889150767?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://citeseer.ist.psu.edu/vaneekelen96graph.html' title='Graph Rewriting Semantics for Functional Programming Languages'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/1296821796889150767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=1296821796889150767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1296821796889150767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1296821796889150767'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/07/graph-rewriting-semantics-for.html' title='Graph Rewriting Semantics for Functional Programming Languages'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-4878615984111318216</id><published>2007-06-24T20:50:00.000+03:00</published><updated>2007-06-24T20:55:38.283+03:00</updated><title type='text'>Preventing Internet Denial-of-Service with Capabilities</title><content type='html'>A topic of DoS attacks has surfaced recently on LtU, so this paper may be relevant to PLs design enough.&lt;br /&gt;&lt;br /&gt;Imagine combining Trickles with this scheme...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-4878615984111318216?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.sigcomm.org/HotNets-II/papers/netcap.pdf' title='Preventing Internet Denial-of-Service with Capabilities'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/4878615984111318216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=4878615984111318216' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4878615984111318216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4878615984111318216'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/06/preventing-internet-denial-of-service.html' title='Preventing Internet Denial-of-Service with Capabilities'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-2451881449870620320</id><published>2007-06-24T20:36:00.000+03:00</published><updated>2007-06-24T20:40:51.984+03:00</updated><title type='text'>Trickles - Stateless High Performance Networking</title><content type='html'>&lt;blockquote&gt;The Trickles network stack is a stateless replacement for TCP and the Berkeley sockets interface. It removes all per-connection state from one endpoint, typically the server, while providing important features such as congestion control, security of server-side state, and support for dynamic content. &lt;br /&gt;&lt;br /&gt;In addition to markedly reduced memory overhead, our server-side stateless stack allows increased flexibility in redirecting network traffic at packet-level granularity, since any server can service any request regardless of past communications history. This enables new functionality in the network layer, such as transparent failover, load balancing, anycast services, and striped download. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I wonder, how well this can be bent to work with multicast.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-2451881449870620320?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.cs.cornell.edu/~ashieh/trickles/' title='Trickles - Stateless High Performance Networking'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/2451881449870620320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=2451881449870620320' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2451881449870620320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2451881449870620320'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/06/trickles-stateless-high-performance.html' title='Trickles - Stateless High Performance Networking'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-218346763745216995</id><published>2007-04-05T13:39:00.000+03:00</published><updated>2007-04-05T13:42:22.564+03:00</updated><title type='text'>Work, work</title><content type='html'>This message is just to make sure Blogger does not write me off as MIA :)&lt;br /&gt;&lt;br /&gt;My family and job responsibilities withdrew my attention from research and blogging, hope I will find some time soon to post some findings/ideas I had since January.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-218346763745216995?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/218346763745216995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=218346763745216995' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/218346763745216995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/218346763745216995'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/04/work-work.html' title='Work, work'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-7793325919484411274</id><published>2007-01-25T15:35:00.000+02:00</published><updated>2007-01-25T17:15:30.470+02:00</updated><title type='text'>Punctuated Data Streams</title><content type='html'>&lt;blockquote&gt;&lt;br /&gt;We explore a kind of stream semantics called punctuated&lt;br /&gt;streams. Punctuations in a stream mark the end of substreams, allowing us to view a&lt;br /&gt;non-terminating stream as a mixture of terminating streams. We introduce three kinds of&lt;br /&gt;invariants to specify the proper behavior of query operators in the presence of punctuation.&lt;br /&gt;Pass invariants unblock blocking operators by defining when such an operator can pass&lt;br /&gt;results on. Keep invariants define what must be kept in local state to continue successful&lt;br /&gt;operation. Propagation invariants define when an operator can pass punctuation on. We&lt;br /&gt;then present a strategy for proving that implementations of these invariants are faithful&lt;br /&gt;to their finite table counterparts.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Some definitions could be streamlined, and typos corrected, but otherwise looks interesting.&lt;br /&gt;I also suspect reformulating the definitions in terms of domain theory might have benefited both reader and writer (less implementation-specific details).&lt;br /&gt;On the other hand, category theory might be an overkill for this...&lt;br /&gt;&lt;br /&gt;Also, can this be seen as a good application for concurrent constraint programming?&lt;br /&gt;On the first glance punctuations look just like constraints.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-7793325919484411274?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.whitworth.edu/Academic/Department/MathComputerScience/Faculty/TuckerPeter/PDF/pstreamFull.pdf' title='Punctuated Data Streams'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/7793325919484411274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=7793325919484411274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7793325919484411274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7793325919484411274'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/punctuated-data-streams.html' title='Punctuated Data Streams'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-793786791169066991</id><published>2007-01-24T10:50:00.001+02:00</published><updated>2007-01-24T14:48:21.672+02:00</updated><title type='text'>Comonadic functional attribute evaluation</title><content type='html'>They relate zippers to comonads. Wow!&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;CoKleisli categories make comonads relevant for analyzing notions of context-dependent&lt;br /&gt;function. If the object D A is viewed as the type of contextually situated&lt;br /&gt;values of A, a context-dependent function from A to B is a map D A -&gt; B in the base&lt;br /&gt;category, i.e., a map from A to B in the coKleisli category. The counit eA : D A -&gt; A&lt;br /&gt;discards the context of its input whereas the coextension k† : D A -&gt; D B of a function k : D A -&gt; B essentially duplicates it (to feed it to k and still have a copy left).&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;No wonder processes looked like zippers to me - they &lt;i&gt;are&lt;/i&gt; about contextually situated values (err, actually computations :( ).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-793786791169066991?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.cs.ioc.ee/tfp-icfp-gpce05/tfp-proc/03num.pdf' title='Comonadic functional attribute evaluation'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/793786791169066991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=793786791169066991' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/793786791169066991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/793786791169066991'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/comonadic-functional-attribute.html' title='Comonadic functional attribute evaluation'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-7087485641956432003</id><published>2007-01-24T10:02:00.000+02:00</published><updated>2007-01-24T10:04:59.470+02:00</updated><title type='text'>Monads, Kleisli Arrows, Comonads and other Rambling Thoughts</title><content type='html'>Simple, and to the point.&lt;br /&gt;&lt;br /&gt;Now I wonder how to generalize this result to stream processors that do not preserve rate (i.e., produce a list to an output stream for each history of the input stream). Generalization to multiple inputs is next.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-7087485641956432003?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://sigfpe.blogspot.com/2006/06/monads-kleisli-arrows-comonads-and.html' title='Monads, Kleisli Arrows, Comonads and other Rambling Thoughts'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/7087485641956432003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=7087485641956432003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7087485641956432003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7087485641956432003'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/monads-kleisli-arrows-comonads-and.html' title='Monads, Kleisli Arrows, Comonads and other Rambling Thoughts'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-8849635254881861016</id><published>2007-01-23T13:30:00.000+02:00</published><updated>2007-01-23T13:31:47.197+02:00</updated><title type='text'>The Theory of Timed I/O Automata</title><content type='html'>Especially note receptiveness.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-8849635254881861016?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://theory.lcs.mit.edu/tds/papers/Kirli/mainfinal.pdf' title='The Theory of Timed I/O Automata'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/8849635254881861016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=8849635254881861016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/8849635254881861016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/8849635254881861016'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/theory-of-timed-io-automata.html' title='The Theory of Timed I/O Automata'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-7047749758452344730</id><published>2007-01-23T12:51:00.000+02:00</published><updated>2007-01-23T12:52:34.936+02:00</updated><title type='text'>What kind of logic is “Independence Friendly” logic?</title><content type='html'>&lt;blockquote&gt;In a series of singular, thought-provoking publications in recent years, Jaakko&lt;br /&gt;Hintikka has vigorously promoted consideration of an extension of first-order logic called&lt;br /&gt;IF logic, along with claims that its adoption promises to have revolutionary&lt;br /&gt;consequences. My main purpose here is to examine in what sense it deserves to be called&lt;br /&gt;a logic.&lt;/blockquote&gt;&lt;br /&gt;Uh-oh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-7047749758452344730?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://math.stanford.edu/~feferman/papers/hintikka_iia.pdf' title='What kind of logic is “Independence Friendly” logic?'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/7047749758452344730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=7047749758452344730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7047749758452344730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/7047749758452344730'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/what-kind-of-logic-is-independence.html' title='What kind of logic is “Independence Friendly” logic?'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-4495206260292876983</id><published>2007-01-19T21:54:00.000+02:00</published><updated>2007-01-19T21:56:38.109+02:00</updated><title type='text'>A REVOLUTION IN LOGIC?</title><content type='html'>I wanted to compare IF logic to computability logic for a long time. Must find time to do that soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-4495206260292876983?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.hf.uio.no/ifikk/filosofi/njpl/vol1no2/revolution/revolution.pdf' title='A REVOLUTION IN LOGIC?'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/4495206260292876983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=4495206260292876983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4495206260292876983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4495206260292876983'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/revolution-in-logic.html' title='A REVOLUTION IN LOGIC?'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-5497027366432901695</id><published>2007-01-19T18:44:00.000+02:00</published><updated>2007-01-20T17:01:47.604+02:00</updated><title type='text'>Payment as part of game semantics</title><content type='html'>In CL, a semantical object maps each run to a set of possible moves for both players and a currently winning player. One idea would be to replace the latter by payments. I mean, if one uses games as contracts, it makes more sense saying that as a result of our interaction I owe you 10 euro by the end of the year than to say that I lost my contract. As a side effect, it makes possible win/win (or lose/lose) outcomes - I owe you 10 euro by the end of the year, but you owe me 10 dollars by the end of the month. Then again, how to enforce these payments? Sooner or later we must reach some escape hatch for extra-logical enforcement (court?). But I still believe that it may be more useful to come to court asking for 10 euro than asking to make false true.&lt;br /&gt;&lt;br /&gt;Also, when going to court, you want to bring some evidence, or witness. So the outcome is not a boolean, but a scheduled flow of expected payments, each annotated with a witness (a non-repudiable pointer to a move that decided this payment). Note that missing a payment must be interpreted as a move as well - and thus modify the outcome. I wonder, if this can be implemented at least in theory, or there is some metacircular recursion ("it's moves all the way down").&lt;br /&gt;&lt;br /&gt;PS: http://dsns.csie.nctu.edu.tw/research/crypto/HTML/PDF/C82/199.PDF&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-5497027366432901695?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/5497027366432901695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=5497027366432901695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5497027366432901695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5497027366432901695'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/payment-as-part-of-game-semantics.html' title='Payment as part of game semantics'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-145040195205772462</id><published>2007-01-18T13:01:00.000+02:00</published><updated>2007-01-18T15:53:24.516+02:00</updated><title type='text'>Untangling conditions from responsibility</title><content type='html'>I've re-read the introduction to computability logic, and found that I might want to define my own version of it (or at least to try that).&lt;br /&gt;For example, in CL it is not possible to define arbitrary predicates for branching - only those that can be assembled from conjunction and negation. It may sound funny at the first glance (and/not is a sufficient set of operations, as is Sheffer stroke, for example, right?), but this only holds in classical logic - as games are stateful in a way, one should not duplicate them lightheartedly, so some kind of linearity is needed. For example, XOR or EQ cannot be defined using AND and NOT without duplicating the parameters (A XOR B is !(!A &amp; !B) &amp; !(A &amp; B)).&lt;br /&gt;&lt;br /&gt;To overcome this problem, I prospose to replace conjunction and negation in the logic by a branching operator with attached truth table. So NOT A becomes BRANCH(a:A; not a), AND A B - BRANCH(a:A, b:B; a and b), XOR A B - BRANCH(a:A, b:B; a xor b) - where I write truth tables as classical logic formulas for brevity. Note that each subgame is mentioned by branch exactly once.&lt;br /&gt;&lt;br /&gt;I have to explore the issues raised by the fact that now it becomes possible to define branches with not monotonically non-decreasing condition. The previous encoding elegantly combined conditions with switching responsibility. I would like to untangle one from another if only to prove that it was unnecessary. So in addition to replacing and/not by branch, I would like to explicitly annotate choices and quantifications by the party responsible for them, and make this annotation unaffected by branching conditions. This will yield more verbose formulas, but has potential of uncovering some independence between features that were coupled.&lt;br /&gt;&lt;br /&gt;Also, for various reasons, I will use game variables instead of predicates as a base case.&lt;br /&gt;&lt;br /&gt;All in all, game language could be defined as:&lt;br /&gt;G = branch (Seq n G) satisfying (Seq n Bool -&gt; Bool)&lt;br /&gt; | hide x in G by Bool&lt;br /&gt; | choose (Seq n G) by Bool -- in future also dependently-typed version of this&lt;br /&gt; | let x = G in G -- recursion definition&lt;br /&gt; | x -- recursion backlink&lt;br /&gt; | v -- external game variable&lt;br /&gt; | replicate G by Bool -- replication, may add some constraints on cardinality later&lt;br /&gt;&lt;br /&gt;I may want to drop recursion and move to representing games as directed graphs at some point. ATM, textual representation is more handy, though.&lt;br /&gt;&lt;br /&gt;The next installment will probably discuss terms (err, runs) for these types (games) or theories and models of this language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-145040195205772462?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.csc.villanova.edu/~japaridz/ICL.pdf' title='Untangling conditions from responsibility'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/145040195205772462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=145040195205772462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/145040195205772462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/145040195205772462'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/untangling-conditions-from.html' title='Untangling conditions from responsibility'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-6024923235235171081</id><published>2007-01-16T11:21:00.000+02:00</published><updated>2007-01-16T19:03:11.148+02:00</updated><title type='text'>Hard-play model</title><content type='html'>See section 15.&lt;br /&gt;&lt;br /&gt;The type of the process I described previously is similar to hard-play model by Giorgi Japaridze.&lt;br /&gt;In terms of game semantics, the environment can make as many moves as it wants (and as is possible in the current state) by filling the holes and only then to give an opportunity to make a move to the process (by forcing it).&lt;br /&gt;&lt;br /&gt;Hard-play and easy-play models intersect on a practical class of problems, so it might be enough to support only one of them. However, human factors might require suppporting both (or a more general model).&lt;br /&gt;&lt;br /&gt;E.g. (piohiho process):&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;class Process p i o hi ho where&lt;br /&gt; schedule :: (p, Map hi i, Set ho) -&gt; (p, Map ho o, Set hi)&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The environment passes to a process some of the previously requested inputs, and requests some outputs. The process responds by some outputs, and requests some inputs.&lt;br /&gt;Note that while values of both ho and hi must be used linearly, it is allowed to postpone their fullfilment by several steps.&lt;br /&gt;&lt;br /&gt;PS: alterrnatively, to make justification structure more obvious:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;class Process p i o hi ho where&lt;br /&gt; schedule :: (p, Map hi (i, Set ho)) -&gt; (p, Map ho (o, Set hi))&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-6024923235235171081?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.csc.villanova.edu/~japaridz/ICL.pdf' title='Hard-play model'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/6024923235235171081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=6024923235235171081' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/6024923235235171081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/6024923235235171081'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/hard-play-model.html' title='Hard-play model'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-5418977968064998680</id><published>2007-01-15T16:21:00.000+02:00</published><updated>2007-01-15T16:32:00.136+02:00</updated><title type='text'>Indexed Containers</title><content type='html'>Two news. Good one - Conor McBride shows how to type interactive processes (section 7.3: Imperative Interfaces and Container Drivers).&lt;br /&gt;Bad one - the type system involved is quite involved.&lt;br /&gt;&lt;br /&gt;PS: also, I am not yet sure his idea indeed covers non-alternating games, so to say.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-5418977968064998680?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.cs.nott.ac.uk/~ctm/indexed-containers.pdf' title='Indexed Containers'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/5418977968064998680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=5418977968064998680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5418977968064998680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/5418977968064998680'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/indexed-containers.html' title='Indexed Containers'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-4373180087556878889</id><published>2007-01-15T15:17:00.000+02:00</published><updated>2007-01-15T19:12:35.078+02:00</updated><title type='text'>Weakly-typed processes</title><content type='html'>To give a better idea of the process type I mentioned in the previous post, here is its weakly-typed variant:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;class Process p o i h | p -&gt; o i h where&lt;br /&gt; force :: p -&gt; (o, Maybe h, p)&lt;br /&gt; fill :: (p, h, i) -&gt; p&lt;br /&gt; runnable :: p -&gt; Bool&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;Method force obtains an output, a potential hole, and a (new state of the) process.&lt;br /&gt;Method fill fills a hole of the process with an input, obtaining a process.&lt;br /&gt;Method runnable checks whether the process can be forced (at least once).&lt;br /&gt;&lt;br /&gt;I call this variant weakly-typed because it permits various run-time errors (which are type errors for the tiny process language being interpreted). Examples are: forcing unrunnable process, filling a hole that does not belong to a process, filling a hole with a value of wrong type.&lt;br /&gt;&lt;br /&gt;An encoding of the same functionality that statically catches these three errors is left as an exercise for the reader (the first one is easy, while the remaining require either dependent types or unwieldy tricks, I believe - one approach would be to carry in type of a process a boolean representing runnability and a map from holes represented as Peano numbers to their types - and I do not see how to make types that differ only by order of holes to be equal).&lt;br /&gt;&lt;br /&gt;PS: idea, instead of Map Nat Type I can have [Maybe Type], which has simpler equality. However, the latter type either grows unboundedly as process evolves, or requires reuse of garbage (i.e, Nothing) slots. GC at type level, anyone? :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-4373180087556878889?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/4373180087556878889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=4373180087556878889' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4373180087556878889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4373180087556878889'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/weakly-typed-processes.html' title='Weakly-typed processes'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-1564597988451904231</id><published>2007-01-15T11:07:00.000+02:00</published><updated>2007-01-15T11:44:41.227+02:00</updated><title type='text'>Number-parameterized types</title><content type='html'>Yesterday I played with number-parameterized types in Haskell (actually, GHC).&lt;br /&gt;The ultimate goal was to create a type for a process, that when forced, pops out an output and another process, which can be forced again, etc. The environment can later graft inputs at the places in the process that popped outputs (not necessarily in the order of outputs, but keeping correspondence between inputs and outputs). E.g., process can request an input from a file, then from a keyboard, then environment will provide it with input from a keyboard, and then from file. To complicate the issue even more, different choices of outputs have different options for inputs (so types of inputs are indexed by values of outputs).&lt;br /&gt;&lt;br /&gt;I started from more modest types to make sure I understand what I am doing.&lt;br /&gt;First I needed a couple of phantom types to build arithmetic on types:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;data Z -- 0 inhabitants&lt;br /&gt;data S a = L a -- as much inhabitants as in a&lt;br /&gt;&lt;br /&gt;class Sum a b c  a b -&gt; c&lt;br /&gt;instance Sum Z a a&lt;br /&gt;instance Sum a (S b) c =&gt; Sum (S a) b c&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Among other things, this enabled me to build sequences parameterized by their size:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;data Seq a s = Seq [a]&lt;br /&gt; deriving Show&lt;br /&gt;&lt;br /&gt;nil :: Seq a Z&lt;br /&gt;nil = Seq []&lt;br /&gt;&lt;br /&gt;cons :: a -&gt; Seq a m -&gt; Seq a (S m)&lt;br /&gt;cons h (Seq t) = Seq (h:t)&lt;br /&gt;&lt;br /&gt;app :: Sum m n s =&gt; Seq a m -&gt; Seq a n -&gt; Seq a s&lt;br /&gt;app (Seq m) (Seq n) = Seq (m ++ n)&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note that I use ordinary lists inside Seq, so I can reuse all their operations (e.g., ++).&lt;br /&gt;&lt;br /&gt;Next step would be to convert ordinary lists to sequences.&lt;br /&gt;For that, I choose to bundle sequences with their lenght representation in an existential package. First, I define a type for representation of naturals:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;data NatRep s = NatRep Int&lt;br /&gt; deriving Show&lt;br /&gt;&lt;br /&gt;z :: NatRep Z&lt;br /&gt;z = NatRep 0&lt;br /&gt;&lt;br /&gt;s :: NatRep a -&gt; NatRep (S a)&lt;br /&gt;s (NatRep n) = NatRep $ n+1&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I could have done the following:&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;data Nat = Zero | Succ Nat&lt;br /&gt; deriving Show&lt;br /&gt;&lt;br /&gt;data NatRep s = NatRep Nat&lt;br /&gt; deriving Show&lt;br /&gt;&lt;br /&gt;z :: NatRep Z&lt;br /&gt;z = NatRep Zero&lt;br /&gt;&lt;br /&gt;s :: NatRep a -&gt; NatRep (S a)&lt;br /&gt;s (NatRep n) = NatRep $ Succ n&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;, but decided to keep Peano arithmetic restricted to types.&lt;br /&gt;&lt;br /&gt;Now I am equipped with tools to create dynamically typed sequences parameterized by their size (quite a mouthful):&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;data DynSeq a = forall m . DynSeq (NatRep m) (Seq a m)&lt;br /&gt;instance Show a =&gt; Show (DynSeq a) where&lt;br /&gt; show (DynSeq n sq) = "(DynSeq " ++ (show n) ++ " " ++ (show sq) ++ ")"&lt;br /&gt;&lt;br /&gt;toDynSeq :: [a] -&gt; DynSeq a&lt;br /&gt;toDynSeq [] = DynSeq z nil&lt;br /&gt;toDynSeq (a:as) = case toDynSeq as of DynSeq n sq -&gt; DynSeq (s n) $ cons a sq&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;A couple of surprizes notwithstanding (inability to derive Show for DynSeq, or to use pattern with DynSeq in either let or where), it was quite easy (if not optimal, should I have used GADTs?). Also, I suspect that the decision to use lists inside Seq and Int inside DynSeq will bite me more than once. Also, I am not comfortable with the approach of using functions like nil and cons instead of constructors, this may hinder compiler to help me.&lt;br /&gt;&lt;br /&gt;Will have to think about ways to reach the ultimate goal now...&lt;br /&gt;&lt;br /&gt;See also &lt;a href="http://okmij.org/ftp/README.html"&gt;http://okmij.org&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;PS: I am using the following options:&lt;br /&gt;{-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances #-}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-1564597988451904231?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.haskell.org/tmrwiki/NumberParamTypes' title='Number-parameterized types'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/1564597988451904231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=1564597988451904231' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1564597988451904231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1564597988451904231'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/number-parameterized-types.html' title='Number-parameterized types'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-2517663236078582565</id><published>2007-01-13T19:02:00.000+02:00</published><updated>2007-01-13T19:06:18.197+02:00</updated><title type='text'>Helping in a multiprocessor environment</title><content type='html'>&lt;blockquote&gt;Helping occurs when a thread A wants to lock an object that is already locked by another thread B. Instead of blocking, A donates time to B, helping it to finish its critical section. Helping is an implementation of priority inheritance.&lt;/blockquote&gt;&lt;p&gt;So I learned that the idea I use in my interpreter is in fact widely known and used. No wonder.&lt;/p&gt;&lt;p&gt;Will have to add this line of research to my reading list.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-2517663236078582565?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://i30www.ira.uka.de/~kevinelp/workshop/papers/peter.pdf' title='Helping in a multiprocessor environment'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/2517663236078582565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=2517663236078582565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2517663236078582565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/2517663236078582565'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/helping-in-multiprocessor-environment.html' title='Helping in a multiprocessor environment'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-1485620835357942719</id><published>2007-01-08T12:39:00.000+02:00</published><updated>2007-01-08T12:40:48.419+02:00</updated><title type='text'>Extending the Multilisp Sponsor Model</title><content type='html'>That's the paper I should have read a long time ago!&lt;br /&gt;It would give me the use cases to test my ideas against.&lt;br /&gt;Now, I hope I will have more motivation to hack up some running code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-1485620835357942719?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://lambda-the-ultimate.org/node/1968' title='Extending the Multilisp Sponsor Model'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/1485620835357942719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=1485620835357942719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1485620835357942719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/1485620835357942719'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2007/01/extending-multilisp-sponsor-model.html' title='Extending the Multilisp Sponsor Model'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-4640905482009641685</id><published>2006-12-31T19:20:00.000+02:00</published><updated>2006-12-31T20:34:53.240+02:00</updated><title type='text'>Design of the Kernel Language for the Parallel Inference Machine</title><content type='html'>Looks like all my fooling around with cobs and application-level scheduling is very similar to Flat GHC/KL1 from the Japanese Fifth Generation Computer Systems project.&lt;br /&gt;They were doing this stuff when I was learning my first programming lessons :)&lt;br /&gt;&lt;br /&gt;PS: actually, &lt;a href="http://citeseer.ist.psu.edu/ueda94moded.html"&gt;http://citeseer.ist.psu.edu/ueda94moded.html&lt;/a&gt; is closer to my ideas.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-4640905482009641685?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://citeseer.ist.psu.edu/ueda90design.html' title='Design of the Kernel Language for the Parallel Inference Machine'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/4640905482009641685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=4640905482009641685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4640905482009641685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/4640905482009641685'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/12/design-of-kernel-language-for-parallel.html' title='Design of the Kernel Language for the Parallel Inference Machine'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-116653639686608162</id><published>2006-12-19T15:50:00.000+02:00</published><updated>2006-12-19T15:59:31.916+02:00</updated><title type='text'>Simultaneousity induced by causality</title><content type='html'>A really quick note - when lifting functions to event processing, their inputs must happen simultaneously. One idea for simultaneosity in absence of global clocks is to define events as simultaneous iff their causes are equal.&lt;br /&gt;&lt;br /&gt;More generally, all uses of timestamps might be replaced by causes. All these partial orders start looking similar to domain theory...&lt;br /&gt;&lt;br /&gt;I will need to check how far this can get me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-116653639686608162?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/116653639686608162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=116653639686608162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/116653639686608162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/116653639686608162'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/12/simultaneousity-induced-by-causality.html' title='Simultaneousity induced by causality'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-116600717582063202</id><published>2006-12-13T12:41:00.000+02:00</published><updated>2006-12-13T12:52:55.840+02:00</updated><title type='text'>Unitstreams</title><content type='html'>Another random thought:&lt;br /&gt;&lt;br /&gt;I got curious, what would be the minimum abstraction needed to describe communication between agents. One obvious solution would be bitstreams (streams of booleans). On the other hand, it is not the minimal one - if one thinks about computer networks, at the electrical level they do not use streams of bits. Superficially, setting potential on the line to either low or high can be thought as sending a bit, but actually the bitstreams sent this way are very limited - namely only streams with alternating bits can be encoded this way. And informational difference between all streams of units and those streams of bits where bits alternate is very small - just one bit per whole stream! By that I mean that a timestamped sequence of units [(), (), ()] corresponds to one of the two timestamped sequences of bits: either [0, 1, 0] or [1, 0, 1]. This difference is so negligeble, I believe it can be ignored, so we can pretend that computers communicate to each other using unitstreams (at least at some level). It is very crucial that units in these streams are timestamped, otherwise they cannot carry enough information. Networks rely on the fact that peers are usually not moving fast enough relatively to each other, so their local clocks are good enough to recover timestamps that are not sent explicitly. An interesting question would be whether it is beneficial to model clocks as unitstreams as well, then instead of timestamping units in the stream we instead relate them to units in some other stream (but probably need to ground this induction somewhere - or make it coinduction :) ).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-116600717582063202?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/116600717582063202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=116600717582063202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/116600717582063202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/116600717582063202'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/12/unitstreams.html' title='Unitstreams'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-115858312273294823</id><published>2006-09-18T15:26:00.000+03:00</published><updated>2006-09-18T16:22:01.343+03:00</updated><title type='text'>Causality</title><content type='html'>Denotational semantics of processes is often though of as functions from input stream to output stream.&lt;br /&gt;I already argued that streams are not general enough to represent communication between processes, but let's keep the model simple.&lt;br /&gt;&lt;br /&gt;Function from stream to stream fails to represent one crucial property of the process - which input message must have been fed to the process in order to observe a specific output message. I do not mean data dependency here, but something like control dependency, or causality. Streams (or full orders) are a special case of partial orders that can be used to model causality, so there seems everything is ok - except there is no ordering between elements of input stream and output stream.&lt;br /&gt;Imagine a function from stream of unit to stream of unit:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;data Stream a = Message a (Stream a)&lt;br /&gt;type X = (Stream ()) -&gt; (Stream ())&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There is just one function of type X - identity (non-termination is out of equation as we are talking math functions, not Haskell functions).&lt;br /&gt;On the other hand, there are multiple different behaviors that accept empty messages and output empty messages.&lt;br /&gt;One would be an identity behavior - for each input message send one output message. Another would be a counter - for nth input message send n output messages. By applying a function from Nat to Nat to the definition of the counter, one obtains a new behavior: for nth input message send f(n) output messages. Thus there are infinitely many observably different behaviors of this type, and trying to denote them by a single function is unsatisfactory at least.&lt;br /&gt;&lt;br /&gt;So, the quick solution seems to define a process as a function from input list (a prefix of stream) to a list of outputs produced after receiving the last input (so the whole output list is obtained by concatenating output lists for all prefixes of the input). This may work for a single input stream, but for multiple streams we need to encode which stream received the last message.&lt;br /&gt;&lt;br /&gt;A more general way to look onto this is to say that a process extends a partially ordered set of input messages to a partially ordered set of both input and output messages, with a constraint that it does not introduce PO links to an input message (but obviously is allowed to introduce such links from an input to an output, or between two outputs).&lt;br /&gt;Need to think of a formal (and elegant) way for saying this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-115858312273294823?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/115858312273294823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=115858312273294823' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115858312273294823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115858312273294823'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/09/causality.html' title='Causality'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-115848639555087419</id><published>2006-09-17T12:35:00.000+03:00</published><updated>2006-09-17T21:14:01.176+03:00</updated><title type='text'>Agents as frontiers of futures (or arachnoagents)</title><content type='html'>Imagine truly concurrent constraint programming, but without entailment, or any other appeal to logic. In fact, let's try to separate causality from mechanism of specification of interaction.&lt;br /&gt;&lt;br /&gt;It may be easier to approach this task from FSM angle, or more precisely, ISM - interacting state machines.&lt;br /&gt;Unlike ISM, our machines (cobs?) do not communicate via FIFO streams of messages - to model causality fairfully, a more rich structure is needed (a cobweb).&lt;br /&gt;Each machine can be thought as crowling along links of immutable network of message nodes, producing another network as its output (to be traversed by other machines). Traversion is not destructive - network nodes not referenced by any machine operatonally are GCed, while denotationally they have infinite lifetime.&lt;br /&gt;FIFO streams are a special case of network with strictly linear links.&lt;br /&gt;To support growth, immutable networks have future nodes (promises) at their frontier - and exactly these nodes are referred (and fulfilled) by the owner machine (hind legs of the cob). Readers of the network cannot get past these growth points (with their front legs) until creator resolves them - a typical future/promise, but probably with more low-level operations than usual.&lt;br /&gt;A machine is a unit of authority, while execution as such can have finer grained units.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-115848639555087419?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/115848639555087419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=115848639555087419' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115848639555087419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115848639555087419'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/09/agents-as-frontiers-of-futures-or.html' title='Agents as frontiers of futures (or arachnoagents)'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-115781203857593968</id><published>2006-09-09T17:20:00.000+03:00</published><updated>2006-09-17T14:58:13.906+03:00</updated><title type='text'>Marshalling as a game</title><content type='html'>Investigate the problem of what to put on wire when marshalling (serializing) objects.&lt;br /&gt;Some runtime environments force this decision, at least when it comes to data/code dichotomy.&lt;br /&gt;When it comes to code-is-data view, it becomes very unclear, what should be transferred - think of the reflexive tower - should it be unraveled to its (infinite) roots, or at least down to the fixpoint? What if the receiver of the stream already shares some part of the tower with the sender?&lt;br /&gt;In general, how can they engage in a negotiation that minimizes not only the size of the stream, but also the size of negotiation itself?&lt;br /&gt;&lt;br /&gt;It looks it is not really about streams (that's why I do not really like the term serialization), but about identifying the part of the object that needs to be copied, and then grafting that part onto the receiver's view of world).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-115781203857593968?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/115781203857593968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=115781203857593968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115781203857593968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115781203857593968'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/09/marshalling-as-game.html' title='Marshalling as a game'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-115590936641193915</id><published>2006-08-18T16:38:00.000+03:00</published><updated>2006-09-17T14:59:07.476+03:00</updated><title type='text'>"It's machines all the way down" language</title><content type='html'>Seeing how concurrency support steadily becomes a must-have for a programming language, it's very sad to observe that details of scheduling concurrent processes are almost always hidden from the programmer.&lt;br /&gt;&lt;br /&gt;{Rant about resource-aware programs}.&lt;br /&gt;&lt;br /&gt;Would not it be good to allow the programmer to explicitly provide schedulers when needed? And resource management in general.&lt;br /&gt;&lt;br /&gt;The idea of what I am thinking about goes as follows:&lt;br /&gt;&lt;br /&gt;Execution history of the program forms a tree, where root represents start of the execution (initiated "supernaturally"), edges represent causality, branching represents concurrent execution, some leaves are final and represent completed (quescent??) execution, while other leaves are "growing points" and represent schedulable resumptions or input requests (there is actually not much difference between these later two, you can think about them as tokens in Petri nets). The tree is unfolded by executing resumptions by (potentially) multiple evaluators (machines?), guided by program-provided schedulers (constraints?). Each resumption is a function from evaluator's input to a tree (which can be a final leaf, an input request or a new resumption (growing point leaves), or a more complicated structure). Whenever an evaluator chooses to execute a resumption, it runs it on an input determined by the resumption's position in the tree, and then grafts the resulting tree under the resumption (probably recording the input as well, which may be useful when input is not _uniquely_ determined by the path).&lt;br /&gt;&lt;br /&gt;Virtual machines&lt;br /&gt;To make execution concurrent, resumption may return a "VM" node containing a virtual machine - with its own execution tree and a scheduler. The key is to be able to define the scheduler in the same way as "user" programs.&lt;br /&gt;&lt;br /&gt;Another option is to return a "conc" node containing multiple resumptions - these will merge into the pool (err, tree) of resumptions controlled by the current (virtual) machine, and, respectively, scheduled using its scheduler.&lt;br /&gt;&lt;br /&gt;Schedulers control only fairness of resource consumption, while all synchronisation issues must be dealt with by using "promise".&lt;br /&gt;&lt;br /&gt;Issue: in this design, program is able to consume only one resource at a time - namely, the machine that executes it. How to model multiple resources? And why?&lt;br /&gt;Also: explore potential for join of multiple resumptions - it's dual to the previous - one resource is simultaneously (and even atomically) consumed by multiple processes.&lt;br /&gt;Also: where trust/ownership/responsibility comes into picture?&lt;br /&gt;&lt;br /&gt;Also: vau?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-115590936641193915?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/115590936641193915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=115590936641193915' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115590936641193915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115590936641193915'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/08/its-machines-all-way-down-language.html' title='&quot;It&apos;s machines all the way down&quot; language'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-115420149050855145</id><published>2006-07-29T22:26:00.000+03:00</published><updated>2006-07-29T22:31:30.526+03:00</updated><title type='text'>Membrane contest</title><content type='html'>I am sure there will be enough people knowing the languages mentioned by Paul, and willing to participate.&lt;br /&gt;I wonder, whether I'd better follow a different way, and design a language specifically for implementing membranes... But that would be E.&lt;br /&gt;&lt;br /&gt;Another idea is to explore membrane as a game. 3-player game. A good reason to criticise theories that emphasise 2-player games?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-115420149050855145?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://lambda-the-ultimate.org/node/1635#comment-20004' title='Membrane contest'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/115420149050855145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=115420149050855145' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115420149050855145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115420149050855145'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/07/membrane-contest.html' title='Membrane contest'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-115261574679365402</id><published>2006-07-11T14:01:00.000+03:00</published><updated>2006-07-11T14:02:26.810+03:00</updated><title type='text'>Socially Responsive, Environmentally Friendly Logic</title><content type='html'>This logic looks very interesting, as it covers multiple players.&lt;br /&gt;I still have to understand whether it also supports true concurrency in the sense used in CCP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-115261574679365402?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://lambda-the-ultimate.org/node/1611' title='Socially Responsive, Environmentally Friendly Logic'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/115261574679365402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=115261574679365402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115261574679365402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115261574679365402'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/07/socially-responsive-environmentally.html' title='Socially Responsive, Environmentally Friendly Logic'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-115045518690134190</id><published>2006-06-16T13:51:00.000+03:00</published><updated>2006-06-16T13:53:06.923+03:00</updated><title type='text'>Away for a week</title><content type='html'>I am away for a week to a sea-side, may spend some of this time thinking about Goedel's incompleteness theorem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-115045518690134190?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.research.ibm.com/people/h/hirzel/papers/canon00-goedel.pdf' title='Away for a week'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/115045518690134190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=115045518690134190' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115045518690134190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/115045518690134190'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/06/away-for-week.html' title='Away for a week'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114968574071477232</id><published>2006-06-07T16:03:00.000+03:00</published><updated>2006-06-07T16:09:00.746+03:00</updated><title type='text'>A Hyperdoctrinal View of Constraint Systems</title><content type='html'>The title sounds scary, but this paper is quite thoughtful and looks crucial to understand the importance and beauty of concurrent constraint programming.&lt;br /&gt;&lt;br /&gt;Intuitively, CCP is good because it is so easy and natural to define a denotational semantics for it. This naturality stems from the fact that closure operators are completely defined by sets of their fixpoints, so all combinators on them can be defined in terms of this sets, not functions themselves. And ability to limit attention to closure operators follows from informational approach to computation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114968574071477232?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://citeseer.ist.psu.edu/5812.html' title='A Hyperdoctrinal View of Constraint Systems'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114968574071477232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114968574071477232' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114968574071477232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114968574071477232'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/06/hyperdoctrinal-view-of-constraint.html' title='A Hyperdoctrinal View of Constraint Systems'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114802556570966110</id><published>2006-05-19T10:56:00.000+03:00</published><updated>2006-05-19T10:59:25.720+03:00</updated><title type='text'>Internal Type Theory</title><content type='html'>&lt;blockquote&gt;&lt;br /&gt;In a previous paper I introduced a general notion of simultaneous inductive-recursive definition in intuitionistic type theory. This notion subsumes various reflection principles and seems to pave the way for a natural development of what could be called ``internal type theory'', that is, the construction of models of (fragments of) type theory in type theory, and more generally, the formalization of the metatheory of type theory in type theory. &lt;br /&gt;The present paper is a first investigation of such an internal type theory. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;I am currently reading this paper (when not working on my day job), so the interpreter has to wait.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114802556570966110?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://citeseer.ist.psu.edu/dybjer96internal.html' title='Internal Type Theory'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114802556570966110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114802556570966110' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114802556570966110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114802556570966110'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/05/internal-type-theory.html' title='Internal Type Theory'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114716319183017860</id><published>2006-05-09T11:05:00.000+03:00</published><updated>2006-05-09T11:26:31.850+03:00</updated><title type='text'>Open scheduler. Or open language?</title><content type='html'>I just wanted to add yet another feature to PAL - fairness for units bigger than a single continuation.&lt;br /&gt;Round-robin for continuations is simple, but it does not take into account the creators of continuations (cause/effect tree). As always, it is possible to construct a use case where right scheduling means not only difference in performance, but also in termination; but I will not do that.&lt;br /&gt;Basically, PAL needs a construct to give a programmer control over dividing "CPU time" between sets of continuations. This could be done, for example, by a statement (SplitCPU PerCent Statement Statement) that reduces two statements in parallel by allocating PerCent "CPU cycles" to the first one, and 100-PerCent to the second one. These statements compose with other statements and each other in an obvious way (children sharing percantage of their parent, not the whole 100%).&lt;br /&gt;This looks cool, but what if I want to introduce more constructs? Already I need cancellation of a branch and scheduling of non-CPU resources ("oracles", more on this later). And I see no easy way to implement these constructs via compilation to PAL.&lt;br /&gt;At this moment I decided - why not make PAL user-extendable? It already supports user-extended terms, I plan to support user-provided scheduler, then why not user-provided statements (op-codes)?&lt;br /&gt;In fact, the whole PAL can be just a composition of a set of "features", where each feature is a set of statements, terms, and scheduling rules. The current PAL can be split into three features - promises, cells, and atomic execution.&lt;br /&gt;I already compose terms using a fixpoint of multiple term functors (actually I mix one functor into a base term, but maybe there ways to do that for any number of functors), I hope the same can be done for statements, but composition of schedulers (reduction strategies) looks a bit less clear at the moment.&lt;br /&gt;If this indeed works, I believe it's time to either create a SourceForge project, or write a paper, or both :)&lt;br /&gt;&lt;br /&gt;PS: I have to remember to document my thoughts on efficient implementation of the execution trace tree in the light of composable features.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114716319183017860?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114716319183017860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114716319183017860' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114716319183017860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114716319183017860'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/05/open-scheduler-or-open-language.html' title='Open scheduler. Or open language?'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114707187437669648</id><published>2006-05-08T09:53:00.000+03:00</published><updated>2006-05-08T10:54:02.643+03:00</updated><title type='text'>Plain interpreter. No, compiler.</title><content type='html'>I was a bit ill during the weekend, so instead of going to seashore played with Haskell.&lt;br /&gt;I shot for an interpreter of &lt;a href="http://lambda-the-ultimate.org/node/1454"&gt;Plain&lt;/a&gt; in Haskell, but ended with a compiler from Plain to a STM-like intermediate language (promises and atomic execution - let's call it PAL) and an interpreter for PAL in Haskell (let's call it PVM). This looks promising (pun intended).&lt;br /&gt;&lt;br /&gt;What I need to do before going further is:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Fix implementation of variables in PVM (this is currently a strange hybrid of de Bruijn indices and dynamic scoping).&lt;br /&gt;&lt;li&gt;Express PAL statements in monadic form to simplify writing compiler(s).&lt;br /&gt;&lt;li&gt;Express PVM in monadic form to simplify experimenting with it.&lt;br /&gt;&lt;li&gt;Externalize scheduling (probably in a way of &lt;a href="http://lambda-the-ultimate.org/node/1435"&gt;A Language-Based Approach to Unifying Events and Threads&lt;/a&gt;). Amusingly, an atomic execution could be elegantly expressed as a strict node in the trace tree.&lt;br /&gt;&lt;li&gt;Explore possibilities for a type system for PAL (&lt;a href="http://citeseer.ist.psu.edu/danvy89functional.html"&gt;A Functional Abstraction of Typed Contexts&lt;/a&gt;?).&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114707187437669648?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114707187437669648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114707187437669648' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114707187437669648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114707187437669648'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/05/plain-interpreter-no-compiler.html' title='Plain interpreter. No, compiler.'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114683949189231719</id><published>2006-05-05T17:31:00.000+03:00</published><updated>2006-05-05T17:32:02.020+03:00</updated><title type='text'>Typed Concurrent Programming with Logic Variables</title><content type='html'>&lt;blockquote&gt;&lt;br /&gt;We present a concurrent higher-order programming language called Plain and a &lt;br /&gt;concomitant static type system. Plain is based on logic variables and computes &lt;br /&gt;with possibly partial data structures. The data structures of Plain are procedures, cells, and records. Plain's type system features record-based subtyping, bounded existential polymorphism, and access modalities distinguishing between reading and writing. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;You may want to compare this with &lt;a href="http://citeseer.ist.psu.edu/smolka95oz.html"&gt;The Oz Programming Model&lt;/a&gt; (OPM), which&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;... is a concurrent programming model subsuming higher-order functional and object-oriented programming as facets of a general model. This is particularly interesting for concurrent object-oriented programming, for which no comprehensive formal model existed until now. The model can be extended so that it can express encapsulated problem solvers generalizing the problem solving capabilities of constraint logic programming.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Another paper on OPM is &lt;a href="http://citeseer.ist.psu.edu/collet01operational.html"&gt;The Operational Semantics of Oz&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In short, the model of Plain is based on that of Oz with the main differences being:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Plain statically types programs using a type system with subtyping, while Oz is latently typed.&lt;br /&gt;&lt;li&gt;Therefore Plain chooses to drop support for unification in favor of a single-assignment operation.&lt;br /&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114683949189231719?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://citeseer.ist.psu.edu/581802.html' title='Typed Concurrent Programming with Logic Variables'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114683949189231719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114683949189231719' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114683949189231719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114683949189231719'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/05/typed-concurrent-programming-with.html' title='Typed Concurrent Programming with Logic Variables'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114666197614832269</id><published>2006-05-03T16:08:00.000+03:00</published><updated>2006-05-03T16:12:56.163+03:00</updated><title type='text'>Logical variables?</title><content type='html'>After all, it looks like old good logical variables may be the best solution for a communication between objects.&lt;br /&gt;See, for example, &lt;a href="http://www.sics.se/~sverker/public/papers/aklintro.pdf"&gt;An introduction to AKL&lt;/a&gt; (a precursor of Oz).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://citeseer.ist.psu.edu/claessen00typed.html"&gt;Typed Logical Variables in Haskell&lt;/a&gt; looks like a good introduction to typed logical variables in Haskell (hey, that's written in the title :) ).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114666197614832269?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114666197614832269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114666197614832269' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114666197614832269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114666197614832269'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/05/logical-variables.html' title='Logical variables?'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114664424018810448</id><published>2006-05-03T11:15:00.000+03:00</published><updated>2006-05-03T11:30:37.596+03:00</updated><title type='text'>Backtracking</title><content type='html'>Well, STM's retry is so to say pessimistic - it restarts the whole transaction (up to "atomically" or "orElse") instead of backtracking a single step (one "bind").&lt;br /&gt;&lt;br /&gt;Using (simple) backtracking can be inefficient. As an example, consider again a binary join, which succeeds if both its inputs succeed:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;join [([], []), ([1], []), ([1], [2]), ([1, 3], [2, 4])] = [([1],[2]),([1],[2]),([1],[4]),([3],[2]),([3],[4])]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It can be implemented for any MonadPlus, but there is some inefficiency there:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;join :: MonadPlus m =&gt; m (m a, m b) -&gt; m (m a, m b)&lt;br /&gt;join sab = do&lt;br /&gt;  (sa, sb) &lt;- sab&lt;br /&gt;  a &lt;- sa&lt;br /&gt;  b &lt;- sb -- failure on this unneccesary retries sa, should retry sab&lt;br /&gt;  return (return a, return b)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;What's worse, there is also a difference in semantics. Consider a shocking example, which fails to terminate:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;join [(repeat 1, []), (repeat 1, [2])] = &amp;perp;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This would produce a single answer, and THEN fail to terminate, if it retried sab after failing to read sb:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;join [(repeat 1, []), (repeat 1, [2])] = [(1, 2), &amp;perp;]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note that I cannot fix join by simple moving b &lt;- sb before a &lt;- sa, as they are fully symmetric. What I need is a combinator, which unlike bind would execute actions in parallel, and fail AS SOON as any of them fails. Let's say I need a parallel and - pand. Can I code it in terms of MonadPlus? Let us see...&lt;br /&gt;Aha, a quick googling got me &lt;a href="http://web.cecs.pdx.edu/~apt/wflp03.pdf"&gt;A Monadic Semantics for Core Curry&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114664424018810448?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114664424018810448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114664424018810448' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114664424018810448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114664424018810448'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/05/backtracking.html' title='Backtracking'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114663940892256919</id><published>2006-05-03T09:37:00.000+03:00</published><updated>2006-05-03T10:06:16.220+03:00</updated><title type='text'>Software transactional memory = optimistic transaction isolation + backtracking?</title><content type='html'>While playing with STM, it occurred to me that it actually combines two features: optimistic transaction isolation (OTI), which allows transactions to execute seemingly independently of each other, and backtracking (BT, implemented via retry/orElse/bind in place of fail/or/and), which ensures atomicity.&lt;br /&gt;If one takes care when designing a concurrent language, then OTI becomes unnecessary. For that, it is sufficient to have:&lt;br /&gt;NDW: non-destructive writes - the source of communication cannot undo previous actions, it can only "append" to them.&lt;br /&gt;LRD: localised read and destroy - access to read/destroy operations on communication media is tightly controlled and in some sense local (like a single thread).&lt;br /&gt;MB: monotonic behaviors - behavior cannot fail on an input bigger than one which made it succeed.&lt;br /&gt;Join calculus enjoys all these properties. Indeed, NDW is ensured by writes appending to a multiset of messages, LRD is ensured syntactically by coupling creation of channels with specifying reactions to them, and MB is trivial as well - join calculus behaviors can only fail (which means - block) because of lack of a message, not because of an extra message.&lt;br /&gt;&lt;br /&gt;Why do I think that NDW+LRD+MB obviate OTI?&lt;br /&gt;Because MB ensures it's ok to schedule producer a bit sooner, BT ensures it is ok to schedule consumer a bit sooner, and NDW+LRD+MB ensure it is ok to run producer and consumer in parallel.&lt;br /&gt;One still has to be careful at a very low level of operations - e.g., the multi-processor implementation must ensure atomicity of single writes and reads, but this is easier then full OTI.&lt;br /&gt;&lt;br /&gt;If I am right with this conjecture, it would be cool to try and split STM into two facets, OTI and BT, and see, what happens.&lt;br /&gt;&lt;br /&gt;BTW, isn't BT just a fancy name for Control.Monad.List? :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114663940892256919?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114663940892256919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114663940892256919' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114663940892256919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114663940892256919'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/05/software-transactional-memory.html' title='Software transactional memory = optimistic transaction isolation + backtracking?'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114656059835287975</id><published>2006-05-02T12:02:00.000+03:00</published><updated>2006-05-02T12:03:29.323+03:00</updated><title type='text'>Maude</title><content type='html'>I am away reading &lt;a href="http://maude.cs.uiuc.edu/primer/maude-primer.pdf"&gt;Maude 2.0 Primer&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114656059835287975?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://maude.cs.uiuc.edu' title='Maude'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114656059835287975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114656059835287975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114656059835287975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114656059835287975'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/05/maude.html' title='Maude'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114624938790036527</id><published>2006-04-28T21:35:00.000+03:00</published><updated>2006-04-28T21:36:27.913+03:00</updated><title type='text'>A Language-Based Approach to Unifying Events and Threads</title><content type='html'>Looks like great minds think alike :-)&lt;br /&gt;I have to read this paper to see if I am reinventing a wheel.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114624938790036527?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://lambda-the-ultimate.org/node/1435' title='A Language-Based Approach to Unifying Events and Threads'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114624938790036527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114624938790036527' title='93 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114624938790036527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114624938790036527'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/language-based-approach-to-unifying.html' title='A Language-Based Approach to Unifying Events and Threads'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>93</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114621738406631017</id><published>2006-04-28T12:37:00.000+03:00</published><updated>2006-04-28T12:43:04.080+03:00</updated><title type='text'>Some examples from E</title><content type='html'>I had ten minutes before lunch, and decided to code up a couple of examples from E in Haskell:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;type Cont a = a -&gt; STM ()&lt;br /&gt;&lt;br /&gt;-- Blocking caretaker - requests are blocked until the gate is open&lt;br /&gt;-- Note that the gate can be opened/closed repeatedly.&lt;br /&gt;makeCaretaker :: Cont a -&gt; STM (Cont a, Cont Bool)&lt;br /&gt;makeCaretaker target = do &lt;br /&gt;  enabled &lt;- newTVar True&lt;br /&gt;  return (\m -&gt; do {e &lt;- readTVar enabled ; if e then target m else retry}, writeTVar enabled)&lt;br /&gt;  &lt;br /&gt;-- Overwritable promise.&lt;br /&gt;makePromise :: STM (Cont a, Cont (Cont a))&lt;br /&gt;makePromise = do&lt;br /&gt;  queue &lt;- newTChan&lt;br /&gt;  target &lt;- newTVar Nothing&lt;br /&gt;  return (\m -&gt; do&lt;br /&gt;    t &lt;- readTVar target&lt;br /&gt;    case t of&lt;br /&gt;      Nothing -&gt; writeTChan queue m&lt;br /&gt;      Just r -&gt; r m&lt;br /&gt;    , writeTVar target . Just)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note that both caretaker and promise allow the controller to change its mind - either by repeatedly opening/closing the gate, or by re-resolving the reference. Also, when closed, the caretaker does not signal errors or swallow messages - it keeps the senders blocked. OTOH, promise stores messages in a queue. &lt;br /&gt;Of course, this can be changed (I leave this as an exercise for readers :-) ).&lt;br /&gt;I may consider creating a small library of such patterns and see whether something DSLish comes of it...&lt;br /&gt;But before that I must decide on verification procedure - should I use unit tests or proofs...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114621738406631017?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114621738406631017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114621738406631017' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114621738406631017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114621738406631017'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/some-examples-from-e.html' title='Some examples from E'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114613208814050079</id><published>2006-04-27T11:52:00.000+03:00</published><updated>2006-04-27T13:01:28.466+03:00</updated><title type='text'>STM for CPS</title><content type='html'>I am trying to manually code up some simple programs using a -&gt; STM () as a continuation type...&lt;br /&gt;And, well, I've stumbled upon some problem with types. Consider a type for a cons list expressed in CPS:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;type List a = ((STM (), (a, List a) -&gt; STM ()) -&gt; STM ())&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The first STM () gets executed in case of Nil, the second in case of Cons (getting a pair of car and cdr).&lt;br /&gt;&lt;br /&gt;Unfortunately, this type fails to check in Haskell. I have to grok yet why, and how to work around it. I would hate to use data:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;data List a = List ((STM (), (a, List a) -&gt; STM ()) -&gt; STM ())&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;as this would reduce clarity by boxing unboxing. Compare:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;makeNil :: List a&lt;br /&gt;makeNil (caseNil, _) = caseNil&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;makeNil :: List a&lt;br /&gt;makeNil = List $ \(caseNil, _)-&gt;caseNil&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then again, if I shoot for terseness, then nothing beats:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;makeNil :: List a&lt;br /&gt;makeNil = List fst&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Envisioning code generation for algebraic data types, I arrive to:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;type Cont a = a -&gt; STM ()&lt;br /&gt;&lt;br /&gt;type CaseNil = Cont ()&lt;br /&gt;type CaseCons a = Cont (a, List a)&lt;br /&gt;data List a = List {unList :: Cont (CaseNil, CaseCons a)}&lt;br /&gt;&lt;br /&gt;makeNil :: () -&gt; List a&lt;br /&gt;makeNil payLoad = List  $ \(caseNil, _) -&gt; caseNil payLoad&lt;br /&gt;&lt;br /&gt;makeCons :: (a, List a) -&gt; List a&lt;br /&gt;makeCons payLoad = List $ \(_, caseCons) -&gt; caseCons payLoad&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Hmm, I should consider using currying, after all...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114613208814050079?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114613208814050079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114613208814050079' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114613208814050079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114613208814050079'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/stm-for-cps.html' title='STM for CPS'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114603959577585085</id><published>2006-04-26T10:48:00.000+03:00</published><updated>2006-04-26T11:19:55.790+03:00</updated><title type='text'>Critique</title><content type='html'>The ideas presented so far are not even close to supporting join calculus (however simple it is).&lt;br /&gt;Fluid still falls short in several areas: it is (practically) first-order (so messages do not carry references), it does not support creaition of objects at runtime, it is data flow driven (call it pull-only, or lazy, if you please).&lt;br /&gt;The first problem is caused by the third, which is caused by input devices being the only active sources of messages.&lt;br /&gt;This was caused by the decision to represent outputs of instances as transactionally lazy (STM a)'s, which promised better composability.&lt;br /&gt;Basically, the choice (for a very simple case with one input and one output) is between:&lt;br /&gt;STM i -&gt; STM o -- transaction transformer paradigm, precludes "push", as only the receiving side of the reference is active&lt;br /&gt;and&lt;br /&gt;STM i -&gt; (o -&gt; STM ()) -&gt; STM () -- hey, looks like monadic bind!&lt;br /&gt;&lt;br /&gt;BTW, I suspect that relationship between these two types can be seen as expression of some property of negation in some logic :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114603959577585085?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114603959577585085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114603959577585085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114603959577585085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114603959577585085'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/critique.html' title='Critique'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114597452062981791</id><published>2006-04-25T17:07:00.000+03:00</published><updated>2006-04-25T17:18:36.113+03:00</updated><title type='text'>Devices/distribution = chicken/egg?</title><content type='html'>Obviously, I/O devices and distribution (multiple vats) can be expressed using each other.&lt;br /&gt;For various reasons I prefer to view devices as primitive, and implement distribution via stubs/scions (this is consistent with E paradigm).&lt;br /&gt;&lt;br /&gt;What is not consistent with E paradigm, though, is that a vat ceases to be a single thread - it is a family of threads, namely one thread for (transactional) instances, and one thread for each device. I cannot understand the implications at the moment (mostly for robustness), but this is something to keep an eye on. OTOH, I can always bind this family to a single OS thread, which means I will match E perfectly, right? Must ensure this way of running vats is enforced, though.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114597452062981791?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114597452062981791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114597452062981791' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114597452062981791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114597452062981791'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/devicesdistribution-chickenegg.html' title='Devices/distribution = chicken/egg?'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114597155824608167</id><published>2006-04-25T16:05:00.000+03:00</published><updated>2006-04-25T16:45:58.306+03:00</updated><title type='text'>Some code functions+devices</title><content type='html'>Here is some Haskell code to illustrate my previous post (I cheat a bit with tuples in unary cases):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;-- AND join in workflow terminology.&lt;br /&gt;binaryJoin :: (STM a, STM b) -&gt; STM (a, b)&lt;br /&gt;binaryJoin (sa, sb) = do&lt;br /&gt;  a &lt;- sa&lt;br /&gt;  b &lt;- sb&lt;br /&gt;  return (a, b)&lt;br /&gt;&lt;br /&gt;-- Very simple code function.&lt;br /&gt;inc :: Num a =&gt; STM a -&gt; STM a&lt;br /&gt;inc sa = do&lt;br /&gt;  a &lt;- sa&lt;br /&gt;  return (a+1)&lt;br /&gt;&lt;br /&gt;-- Code that delegates to other code.&lt;br /&gt;add :: Num a =&gt; (STM a, STM a) -&gt; STM a&lt;br /&gt;add inputs = do&lt;br /&gt;  (a, b) &lt;- binaryJoin inputs&lt;br /&gt;  return (a+b)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This code covers so called instances in terminology of &lt;a href="http://www.cypherpunks.to/erights/talks/thesis/markm-thesis.pdf"&gt;Mark's thesis&lt;/a&gt;.&lt;br /&gt;What about devices? For output the answer looks simple: code for output devices has type:&lt;br /&gt;(STM i1, ..., STM im) -&gt; IO (), but such object would probably require a separate thread to run (can we say that's because, unlike STM, IO is not composable?). Thus, I suggest splitting (code for) output devices into a transactional matcher part (if needed at all) of type (STM i1, ..., STM im) -&gt; STM a and a reactive handler part of type a -&gt; IO (). This gives the framework runtime a chance to run matchers transactionally, and only when one of them matches, run the handler.&lt;br /&gt;So, we have (pseudo-Haskell):&lt;br /&gt;data OutputDevice = forall a . OutputDevice ((STM i1, ..., STM im) -&gt; STM a) (a -&gt; IO ())&lt;br /&gt;&lt;br /&gt;What about input devices? The first idea is to type them:&lt;br /&gt;(a -&gt; STM ()) -&gt; IO ()&lt;br /&gt;with the contract that the device performs some input, then applies the (parameterised) transaction to it, then runs it.&lt;br /&gt;Why not just IO a? Deal, I can minimize input device's responsibility by saying the framework will "apply and run",  while the device will just read and return, so the type is:&lt;br /&gt;IO a&lt;br /&gt;&lt;br /&gt;Well, by its nature (blocking input) each input device will be run on a separate thread, injecting its values into the transactional thread via TChan'nels. I don't like this (especially when we dealt with multithreading issues of output devices), but currently see no other alternative. I have to explore the Haskell standard library to see, whether the input is mostly blocking.&lt;br /&gt;If nothing better can be done with input devices, then maybe it makes sense to run output device on separate threads as well, and let STM runtime to handle blocking (so output devices will be typed (STM i1, ..., STM im) -&gt; IO (), or even a -&gt; IO ())...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114597155824608167?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114597155824608167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114597155824608167' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114597155824608167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114597155824608167'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/some-code-functionsdevices.html' title='Some code functions+devices'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114597011740049356</id><published>2006-04-25T15:37:00.000+03:00</published><updated>2006-04-25T16:03:41.876+03:00</updated><title type='text'>Some thoughts</title><content type='html'>Ok, I decided to stop fighting Haskell on the particular technical issues, and instead sit back and think a little.&lt;br /&gt;&lt;br /&gt;What is an object? From the implementors point of view, of course :-)&lt;br /&gt;Let's assume in E tradition that this is something that upon receiving a message can change its state and post a set of messages along the references it holds.&lt;br /&gt;&lt;br /&gt;Nothing interesting so far. It becomes better when we notice that multiple objects often share some logic, which we might call "code" or "class" or "prototype". Let's call it code. What is this code? In Haskell, I postulate, it is natural to see this code as a function from message and object state to set of deliveries and new state. But what is the exact type of this function? Here some experience with join calculus suggest a nice trick: both the state and the messages can be modeled uniformly!&lt;br /&gt;My current proposal is to say that object code is a function of type:&lt;br /&gt;(STM i1, ..., STM im) -&gt; (STM o1, ..., STM on)&lt;br /&gt;The inputs are transactions that represent reading either public "facets" or private "state", and the outputs are transactions that represent either sending messages to other objects or updating private state (in a roundabout way - the transaction must be executed to obtain the "written" value - this simplifies composability of multiple code functions).&lt;br /&gt;(Of course this type can be curried, but I like its simmetry).&lt;br /&gt;is and os stand for (possibly polymorphic) types (not sure yet how to better handle multiple messages on the same ouput - and then, maybe on the same input, as well?).&lt;br /&gt;Note that none of the output types mention the identity of the receiver - they are indeed types of messages, not of deliveries.&lt;br /&gt;&lt;br /&gt;So how and who attaches the receivers to the messages? I say it is responsibility of (the instance of) the object that uses this "code". Note that I ended up with three parties: authors of the code, users of the code, and authors of the framework (that's me!) that are responsible for helping users to use the code easier. Now if only this third party knew how to achieve that :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114597011740049356?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114597011740049356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114597011740049356' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114597011740049356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114597011740049356'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/some-thoughts.html' title='Some thoughts'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114587509341624328</id><published>2006-04-24T13:33:00.000+03:00</published><updated>2006-04-24T13:38:13.440+03:00</updated><title type='text'>No Data.Typeable for polymorphic types :(</title><content type='html'>Alas, after spending some time with Data.Typeable I understood it is (for some reason) limited to monomorphic types.&lt;br /&gt;Thus I hesitate to use it as a way to glue (user) delivery handling functions to the (system) framework.&lt;br /&gt;Hmm, should I invert the logic, and instead of functions from (reading) STMs to Effect use tuples of (writing) STMs and Effect?&lt;br /&gt;&lt;br /&gt;Probably I will get smarter after lunch :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114587509341624328?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114587509341624328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114587509341624328' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114587509341624328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114587509341624328'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/no-datatypeable-for-polymorphic-types.html' title='No Data.Typeable for polymorphic types :('/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114563136250874380</id><published>2006-04-21T17:45:00.000+03:00</published><updated>2006-04-24T15:20:14.713+03:00</updated><title type='text'>The first problem</title><content type='html'>Well, I have the first subset of runtime working - objects with a single facet (so state or concurrency are not possible).&lt;br /&gt;That was surprisingly easy, despite I needed to understand existential types.&lt;br /&gt;&lt;br /&gt;Now I have the first problem - to introduce multi-faceted lexical compounds I need to write a function taking a function from several (let's say n) STM Delivery to Effect and returning exactly n TChan Delivery and an Effect...&lt;br /&gt;A wrong type:&lt;br /&gt;close :: ([STM Delivery] -&gt; Effect) -&gt; ([TChan Delivery], Effect)&lt;br /&gt;as it does not constrain the lengths of the lists to be equal (and worse, operationally close does not know how many channels to create given just a function from a list to effect).&lt;br /&gt;&lt;br /&gt;When I figure out how to do this (either by adding explicit n to the left side of the type, or by some GADT trick), I will generalize the problem to parametric (Delivery o a)...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114563136250874380?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114563136250874380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114563136250874380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114563136250874380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114563136250874380'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/first-problem.html' title='The first problem'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13576821.post-114561017258467560</id><published>2006-04-21T11:50:00.000+03:00</published><updated>2006-04-21T12:05:48.363+03:00</updated><title type='text'>Kick-off</title><content type='html'>Ok, I &lt;a href="http://lambda-the-ultimate.org/node/1414#comment-16195"&gt;said&lt;/a&gt; I will "try and create a toy implementation of E-like system", and so I started this blog to document my thinking and its changes.&lt;br /&gt;&lt;br /&gt;First of all, I am happy to start working on this, as my previous experience with Haskell was limited to school assignments - now I can finally use all the cool features, including type classes, existential types, composable transactions, and more :-)&lt;br /&gt;&lt;br /&gt;I quickly rolled a parser for &lt;a href="http://research.microsoft.com/~fournet/papers/reflexive-cham-join-calculus.ps"&gt;join calculus&lt;/a&gt; using &lt;a href="http://www.cs.uu.nl/~daan/parsec.html"&gt;Parsec&lt;/a&gt;, not that this was needed at the moment, but it was fun and a good warm-up.&lt;br /&gt;&lt;br /&gt;Now I am pondering over the ways to skin... err, to modularize the runtime.&lt;br /&gt;One idea is to have multiple languages interoperating in my vats (word "vat" is used without permission of E authors :-) ), so I want to separate semantics of the process definition language from that of the "robustness framework".&lt;br /&gt;&lt;br /&gt;I will start from defining the notions of delivery (or message), object (the target of deliveries), and effect - what happens upon delivery. I need at least IO effects to model output devices (in terms of &lt;a href="http://lambda-the-ultimate.org/node/1414"&gt;E thesis&lt;/a&gt;), and also (STM [Delivery]) effects to allow objects send messages to other objects (transactionally - in the same vat). I think I will need forall to allow multiple implementations of objects to cooperate... Time to learn some Haskell-fu :-)&lt;br /&gt;&lt;br /&gt;BTW, if you wonder: Fluid is the code name of this project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13576821-114561017258467560?l=vatful.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://lambda-the-ultimate.org/node/1414#comment-16195' title='Kick-off'/><link rel='replies' type='application/atom+xml' href='http://vatful.blogspot.com/feeds/114561017258467560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13576821&amp;postID=114561017258467560' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114561017258467560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13576821/posts/default/114561017258467560'/><link rel='alternate' type='text/html' href='http://vatful.blogspot.com/2006/04/kick-off.html' title='Kick-off'/><author><name>Andris Birkmanis</name><uri>http://www.blogger.com/profile/10262353671943780684</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='21' height='32' src='http://lh6.google.com/_EosB_d900vQ/RZaJyvfJLoI/AAAAAAAAAAY/wZCOu_sjVmc/s1600/A2.jpg'/></author><thr:total>2</thr:total></entry></feed>
