Re: Are there any tools that can compare two source files

"Joachim Durchholz" <joachim_d@gmx.de>
20 Dec 2001 00:29:48 -0500

          From comp.compilers

Related articles
Are there any tools that can compare two source files satyanandam_g@hotmail.com (2001-12-07)
Re: Are there any tools that can compare two source files joachim_d@gmx.de (Joachim Durchholz) (2001-12-11)
Re: Are there any tools that can compare two source files sarath_kumar@mentorg.com (Sarath Kumar) (2001-12-15)
Re: Are there any tools that can compare two source files nmm1@cus.cam.ac.uk (2001-12-19)
Re: Are there any tools that can compare two source files joachim_d@gmx.de (Joachim Durchholz) (2001-12-20)
Re: Are there any tools that can compare two source files torbenm@eir.diku.dk (2001-12-20)
Re: Are there any tools that can compare two source files Martin.Ward@durham.ac.uk (2001-12-20)
Re: Are there any tools that can compare two source files thp@cs.ucr.edu (2001-12-20)
Re: Are there any tools that can compare two source files idbaxter@semdesigns.com (Ira D. Baxter) (2001-12-22)
Re: Are there any tools that can compare two source files tej@melbpc.org.au (Tim Josling) (2001-12-22)
| List of all articles for this month |
From: "Joachim Durchholz" <joachim_d@gmx.de>
Newsgroups: comp.compilers
Date: 20 Dec 2001 00:29:48 -0500
Organization: Compilers Central
References: 01-12-027 01-12-058
Keywords: tools, theory
Posted-Date: 20 Dec 2001 00:29:48 EST

Sarath Kumar <sarath_kumar@mentorg.com> wrote:
>
> Generalizing the problem refers to the problem of finding the
> semantic equivalence of two programs. Is this possible??


No. It's not decidable.
If this were possible, one could wrap any program in a function call
that throws any results away and ask whether it's equivalent to a
program that does nothing; this would solve the halting problem.


Of course, if the two programs are sufficiently similar, it might still
be possible to get useful results (as John noted). The problem here is
that this type of semantic analysis and code transformation requires an
*exact* understanding of the language semantics. I wouldn't want to do
this for languages that do not have a formal semantics (needless to say
that many of the more popular languages don't have such a thing).


Regards,
Joachim


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.