<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://lambda-the-ultimate.org">
<channel>
 <title>Lambda the Ultimate - Functional</title>
 <link>http://lambda-the-ultimate.org/taxonomy/term/11/0</link>
 <description></description>
 <language>en</language>
<item>
 <title>Partial vectorisation of Haskell programs</title>
 <link>http://lambda-the-ultimate.org/node/2905</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://research.microsoft.com/~simonpj/papers/ndp/partial-vect.pdf&quot;&gt;Partial vectorisation of Haskell programs&lt;/a&gt;. Manuel M. T. Chakravarty, Roman Leshchinskiy, Simon Peyton Jones, and Gabriele Keller, Proc ACM Workshop on Declarative Aspects of Multicore Programming, San Francisco, Jan 2008.&lt;br &gt;
&lt;blockquote &gt;&lt;p &gt;
Vectorisation for functional programs, also called the flattening transformation, relies on drastically reordering computations and restructuring the representation of data types. As a result, it only applies to the purely functional core of a fully-fledged functional language, such as Haskell or ML. A concrete implementation needs to apply vectorisation selectively and integrate vectorised with unvectorised code. This is challenging, as vectorisation alters the data representation, which must be suitably converted between vectorised and unvectorised code. In this paper, we present an approach to partial vectorisation that selectively vectorises sub-expressions and data types, and also, enables linking vectorised with unvectorised modules.&lt;br &gt;
&lt;/blockquote&gt;
&lt;p &gt;
The idea is fairly simple, and utilizes conversion between vectorized and unvectorized representations of the datatypes. A formal translation scheme is provided.&lt;p &gt;
Data Parallel Haskell papers are &lt;a href=&quot;http://research.microsoft.com/~simonpj/papers/ndp/index.htm&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/16">Parallel/Distributed</category>
 <pubDate>Sun, 20 Jul 2008 12:05:14 -0400</pubDate>
</item>
<item>
 <title>Catch me if you can: Towards type-safe, hierarchical, lightweight, polymorphic and efficient error management in OCaml</title>
 <link>http://lambda-the-ultimate.org/node/2892</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.univ-orleans.fr/lifo/Members/David.Teller/publications/ml2008.pdf&quot;&gt;Catch me if you can: Towards type-safe, hierarchical, lightweight, polymorphic and efficient error management in OCaml&lt;/a&gt;, by David Teller, Arnaud Spiwack, Till Varoquaux:&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;This is the year 2008 and ML-style exceptions are everywhere. Most modern languages, whether academic or industrial, feature some variant of this mechanism. Languages such as Java even have a degree of out-of-the-box static coverage-checking for such exceptions, which is currently not available for ML languages, at least not without resorting to external tools.&lt;/p&gt;
&lt;p &gt;In this document, we demonstrate a design principle and a tiny library for managing errors in a functional manner, with static coverage-checking, automatically-inferred, structurally typed and hierarchical exceptional cases, all of this for what we believe is a reasonable run-time cost. Our work is based on OCaml and features simple uses of higher-order programming, low-level exceptions, phantom types, polymorphic variants and compile-time code&lt;br &gt;
rewriting.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;Exhaustively checked, user-friendly exception handling was a bit of an open problem for awhile. As the paper details, languages supported either cumbersome, exhaustively checked polymorphic exceptions, as in Haskell, or we had unchecked easily extensible monomorphic exceptions, as in ML, or we had checked, extensible exceptions using a universal type as in Java.&lt;/p&gt;
&lt;p &gt;Supporting exhaustively checked, easily extensible polymorphic exceptions seemed quite a challenge, which this paper solves using monadic error handling and nested polymorphic variants. The paper also gives a good overview of current techniques of exception checking in OCaml, ie. &lt;a href=&quot;http://caml.inria.fr/pub/old_caml_site/ocamlexc/ocamlexc.htm&quot;&gt;ocamlexc&lt;/a&gt;.&lt;/p&gt;
&lt;p &gt;The performance of such exceptions is understandably lower than native exceptions, given all the thunking and indirection that monads entail. The authors attempt various implementations and test their performance against native exceptions. Ultimately, monadic error management seems acceptable for actual error handling, but not for control flow as native exceptions are sometimes used in OCaml.&lt;/p&gt;
&lt;p &gt;One interesting extension is to consider how efficient the implementations would be given more sophisticated control flow operators, such as continuations, coroutines, or delimited continuations, or whether native exceptions can be salvaged using a type and effects system in place of monads.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/8">Implementation</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/17">Software Engineering</category>
 <pubDate>Fri, 11 Jul 2008 11:16:54 -0400</pubDate>
