Version franēaise
Home     About     Download     Resources     Contact us    
Browse thread
Help with simple ocaml memoization problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jean-Christophe_Filliātre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] Help with simple ocaml memoization problem
Jon Harrop wrote:
> Incidentally, what are the pedagogical applications of shared maps?

Here is an example: when computing the FIRST and FOLLOW sets of a
grammar, you typically make unions of already computed sets for same or
other non-terminals. It potentially results in sharing between the
various sets.

More generally, static analysis traversing AST and computing sets (or
maps) for various nodes (liveness analysis, etc.) are likely to build
data structures which share subparts (when they are tree-based data
structures typically).

I hope it makes my point a little clearer.

-- 
Jean-Christophe Filliātre
http://www.lri.fr/~filliatr/