archives

Compile time garbage collection

Compile time garbage collection for the declarative language Mercury, by Nancy Mazur. From the abstract:

"The compiler determines the lifetime of the variables that are created during the execution of the program, and thus also the memory that will be associated with these variables. Whenever the compiler can guarantee that a variable, or more precisely, parts of the memory resources that this variable points to at run-time, will never ever be accessed beyond a certain program instruction, then the compiler can add instructions to deallocate these resources at that particular instruction without compromising the correctness of the resulting code. If the program instruction is followed by a series of instructions that require the allocation of new memory cells, then the compiler can replace the sequence of deallocation and allocation instructions, by instructions updating the garbage cells, hence reusing these cells."

Patrick Logan on Software Transaction Memory

A detailed blog post on STM - and why it is a Bad Thing.

Type-Level Computation Using Narrowing in Omega

Haven't seen this paper by Tim Sheard mentioned on Ltu before. As in previous papers Sheard tries to put Howard Curry to work in terms that are understandable for those that don't have a Phd in type theory.

Abstract:
Omega is an experimental system that combines features of both a programming language and a logical reasoning system. Omega is a language with an infinite hierarchy of computational levels. Terms at one level are classified (or typed) by terms at the next higher level. In this paper we report on using two different computational mechanisms. At the value level, computation is performed by reduction, and is largely unconstrained. At all higher levels, computation is performed by narrowing.

SMP Erlang vs. Haskell vs. ML

(Didn't find this on LtU yet, apologies if it is a dupe.) While all benchmarks are questionable, I found this 3 way comparison for a given concurrency situation to be of interest.

This is a continuation of Parallel Ant Colony Optimization for TSP in Standard ML and Multi-Core Ant Colony Optimization for TSP in Haskell. Here the program has been rewritten in the programming language Erlang.