</item>
<item>
 <title>Functional Netlists</title>
 <link>http://lambda-the-ultimate.org/node/2888</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.postech.ac.kr/~gla/paper/icfp54-park.pdf&quot;&gt;Functional Netlists&lt;/a&gt;, Sungwoo Park, Jinha Kim, Hyeonseung Im. ICFP 2008.&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
In efforts to overcome the complexity of the syntax and the lack of formal semantics of conventional hardware description languages, a number of functional hardware description languages have been developed. Like conventional hardware description languages, however, functional hardware description languages eventually convert all source programs into netlists, which describe wire connections in hardware circuits at the lowest level and conceal all high-level descriptions written into source programs.&lt;/p&gt;
&lt;p &gt;We develop a variant of the lambda calculus, called l-lambda  (linear lambda), which may serve as a high-level substitute for netlists. In order to support higher-order functions, l-lambda  uses a linear type system which enforces the linear use of variables of function type. The translation of l-lambda  into structural descriptions of hardware circuits is sound and complete in the sense that it maps expressions only to realizable hardware circuits and that every realizable hardware circuit has a corresponding expression in l-lambda. To illustrate the use of l-lambda  as a high-level substitute for netlists, we design a simple hardware description language that extends l  with polymorphism, and use it to implement a Fast Fourier Transform circuit.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;Given the recent discussion about hardware synthesis languages, the appearance of this paper seems timely. The use of linear types is perhaps unsurprising from a technical point of view, but it&#039;s surprising when you consider how frequently and in how many different contexts they appear. &lt;/p&gt;
&lt;p &gt;Also, one thing I don&#039;t understand: there&#039;s apparently a difference between a &quot;hardware description language&quot; and a &quot;hardware synthesis language&quot;. If anyone could explain what the difference means, I&#039;d appreciate it. :)&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/24">DSL</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <pubDate>Wed, 09 Jul 2008 17:53:48 -0400</pubDate>
</item>
<item>
 <title>Non-Deterministic Recursive Ascent Parsing</title>
 <link>http://lambda-the-ultimate.org/node/2882</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.aclweb.org/anthology-new/E/E91/E91-1012.pdf&quot;&gt;Non-Deterministic Recursive Ascent Parsing&lt;/a&gt;, Renee Leermakers. 1991 conference on European chapter of the Association for Computational Linguistics.&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
A purely functional implementation of LR-parsers is given, together with a simple correctness proof. It is presented as a generalization of the recursive descent parser. For non-LR grammars the time-complexity of our parser is cubic if the functions that constitute the parser are implemented as memo-functions, i.e. functions that memorize the results of previous invocations. Memo-functions also facilitate a simple way to construct a very compact representation of the parse forest. For LR(0) grammars, our algorithm is closely related to the recursive ascent parsers recently discovered by Kruseman Aretz [1] and Roberts [2]. Extended CF grammars (grammars with regular expressions at the right hand side) can be parsed with a simple modification of the LR-parser for normal CF grammars.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;How LR parsers worked always confused me until I learned about their presentation in terms of recursive ascent. &lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <pubDate>Tue, 01 Jul 2008 12:35:30 -0400</pubDate>
</item>
<item>
 <title>Parametric Higher-Order Abstract Syntax for Mechanized Semantics</title>
 <link>http://lambda-the-ultimate.org/node/2853</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://adam.chlipala.net/papers/PhoasICFP08/&quot;&gt;Parametric Higher-Order Abstract Syntax for Mechanized Semantics&lt;/a&gt;&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
