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

Martin.Ward@durham.ac.uk (Martin Ward)
20 Dec 2001 00:36:41 -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: Martin.Ward@durham.ac.uk (Martin Ward)
Newsgroups: comp.compilers
Date: 20 Dec 2001 00:36:41 -0500
Organization: Compilers Central
References: 01-12-027
Keywords: tools
Posted-Date: 20 Dec 2001 00:36:40 EST

Sarath Kumar <sarath_kumar@mentorg.com>:


> Generalizing the problem refers to the problem of finding the
> semantic equivalence of two programs. Is this possible?? As the
> theorists go this is very tough and not possible in polynomial time.


Determining (denotational) semantic equivalence of two programs
is not possible in *any* amount of time: it is non-computable,
not just NP-complete.


> Satyanandam Gullapudi wrote:
> > I am looking for some tool which is more than simple text diff. I am
> > looking for a tool which can generate the structure trees for the
> > source file and compare them. It should not throw errors if the
> > structure is just re-arragned.


The FermaT Transformation System can generate structure trees
from source files and compare them. You would need to do
a bit of extra work to detect re-arranged structures.


> [Seems to me that, like with many NP-complete problems, even though
> it's impractical to get a perfect result, it could be very useful to
> get an approximate result. -John]


You can get useful approximate results to uncomputable problems too!


Martin


Martin.Ward@durham.ac.uk http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/


Post a followup to this message

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