Stefan Ram wrote:

> "AViS" <(E-Mail Removed)> writes:

> >"Language Neutral" was meant to be in the sense that I did not

> >want the source language to be recognized by looking at the XML,

>

> This is easy: If any code, such as

>

> printf( "%d", i );

>

> is given, and I tell you that it was translated from a language

> X, there is no way for you, to find out what X is. So /every/

> representation will fulfil this requirement.

>

> >in other words if 'printf' in c is translated to 'X' in the

> >XML then an equivalent 'cout' in c++ must also be translated

> >to the same 'X'
The idea of using an intermediate language might not be the best way to

go about it but so what? Let the guy explore, he might find

interresting things and he surely will learn alot.

> In general, equivalence between two programs is undecidable.
This whole thing seems fishy to me. If 2 languages are Turing complete,

then they can both represent everything that is representable by a

Turing machine which is everything that is computable. This means that

any program representation in the first language DOES have an

equivalent representation in the second language.

Knowing weather 2 given programs written in 2 different languages are

indeed functionally equivalent if both languages are Turing complete is

far from being a trivial problem but it is possible.

>

> See »Equivalence Problem« in

>

> http://www.cs.rochester.edu/u/nelson...decidable.html
Baloney. If the input and output subsets of each program are known for

both programs then they can be compared to evaluate if they are

functionally equivalent. The Equivalence problems speaks of Equivalence

in general terms (whatever that means (nothing in context if you ask

me)). The difficulty resides in our inability to track very complex

problems. They are not impossible to solve, they are simply too complex

to aprehend when taken as a whole upfront.

Of course the proof makes sure not to mention any specific languages.

The proof applies to a program that would compute equivalence for ANY 2

programs. No such program can exist in the first place. The guy isn't

trying to translate anything to everything else, he's writing a

translater that goes from one language to another. Quite challenging,

but not impossible.

[snip]

Regards

Jean-Francois Michaud