We present &lt;i exsl=&quot;http://exslt.org/common&quot;&gt;parametric higher-order abstract syntax (PHOAS)&lt;/i&gt;, a new approach to formalizing the syntax of programming languages in computer proof assistants based on type theory.  Like higher-order abstract syntax (HOAS), PHOAS uses the meta language&#039;s binding constructs to represent the object language&#039;s binding constructs.  Unlike HOAS, PHOAS types are definable in general-purpose type theories that support traditional functional programming, like Coq&#039;s Calculus of Inductive Constructions.  We walk through how Coq can be used to develop certified, executable program transformations over several statically-typed functional programming languages formalized with PHOAS; that is, each transformation has a machine-checked proof of type preservation and semantic preservation.  Our examples include CPS translation and closure conversion for simply-typed lambda calculus, CPS translation for System F, and translation from a language with ML-style pattern matching to a simpler language with no variable-arity binding constructs.  By avoiding the syntactic hassle associated with first-order representation techniques, we achieve a very high degree of proof automation.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;I was aware of this some months ago now, but held back commenting on it at Adam&#039;s request until it had been accepted for publication, which it now apparently has. This is (one element of) Adam&#039;s continued work on &lt;a href=&quot;http://ltamer.sourceforge.net&quot;&gt;LambdaTamer&lt;/a&gt;, his Coq-based environment for building certified compilers. There is a new version of LambdaTamer using this parametric higher-order abstract syntax approach. The new version also works in current and future versions of Coq, unlike the previous version. Finally, Adam is apparently working on a paper regarding &quot;type-theoretic denotational semantics for higher order, impure object languages&quot; and is post-docing with Greg Morrisett. The relationship between Adam&#039;s work and the &lt;a href=&quot;http://lambda-the-ultimate.org/node/2638&quot;&gt;YNot project&lt;/a&gt; is a bit unclear to me; perhaps either Adam or Greg could help clarify that.&lt;/p&gt;
&lt;p &gt;&lt;b &gt;Update:&lt;/b&gt; Whoops. I got ahead of myself and neglected to notice that the paper is not actually yet available, although the new version of LambdaTamer is. So at the moment, this story is merely to note that the paper exists and to provide a link to the new LambdaTamer. My apologies to Adam and the LtU readership.&lt;/p&gt;
&lt;p &gt;&lt;b &gt;2nd Update:&lt;/b&gt; The paper is now available at the link, in either PostScript or PDF form.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/8">Implementation</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Mon, 16 Jun 2008 11:44:57 -0400</pubDate>
</item>
<item>
 <title>FPH: First-class Polymorphism for Haskell</title>
 <link>http://lambda-the-ultimate.org/node/2780</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://research.microsoft.com/~simonpj/papers/boxy/&quot;&gt;FPH: First-class Polymorphism for Haskell&lt;/a&gt;, by  Dimitrios Vytiniotis, Stephanie Weirich and Simon Peyton Jones:&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;Languages supporting polymorphism typically have ad-hoc restrictions on where polymorphic types may occur. Supporting “firstclass” polymorphism, by lifting those restrictions, is obviously desirable, but it is hard to achieve this without sacrificing type inference. We present a new type system for higher-rank and impredicative polymorphism that improves on earlier proposals: it is an extension of Damas-Milner; it relies only on System F types; it has a simple, declarative specification; it is robust to program transformations; and it enjoys a complete and decidable type inference algorithm.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;Under Related Work, the authors provide a detailed comparison of their system with ML&lt;sup &gt;F&lt;/sup&gt;, and &lt;a href=&quot;http://lambda-the-ultimate.org/node/2779&quot;&gt;HM&lt;sup &gt;F&lt;/sup&gt;&lt;/a&gt;.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Sun, 20 Apr 2008 12:46:58 -0400</pubDate>
</item>
<item>
 <title>April 1st special: The War of the Worlds</title>
 <link>http://lambda-the-ultimate.org/node/2749</link>
 <description>&lt;p &gt;Conrad Barski has posted a sneak peak from his upcoming Lisp textbook/comic: &lt;a href=&quot;http://www.lisperati.com/landoflisp/&quot;&gt;Land of Lisp&lt;/a&gt;.&lt;p &gt;
