From: Thomas Fischbacher <Thomas.Fischbacher@Physik.Uni-Muenchen.DE>
To: yoann padioleau <padator@wanadoo.fr>
Cc: Christian Lindig <lindig@cs.uni-sb.de>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] possible to define a type where = is forbidden ?
Date: Mon, 10 Oct 2005 17:04:46 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.61.0510101701380.17307@eiger.cip.physik.uni-muenchen.de> (raw)
In-Reply-To: <14893115.1128951765427.JavaMail.www@wwinf1521>
On Mon, 10 Oct 2005, yoann padioleau wrote:
> > http://caml.inria.fr/pub/ml-archives/caml-list/2003/09/
> > f81c8063ed4878e06f1ddd8010256050.en.html
>
> Interesting technique :) but I think that it would not solve my problem.
>
> To be more precise my program analysis tool try to compute "diff" between differents AST.
> So we love to use pattern-patching and to (ab)use the polymorphic = to compare stuff.
>
> I don't see how your ExprAt technique will make this easier (not to mention that it also makes
> the pattern matching ugly because I would have to wrap every expression with his ExprAt because I want
> that the resultting Ast_diff contain also line number.
When you want to associate extra data to stuff that should retain nice
comparison properties, another technique which might be useful or not is
to use a weak pointer hash, mapping subtrees to positions.
I would not go so far as to say that this is the favored approach one
should use, but sometimes this idea may be useful. At least, it's nice to
have that trick available.
--
regards, tf@cip.physik.uni-muenchen.de (o_
Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)
next prev parent reply other threads:[~2005-10-10 15:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-10 13:42 yoann padioleau
2005-10-10 15:04 ` Thomas Fischbacher [this message]
2005-10-11 14:56 ` EQ hash tables? Thomas Fischbacher
2005-10-12 7:41 ` [Caml-list] " Hendrik Tews
2005-10-12 8:02 ` Xavier Leroy
2005-10-12 11:11 ` Thomas Fischbacher
2005-10-12 15:06 ` Xavier Leroy
2005-10-12 17:53 ` Thomas Fischbacher
-- strict thread matches above, loose matches on Subject: below --
2005-10-10 12:32 possible to define a type where = is forbidden ? yoann padioleau
2005-10-10 13:18 ` [Caml-list] " Christian Lindig
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=Pine.LNX.4.61.0510101701380.17307@eiger.cip.physik.uni-muenchen.de \
--to=thomas.fischbacher@physik.uni-muenchen.de \
--cc=caml-list@inria.fr \
--cc=lindig@cs.uni-sb.de \
--cc=padator@wanadoo.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