English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2007-11-30 (10:53)
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/