The first slides may seem unrelated, but boy does the message sting when you reach the ending...&lt;p &gt;
FPers will be quick to note, of course, that this being April Fools&#039; Day the whole thing is a joke and we can all go back to Haskell... &lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/4">Critiques</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/5">Fun</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <pubDate>Tue, 01 Apr 2008 20:34:22 -0400</pubDate>
</item>
<item>
 <title>The Disciplined Disciple Compiler</title>
 <link>http://lambda-the-ultimate.org/node/2727</link>
 <description>&lt;blockquote &gt;Disciple is an explicitly lazy dialect of Haskell which includes:
  &lt;ul &gt;
    &lt;li &gt;first class destructive update of arbitrary data.&lt;/li&gt;
    &lt;li &gt;computational effects without the need for state monads.&lt;/li&gt;
    &lt;li &gt;type directed field projections.&lt;/li&gt;
  &lt;/ul&gt;
All this and more through the magic of effect typing.&lt;/blockquote&gt;
&lt;p &gt;The &lt;a href=&#039;http://www.haskell.org/haskellwiki/DDC&#039;&gt;wiki page&lt;/a&gt; has more information, unfortunately there&#039;s &lt;a href=&#039;http://www.haskell.org/haskellwiki/DDC/FurtherReading&#039;&gt;no paper yet&lt;/a&gt; summarizing the ideas and results. Their &lt;a href=&#039;http://www.haskell.org/haskellwiki/DDC/EffectSystem&#039;&gt;effect system&lt;/a&gt; is quite interesting. Some of the ideas &lt;a href=&#039;http://lambda-the-ultimate.org/node/2706&#039;&gt;recently discussed here&lt;/a&gt; are implemented in Disciple.&lt;/p&gt;
&lt;p &gt;via &lt;a href=&#039;http://www.nabble.com/ANN:-The-Disciplined-Disciple-Compiler---alpha-1-td16172459.html&#039;&gt;Haskell Cafe&lt;/a&gt;&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/29">Semantics</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Thu, 20 Mar 2008 10:19:29 -0400</pubDate>
</item>
<item>
 <title>Uniqueness Typing Simplified</title>
 <link>http://lambda-the-ultimate.org/node/2708</link>
 <description>&lt;p &gt;&lt;a href=&quot;https://www.cs.tcd.ie/~devriese/pub/ifl07-paper.pdf&quot;&gt;Uniqueness Typing Simplified&lt;/a&gt;, by Edsko de Vries, Rinus Plasmeijer, and David M. Abrahamson.&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;We present a uniqueness type system that is simpler than both Clean’s uniqueness system and a system we proposed previously. The new type system is straightforward to implement and add to existing compilers, and can easily be extended with advanced features such as higher rank types and impredicativity. We describe our implementation in Morrow, an experimental functional language with both these features. Finally, we prove soundness of the core type system with respect to the call-by-need lambda calculus.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;Uniqueness typing is related to linear typing, and their &lt;a href=&quot;http://lambda-the-ultimate.org/node/1548&quot;&gt;differences have been discussed here before&lt;/a&gt;. Linear types have &lt;a href=&quot;http://lambda-the-ultimate.org/node/1068&quot;&gt;many applications&lt;/a&gt;. This paper describes the difference between linear and unique types:&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;In linear logic, variables of a non-linear type can be coerced to a linear type (dereliction). Harrington phrases it well: in linear logic, &quot;linear&quot; means &quot;will not be duplicated&quot; whereas in uniqueness typing, &quot;unique&quot; means &quot;has not been duplicated&quot;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;In contrast to other papers on substructural typing, such as Fluet&#039;s thesis &lt;a href=&quot;http://lambda-the-ultimate.org/node/2551&quot;&gt;Monadic and Substructural Type Systems for Region-Based Memory Management&lt;/a&gt;, this paper classifies uniqueness attributes by a kind system. This possibility was mentioned in Fluet&#039;s thesis as well, Section 4.2, footnote 8, though the technique used here seems somewhat different.&lt;/p&gt;
&lt;p &gt;Uniqueness typing is generally used to &lt;a href=&quot;http://lambda-the-ultimate.org/node/2543&quot;&gt;tame side-effects&lt;/a&gt; in purely functional languages. Uniqueness types have also &lt;a href=&quot;http://lambda-the-ultimate.org/node/1180&quot;&gt;been contrasted with monads on LTU&lt;/a&gt;, which are also used to tame effects, among other things. One point not discussed in that thread, is how straightforward it is to compile each approach into efficient code. It seems clear that uniqueness types have a straightforward, efficient compilation, but it&#039;s not clear to me how efficient monads can be, and how much work is required to make them efficient. This may make uniqueness or substructural types more suitable for just-in-time compilers than monads.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Mon, 03 Mar 2008 10:14:16 -0500</pubDate>
</item>
<item>
 <title>Data Types a la Carte</title>
 <link>http://lambda-the-ultimate.org/node/2700</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.cs.nott.ac.uk/~wss/Publications/DataTypesALaCarte.pdf&quot;&gt;Data Types a la Carte&lt;/a&gt;. Wouter Swierstra.&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;This paper describes a technique for assembling both data types and functions from isolated individual components. We also explore how the same technology can be used to combine free monads and, as a result, structure Haskell’s monolithic IO monad.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;This new Functional Pearl has been mentioned twice in comments (&lt;a href=&quot;http://lambda-the-ultimate.org/node/2687#comment-40344&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;http://lambda-the-ultimate.org/node/2696#comment-40459&quot;&gt;2&lt;/a&gt;), and has now also &lt;a href=&quot;http://wadler.blogspot.com/2008/02/data-types-la-carte.html&quot;&gt;appeared with comments&lt;/a&gt; on Phil Wadler&#039;s blog. Obviously it&#039;s time to put it on the front page.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <pubDate>Thu, 28 Feb 2008 12:12:17 -0500</pubDate>
</item>
<item>
 <title>Foundations for Structured Programming with GADTs</title>
 <link>http://lambda-the-ultimate.org/node/2692</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://crab.rutgers.edu/~pjohann/popl08.pdf&quot;&gt;Foundations for Structured Programming with GADTs&lt;/a&gt;, Patricia Johann and Neil Ghani. POPL 2008. &lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
GADTs are at the cutting edge of functional programming and become more widely used every day. Nevertheless, the semantic foundations underlying GADTs are not well understood. In this paper we solve this problem by showing that the standard theory of datatypes as carriers of initial algebras of functors can be extended from algebraic and nested data types to GADTs. We then use this observation to derive an initial algebra semantics for GADTs, thus ensuring that all of the accumulated knowledge about initial algebras can be brought to bear on them. Next, we use our initial algebra semantics for GADTs to derive expressive and principled tools -- analogous to the well-known and widely-used ones for algebraic and nested data types -- for reasoning about, programming with, and improving the performance of programs involving, GADTs; we christen such a collection of tools for a GADT an initial algebra package. Along the way, we give a constructive demonstration that every GADT can be reduced to one which uses only the equality GADT and existential quantification. Although other such reductions exist in the literature, ours is entirely local, is independent of any particular syntactic presentation of GADTs, and can be implemented in the host language, rather than existing solely as a metatheoretical artifact. The main technical ideas underlying our approach are (i) to modify the notion of a higher-order functor so that GADTs can be seen as carriers of initial algebras of higher-order functors, and (ii) to use left Kan extensions to trade arbitrary GADTs for simpler-but-equivalent ones for which initial algebra semantics can be derived.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;I found this to be a really interesting paper, because the work had an opposite effect on my opinions from what I expected. Usually, when I see a paper give a really clean semantics to an idea, I end up convinced that this is actually a good idea. However, Johann and Ghani gave a really elegant treatment of GADTs, which had the effect of making me think that perhaps Haskell-style GADTs should &lt;em &gt;not&lt;/em&gt; be added as is to new programming languages! &lt;/p&gt;
&lt;p &gt;This is because of the way they give semantics to GADTs as functors &lt;code &gt;|C| -&amp;gt; C&lt;/code&gt;, where &lt;code &gt;C&lt;/code&gt; is the usual semantic category (eg, CPPO) and &lt;code &gt;|C|&lt;/code&gt; is the discrete category formed from &lt;code &gt;C&lt;/code&gt; that retains the objects and only the identity morphisms. If I understand rightly, this illustrates that the indices in a GADT are only being used as index terms, and their structure as types is going unused. So it&#039;s really kind of a pun, arising from the accident that Haskell has &lt;code &gt;*&lt;/code&gt; as its only base kind. This makes me think that future languages should include indices, but that these index domains should not coincide with kind type. That is, users should be able to define new kinds distinct from &lt;code &gt;*&lt;/code&gt;, and use those as indexes to types, and these are the datatypes which should get a semantics in the style of this paper. &lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/29">Semantics</category>
 <pubDate>Sun, 24 Feb 2008 17:22:45 -0500</pubDate>
