For Programmers: Free Programming Magazines  


Home > Archive > Compilers > October 2007 > An unknown language with a known implementation ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author An unknown language with a known implementation ?
marten.cassel@gmail.com

2007-10-14, 7:15 pm

Hi

Given the specification and source code of a programming language
implementation that is, interpreter (for a virtual machine), runtime
libraries and extensions, plus compiled programs. I'd like to learn
about the language that this implementation was made for.

Is this possible? Mayby someone could clarify or express the problem
for me more clearly.. and possible solutions.

best wishes
marten
[You could certainly read the code and reverse engineer the language, but
it would be a lot of work. -John]

Dmitry A. Kazakov

2007-10-14, 7:15 pm

On Sat, 13 Oct 2007 05:33:09 -0700, marten.cassel@gmail.com wrote:

> Given the specification and source code of a programming language
> implementation that is, interpreter (for a virtual machine), runtime
> libraries and extensions, plus compiled programs. I'd like to learn
> about the language that this implementation was made for.
>
> Is this possible? Mayby someone could clarify or express the problem
> for me more clearly.. and possible solutions.


Considering the language is defined as anything accepted by the
interpreter. So you have a program (the interpreter) and input (some
source code in the mysterious language). You have to decide if the
interpreter will accept that code (= to know if the input is in the
language). This looks much like halting problem, I am afraid.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
[I think that's a good reason not to treat the intepreter as a black box. -John]
Hans-Peter Diettrich

2007-10-14, 7:15 pm

marten.cassel@gmail.com wrote:

> Given the specification and source code of a programming language
> implementation that is, interpreter (for a virtual machine), runtime
> libraries and extensions, plus compiled programs. I'd like to learn
> about the language that this implementation was made for.


With .NET you have little chance to find out a specific programming
language, because all (supported) languages compile to the same IL
code, and use the same libraries. Even programs for the Java VM can be
written in various languages, not only in Java.

> Is this possible? Mayby someone could clarify or express the problem
> for me more clearly.. and possible solutions.


Can you give concrete examples for the languages, which you expect to
find? Common languages, or very new ones?


> [You could certainly read the code and reverse engineer the language, but
> it would be a lot of work. -John]


IMO it's possible to find out characteristics of the runtime
environment, by reverse engineering the VM - does it have garbage
collection, structured exception handling, an object model, etc.

With a look at the symbols in the libraries, one can try to match the
names with the names in the standard libraries of well known programming
languages. This would be the easiest approach, a hex editor and a Web
search engine are the only required tools :-)

DoDi
Tommy Thorn

2007-10-21, 7:18 pm

On Oct 13, 5:33 am, marten.cas...@gmail.com wrote:
> Hi
>
> Given the specification and source code of a programming language
> implementation that is, interpreter (for a virtual machine), runtime
> libraries and extensions, plus compiled programs. I'd like to learn
> about the language that this implementation was made for.
>
> Is this possible? Mayby someone could clarify or express the problem
> for me more clearly.. and possible solutions.


I think the question is impossibly vague. Find out though manual
inspection? Well, surely it depends on the level of detail of the
"specification" and the interpreter. Let me give you an example that
should make this crystal clear:

x86 is a virtual machine (sure why not?). You can write an interpreter
for that (hard but it's possible). All interesting programming
languages have an x86 implementation, but an x86 interpreter will tell
you nothing about the languages that were compiled to it.

Tommy

Joachim Durchholz

2007-10-22, 7:15 pm

Tommy Thorn schrieb:
> x86 is a virtual machine (sure why not?). You can write an interpreter
> for that (hard but it's possible). All interesting programming
> languages have an x86 implementation, but an x86 interpreter will tell
> you nothing about the languages that were compiled to it.


Looking at the object code will still give you a lot of information.
If the interpreter was designed specifically for that language, it
will also be helpful.

I think the most important question is whether it's worth the
effort. If I were charged with that task, I'd spend a day or two
looking for and at debugging symbols in the binaries and google for
the terms I found; I might also try to find strings that the programs
output to the screen and look how they were embedded in the binaries,
trying to find out something about the structure of the bytecode (or
whatever they are using). And I'd take a look at the run-time library
- most contain a copyright notice, which can narrow down the field
considerably through date and company name.

If that turned up anything useful, I'd continue, otherwise I'd declare
that analyzing this thing could easily take several man-years, and
shouldn't we rewrite the thing from scratch?

Regards,
Jo
Tfiuhsvemail

2007-10-27, 7:57 pm

Carmen Electra and Heather Locklear Wrestling & Showing Ass!
http://www.thetubebender.com/PlayMovie.wmv?movie=726648
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com