Date: Fri, 21 Nov 1997 15:44:28 +0100
From: Francisco Valverde <fva@tsc.uc3m.es>
To: Caml List <caml-list@inria.fr>
Subject: Feature drawn back in new 1.06 version.
This is a multi-part message in MIME format.
--------------CF94D0C6C4A8E3650BA4F174
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Salut, Caml listers:
(Resum'e en francais: Il n'y a plus de la possibilit'e de faire des
types recursifs qui ne includent point d'objects. C'est une restrictions
assez forte pour un type special de recherche imbriqu'ee dans deux
domaines que je 'etais en train de faire. Des programmes suivent a la
fin.)
I was using the possibity of defining recursive types for developing a
rather convoluted search in two coupled domains, but now I find that I
cannot anymore... Has anybody found a(n elegant, concise) way of
circumventing it... Please note that the type recursion is ended by
inserting appropriate non-recursive variants... Maybe I abused the type
system! (Note also that a recursion at the level of structures would be
heaven sent!)
--------------------------------------------------------------------
module type HALF =
sig
type score
type ('a, 'b) h_label = | Lexicalized of 'a | Built of 'b
type ('a, 'b) h_unit = ('a, 'b) h_label option
type ('a, 'b, 'c) node =
{ mutable parent: ('a, 'b, 'c) node option;
mutable forest: ('a, 'b, 'c) node list;
mutable state: 'b;
mutable unit: ('a, 'c) h_unit;
mutable depth: int;
mutable f: score;
mutable g: score }
val leq_cost : ('a, 'b, 'c) node -> ('a, 'b, 'c) node -> bool
end
# module type PRE =
sig
include HALF
type p_state
and s_state
and p_label
and s_label
and p = (p_label, p_state, s) node
and s = (s_label, s_state, p) node
(* abbreviations for the real dual nodes *)
val leq_p_cost : p -> p -> bool
(* cost functions for exploring paradigmatical nodes *)
val leq_s_cost : s -> s -> bool
(* cost functions for exploring sintagmatical nodes *)
val p_block : p -> unit
(* pretty printer for paradigmatical nodes *)
val s_block : s -> unit
(* pretty printer for sintagmatical nodes *)
end;;
Characters 115-146:
The type abbreviation p is cyclic
#
--------------------------------------------------------------------
Thanks for any suggestion,
--------------------------------------------------------------------
Francisco J. Valverde-Albacete - Ayudante de Universidad
e-mail: fva@tsc.uc3m.es |tel: +34-1-6249952 |fax: +34-1-6249430
Dpto. de Tecnolog'ias de las Comunicaciones - Univ Carlos III Madrid
c/Butarque, s/n | Leganes 28911 | SPAIN
---------------------------------------------------------------------
--------------CF94D0C6C4A8E3650BA4F174
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Francisco J. Valverde Albacete
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Francisco J. Valverde Albacete
n: Valverde Albacete;Francisco J.
org: Univ. Carlos III de Madrid
email;internet: fva@tsc.uc3m.es
title: Prof. Ayudante de Universidad
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
version: 2.1
end: vcard
--------------CF94D0C6C4A8E3650BA4F174--
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:12 MET