</item>
<item>
 <title>When Is A Functional Program Not A Functional Program?</title>
 <link>http://lambda-the-ultimate.org/node/2680</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://citeseer.ist.psu.edu/longley99when.html&quot;&gt;When Is A Functional Program Not A Functional Program?&lt;/a&gt;, John Longley. ICFP 1999.&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
In an impure functional language, there are programs whose behavior is completely functional (in that they behave extensionally on inputs) but the functions they compute cannot be written in the purely functional fragment of the language. That is, the class of programs with functional behavior is more expressive than the usual class of pure functional programs. In this paper we introduce this extended class of &quot;functional&quot; programs by means of examples in Standard ML, and explore what they might have to offer to programmers and language implementors. &lt;/p&gt;
&lt;p &gt;After reviewing some theoretical background, we present some examples of functions of the above kind, and discuss how they may be implemented. We then consider two possible programming applications for these functions: the implementation of a search algorithm, and an algorithm for exact real-number integration. We discuss the advantages and limitations of this style of programming relative to other approaches. We also consider the increased scope for compiler optimizations that these functions would offer.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;I like this paper because it shows how some of the most abstract bits of formal logic (realizability models of higher order logic) suggest actual programs you can write. &lt;/p&gt;
&lt;p &gt;As a barely-related aside, even a brief look into this realizability stuff also taught me a good deal of humility -- for example, it seems that at higher types, what you can represent mathematically depends on the specific notion of computation you&#039;re using. So the mathematical consequences of the Church-Turing thesis are rather more subtle than we might initially expect. (Andrej Bauer discusses a related point in more detail in &lt;a href=&quot;http://math.andrej.com/2006/03/27/sometimes-all-functions-are-continuous/#more-36&quot;&gt;this blog post&lt;/a&gt;.)&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/29">Semantics</category>
 <pubDate>Tue, 19 Feb 2008 15:54:29 -0500</pubDate>
</item>
<item>
 <title>OCaml Summer Project</title>
 <link>http://lambda-the-ultimate.org/node/2644</link>
 <description>&lt;p &gt;I am pleased to announce the second OCaml Summer Project! The OSP is
aimed at encouraging growth in the OCaml community by funding students
over the summer to work on open-source projects in OCaml.  We&#039;ll fund up
to three months of work, and at the end of the summer, we will fly the
participants out for a meeting in New York, where people will present
their projects and get a chance to meet with other members of the OCaml
community.
&lt;p &gt;
The project is being funded and run by Jane Street Capital. Jane
Street makes extensive use of OCaml, and we are excited about the idea
of encouraging and growing the OCaml community.
&lt;p &gt;
Our goal this year is to get both faculty and students involved.  To
that end, we will require joint applications from the student or
students who will be working on the project, and from a faculty member
who both recommends the students and will mentor them throughout the
project.  Each student will receive a grant of $5k/month for over the
course of the project, and each faculty member will receive $2k/month.
We expect students to treat this as a full-time commitment, and for
professors to spend the equivalent of one day a week on the project.
&lt;p &gt;
We will also award a prize for what we deem to be the most successful
project.  Special consideration will be given to projects that display
real polish in the form of good documentation, robust build systems, and
effective test suites.  We&#039;ll announce more details about the prize
farther down the line.
&lt;p &gt;
If you&#039;d like to learn more about the OSP and how to apply, you can
look at our website here:
&lt;p &gt;
  &lt;a href=&quot;http://ocamlsummerproject.com&quot;&gt;http://ocamlsummerproject.com&lt;/a&gt;
&lt;p &gt;
Please direct any questions or suggestions you have to
osp@janestcapital.com.  Also, this might be a nice place
for people to leave feedback about the program.
&lt;p &gt;
(if one of the editors thought this was appropriate to move 
to the front page, I would be appreciative.  I think it&#039;s 
something that would be of interest to a large part of LtU&#039;s 
readership.)</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/18">Teaching &amp; Learning</category>
 <pubDate>Wed, 30 Jan 2008 20:06:34 -0500</pubDate>
