[Caml-list] Call for paper - 10th Intl. Workshop on Termination - WST 2009

2009-03-12 Thread Frederic Blanqui
Dear all, the 10th Intl. Workshop on Termination welcomes contributions from the functional programming community. See the general call for papers below, and let me add a few words here. The typical functional (compiler) programmer needs - termination of programs - termination of program transfor

Re: [Caml-list] Toploop.setvalue

2009-03-12 Thread Dave Benjamin
Roland Zumkeller wrote: Hi, Can Toploop.setvalue be used to bind a value to an identifier, as does "let"? # Toploop.setvalue "b" (Obj.repr 43);; - : unit = () # b;; Unbound value b I only got the other direction to work: # let a = 42;; val a : int = 42 # (Obj.obj (Toploop.getvalue "a") : int)

[Caml-list] planar embedding

2009-03-12 Thread Alexy Khrabrov
Does anyone do planar embedding with ocamlgraph, with or without using Pigale: http://pigale.sourceforge.net/ I'd like to use planarity tests, specifically, and identification of 3/4 cliques. Cheers, Alexy ___ Caml-list mailing list. Subscription

[Caml-list] buffered io library

2009-03-12 Thread Yitzhak Mandelbaum
Hi, I'm looking for an efficient IO library geared towards support for things like lexers. The essential features are: * Support for easily backing up in the IO stream. That is, it should have an API for saving one's place and then later discarding that save (i.e. committing to current posi

Re: Re : [Caml-list] changing labels on ocamlgraph edges

2009-03-12 Thread Alexy Khrabrov
On Mar 12, 2009, at 10:38 AM, Jean-Christophe Filliatre wrote: May be we should document add_edge more carefully, so that it is clear that it makes use of the default edge label, and that, consequently, this label is shared among all edges created with add_edge Indeed you have to use add_e

Re: [Caml-list] V.null in ocamlgraph

2009-03-12 Thread Jean-Christophe Filliatre
Alexy Khrabrov wrote: In some folds over data when creating ocmalgraph's, I'd need an empty vertex value, something like V.null, to give to an edge-creating fold when I know it's not going to be used. Currently I have to look ahead into the data. Does it make sense to add a null value to the

Re: Re : [Caml-list] changing labels on ocamlgraph edges

2009-03-12 Thread Jean-Christophe Filliatre
Matthieu Wipliez wrote: I'm also using ocamlgraph with labels of type t = bool ref * int option And I found that for add_edge to have the proper behavior, I need to replace the default add_edge with this one: let add_edge graph v1 v2 = add_edge_e graph (v1, (ref false, None), v2) Otherwise al

Re : [Caml-list] changing labels on ocamlgraph edges

2009-03-12 Thread Matthieu Wipliez
> No it is not :-). You just have to define yourself a mutable label. Here > is an example. > > == > open Graph > > module G = > Imperative.Digraph.ConcreteLabeled > (struct include String let equal = (=) let hash = Hashtbl.hash end) > (struct >type t = int ref >

Re: [Caml-list] camlp4: precedence, LEFTA, NONA, etc.

2009-03-12 Thread Mauricio Fernandez
On Thu, Mar 12, 2009 at 09:38:28AM +, Joel Reymont wrote: >> To my understanding, precendence levels correspond to the level you >> define in the grammar, in the given order : in your case, you have >> "=", "+" at the same level, with higher precendence than "And" and >> "*". > What about this

Re: [Caml-list] camlp4: precedence, LEFTA, NONA, etc.

2009-03-12 Thread Joel Reymont
What about this quote from the camlp4 manual? "An entry is composed of entry precedence levels, the first one being the least precedent and the last one the most." I'm assuming that my expr counts as one rule where '+' and '=' have lesser precedence than 'and' and '*' since those follow aft

Re: [Caml-list] camlp4: precedence, LEFTA, NONA, etc.

2009-03-12 Thread Joel Reymont
On Mar 12, 2009, at 9:13 AM, blue storm wrote: You should reverse your rules (starting with the higher-precendence construnction instead of the atomic values), and possibly split some of your level into different levels (eg. "<" and "+") for finer-grained precedence. I have it reversed then

Re: [Caml-list] camlp4: precedence, LEFTA, NONA, etc.

2009-03-12 Thread blue storm
To my understanding, precendence levels correspond to the level you define in the grammar, in the given order : in your case, you have "=", "+" at the same level, with higher precendence than "And" and "*". You should reverse your rules (starting with the higher-precendence construnction instead of

Re: [Caml-list] changing labels on ocamlgraph edges

2009-03-12 Thread Julien SIGNOLES
Hello, > It looks like the only way to change a label on an edge e -- say > increment it -- is to read off the old one with G.E.label, then > remember the src and dst with G.E.src/dst, then G.remove_edge_e g e, > create a new edge e' with G.V.create src (label+1) dst, and > G.add_adge_e g