From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id GAA02346; Tue, 13 Apr 2004 06:26:57 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA02349 for ; Tue, 13 Apr 2004 06:26:56 +0200 (MET DST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3D4QrYM016713 for ; Tue, 13 Apr 2004 06:26:55 +0200 Received: from [192.168.1.200] (ppp116-94.lns1.syd2.internode.on.net [150.101.116.94]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i3D4QkvM097528 for ; Tue, 13 Apr 2004 13:56:52 +0930 (CST) Subject: [Caml-list] What does this mean? From: skaller Reply-To: skaller@users.sourceforge.net To: caml-list Content-Type: text/plain Message-Id: <1081830404.20677.508.camel@pelican> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 13 Apr 2004 14:26:45 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; sourceforge:01 incr:01 expr:01 9660:01 glebe:01 equality:01 equality:01 closure:01 rec:01 nsw:01 snail:02 match:02 checkout:02 comparison:02 2037:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 265 Can someone explain what this means .. Invalid_argument("equal: abstract value") The code is below. I am fairly sure the problem occurs in 'assoc' trying to compare two terms for equality. This piece of code unravels a Felix expression term into a three-address-code, the equality comparison is used to eliminate common subexpressions. let unravel syms e = let sube = ref [] in let get e = try assoc e !sube with Not_found -> let n = !(syms.counter) in incr (syms.counter); let name = "_tmp" ^ si n in sube := (e,name) :: !sube; name in let refer ((_,t) as e) = `BEXPR_expr (get e,t),t in let idt t = t in let e' = let rec aux e = match e with | `BEXPR_apply ((`BEXPR_name _,_) as f, b),t | `BEXPR_apply ((`BEXPR_closure _,_) as f, b),t -> `BEXPR_apply (f, aux b),t | `BEXPR_apply (f,b),t -> `BEXPR_apply(aux f, aux b),t | `BEXPR_tuple ls,t -> `BEXPR_tuple (map aux ls),t | (`BEXPR_name _,t) as x -> x | x -> refer x in aux e in !sube,e -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners