caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] What does this mean?
Date: 13 Apr 2004 14:26:45 +1000	[thread overview]
Message-ID: <1081830404.20677.508.camel@pelican> (raw)

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


             reply	other threads:[~2004-04-13  4:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-13  4:26 skaller [this message]
2004-04-13 14:00 ` skaller
  -- strict thread matches above, loose matches on Subject: below --
2002-04-16 17:28 [Caml-list] what " Garry Hodgson
2002-04-16 18:06 ` Eric C. Cooper
2002-04-16 19:26   ` Garry Hodgson
     [not found] ` <3CBC64F8.B677F621@recherche.enac.fr>
     [not found]   ` <3CBC7B46.9EB83B57@sage.att.com>
2002-04-17  9:18     ` Nicolas barnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1081830404.20677.508.camel@pelican \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).