</item>
<item>
 <title>The YNot Project</title>
 <link>http://lambda-the-ultimate.org/node/2638</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.eecs.harvard.edu/~greg/ynot/&quot;&gt;The YNot Project&lt;/a&gt;&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
The goal of the Ynot project is to make programming with dependent types practical for a modern programming language.  In particular, we are extending the Coq proof assistant to make it possible to write higher-order, imperative and concurrent programs (in the style of Haskell) through a shallow embedding of Hoare Type Theory (HTT).  HTT provides a clean separation between pure and effectful computations, makes it possible to formally specify and reason about effects, and is fully compositional.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;This was actually commented on &lt;a href=&quot;http://lambda-the-ultimate.org/node/2551#comment-38515&quot;&gt;here&lt;/a&gt;, by Greg Morrisett himself. Conceptually, this seems like it&#039;s related to Adam Chlipala&#039;s &lt;a href=&quot;http://lambda-the-ultimate.org/node/2146&quot;&gt;A Certified Type-Preserving Compiler from Lambda Calculus to Assembly Language&lt;/a&gt;. See, in particular, slides 23-24 of &lt;a href=&quot;http://adam.chlipala.net/papers/CtpcPLDI07/CtpcINRIA.pdf&quot;&gt;this presentation&lt;/a&gt; (PDF). More generally, computation and reflection seem to be gaining recognition as important features for the practical use of such powerful tools as Coq; see also &lt;a href=&quot;http://research.microsoft.com/research/downloads/Details/6658d5cc-9965-4e6f-9fe1-b3d94e6b8346/Details.aspx&quot;&gt;SSREFLECT tactics for Coq&lt;/a&gt; and their accompanying paper &lt;a href=&quot;http://www.lix.polytechnique.fr/~assia/Publi/ssrdoc.pdf&quot;&gt;A Small Scale Reflection Extension for the Coq system&lt;/a&gt; (PDF).&lt;/p&gt;
&lt;p &gt;It&#039;s also interesting to observe that the work appears to depend on the &quot;Program&quot; keyword in the forthcoming Coq 8.2, the work behind which is known as &quot;Russell,&quot; as referred to in &lt;a href=&quot;http://lambda-the-ultimate.org/node/2626&quot;&gt;this thread&lt;/a&gt;. Russell&#039;s main page in the meantime is &lt;a href=&quot;http://www.lri.fr/~sozeau/research/russell.fr.html&quot;&gt;here&lt;/a&gt;. Again, the point is to simplify programming with dependent types in Coq.&lt;/p&gt;
&lt;p &gt;&lt;b &gt;Update:&lt;/b&gt; Some preliminary code is available from the project page.&lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/8">Implementation</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/29">Semantics</category>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/21">Type Theory</category>
 <pubDate>Mon, 28 Jan 2008 21:14:52 -0500</pubDate>
</item>
<item>
 <title>Recycling Continuations</title>
 <link>http://lambda-the-ultimate.org/node/2629</link>
 <description>&lt;p &gt;&lt;a href=&quot;http://www.cs.indiana.edu/~jsobel/Recycling/recycling.pdf&quot;&gt;Recycling Continuations&lt;/a&gt;, Jonathan Sobel and Daniel P. Friedman. ICFP 1998&lt;/p&gt;
&lt;blockquote &gt;&lt;p &gt;
If the continuations in functional data-structure-generating programs are made explicit and represented as records, they can be &quot;recycled.&quot; Once they have served their purpose as temporary, intermediate structures for managing program control, the space they occupy can be reused for the structures that the programs produce as their output. To effect this immediate memory reclamation, we use a sequence of correctness-preserving program transformations, demonstrated through a series of simple examples. We then apply the transformations to general anamorphism operators, with the important consequence that all finite-output anamorphisms can now be run without any stack- or continuation-space overhead.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p &gt;This is a fun paper, and exactly the kind of thing I find addictive: it uses some elegant theory to formalize and systematize a clever hackerly trick. &lt;/p&gt;</description>
 <category domain="http://lambda-the-ultimate.org/taxonomy/term/11">Functional</category>
 <pubDate>Fri, 25 Jan 2008 14:38:45 -0500</pubDate>
</item>
</channel>
</rss>
