Talk:Compiler/Archive 3

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Archive 2 Archive 3 Archive 4

compilers and interpreters as translators

Somebody please make clear the difference between the two? —Preceding unsigned comment added by Sinedlebo (talkcontribs) 19:38, 10 May 2010 (UTC)

On Flow

Based on the request above, here is am brief intro to flow. First, let me say that I will just give examples here, instead of editing the article because Wikipedia policies do not encourage me to fix the article overall, not knowing how long the edits will survive. I tried to correct the errors before, but some were changed and were made incorrect again and I can not be bothered to re-correct them. Now for fun, let me give some examples about simple translations that give some ideas.

Assume you have an old program in FORTRAN (yes, that language) and want to make a similar program in C (programming language) to use now. You can "translate" FORTRAN to C in a simple way, by just changing syntax of the For-loops, etc. They are both assignment-based languages so there is no big deal. And whenever FORTRAN has an array you will make an array in C, so data structures map accordingly.

Now assume you have a set of wires and Christmas lights that represent the flow of your FORTRAN programs and another set that represent the C program. Give each light a name, say A, B, C D and just use a few of them. Then for any given input X, there is a sequence in which teh lights will flash, e.g. ABBBCAADEE for one case and ACCCAAADEEA for another but the sequences will be the same. So far, very simple. This is a simple translation and the sequence of flashes is in effect like the DNA sequence of the flowchart "with respect to" that input. The set of all such sequences with respect to all inputs is in effect a representation of your program. But note that the FORTRAN may still need to be "compiled" itself before it can run.

Now to make things interesting, try to translate a C program to FORTRAN the same way. But given that FORTRAN has no recursion and no pointers, the situation is not as simple. You will need some mechanism to handle recursion in the FORTRAN code and manage to represent pointers as arrays etc. The AABBCADDFEE type mapping is no longer that simple. And here comes the issue of "Formal semantics", but that is another story. Now, as you keep executing the FORTRAN code after it has been compiled itself, you no longer have any idea what the C code looked like. But if you want a simple interpreter for FORTRAN in C, you coul din effect just read the FORTRAN one line at a time and execute teh equivalent C code.

Now with apologies to the iPhone generation, let us talk about APL (programming language) and Common Lisp programs that use mapcar. As they say, anything is one line of PAL, so any simple flow mapping from APL to FORTRAN will have serious challenges. And you guys can guuess the flow representation of mapcars on nested lists etc. And if you want really interesting, think of the flow in OPS5 and try translating that into FORTRAN - remember that the order of statements in OPS can change without changing program behavor!

So if you think of these issues, and lights flashing as sequences, you get the idea. Now think of a set of byte code generated from Java or Smalltalk, etc. While you can have a program that interprets those bytes codes, the translation from the higher level to byte codes is not teh simple sequence type of light flashes. Anyway, that is enough for now. Cheers. History2007 (talk) 13:02, 14 June 2010 (UTC)

This is an encyclopaedia, not a class. I'm sure it is wonderful to see the dawning light of comprehension as they figure it out and have their theories knocked down and try again and so get an inner knowledge - but that's not what Wikipedia is about. What should be here is straightforward statements backed up by citations. Dmcq (talk) 10:34, 15 June 2010 (UTC)
I was trying to do you guys a favor by clarifying the concepts for you - that was why I typed on the talk page, not the article. Now, that will stop. I typed that because without it you guys do not seem to be able to follow the logic of the topic, but insist on debating it, like the totally incorrect statements you and Rursus made above. And correct statements can be change or deleted by students who do not grasp the concepts: it is a problem with Wkipedia policy really. Let us do this. I will no watch or edit this page any more, ever again. Since you are the self-appointed expert here, go and take a few classes, then fix the page. You can not just fix it by looking up on line references. That is why universities are there: at some point topic are too complicated for the average person without the technical background. And believe me, this is NOT a complicated issue: most undergraduates should know this. But anyway, that is the last I will type here. History2007 (talk) 12:42, 15 June 2010 (UTC)
Somebody else might be able to find something there. The above editor has actually produced a number of good articles which is why I bothered to talk to them in the first place instead of just dismissing them as bullshitting. Dmcq (talk) 13:02, 15 June 2010 (UTC)

Compiler Hinting

I thought this article would mention compiler hinting, but I didn't find it here. Should it? Where would I find this information? (talk) 20:21, 7 October 2010 (UTC)

compiler nedir ?

compiler kısaca herhenagi bir programlama diliyle yazılmış olan verileri bilgisayarın anlıyacağı hale çeviren programdır. 1950 lerde grace hopper derleyici programı yazmıştır. Kendisine makina diliyle aramızdaki tercümanda diyebiliriz.Günümüzde programlamada cok önemli bir yeri vardır. — Preceding unsigned comment added by Fatih80061 (talkcontribs) 22:39, 22 March 2011 (UTC)

Arfle barfle gloop? This is the English Wikipedia not the Turkish one. Dmcq (talk) 23:46, 22 March 2011 (UTC)

Static and dynamic linking

There is no information on Dynamic and static library linking, as well as software bundles creation.

Follow the link to Linker (computing). The easiest way to find things is to search for them using te search box on the top right or using a general search engine like google. Dmcq (talk) 13:20, 21 August 2011 (UTC)

Redirect page title typo?

"Compiled sofware" redirects here. Should this be "Compiled software"? Annoyamouse (talk) 04:43, 28 October 2011 (UTC)

Sofware is definitely wrong and I wouldn't have either. Compiled software doesn't sound like something a person would look up to me. Dmcq (talk) 08:00, 28 October 2011 (UTC)


Some language specifications spell out that implementations must include a compilation facility; for example, Common Lisp. However, there is nothing inherent in the definition of Common Lisp that stops it from being interpreted.

I'm not sure what this means. There is a function called COMPILE in Common Lisp but it basically is only required to expand macros. Any C compiler is required to do that, too, no? — Preceding unsigned comment added by (talk) 19:30, 5 January 2012 (UTC)

IL vs IR

I changed some occurances of IL generation as a compiler phase to "intermediate representation", since that is more correct. The intermediate representation from which code is generated doesn't have to be a language, even in the broadest sense of the word. And more important, it often isn't. I kept IL as an example of an IR though, and also mentioned compile graphs and trees.

Maybe I didn't get all occurances though.

Sounds like a good change. Please don't forget to sign and date your posts with '~~~~'! CurryMi40 (talk) 19:49, 27 November 2014 (UTC)

incorrect "cross compiler" comment

In the introduction section, the phrase "Compilers also exist which translate from one high level language to another (cross compilers), or[...]" is highly inaccurate. "Cross compiler" refers to something very different, as described in the immediately following section. Having worked in the industry for many years, I've heard lots of names for a high-level-to-high-level translator, but cross compiler was never one of them. I've deleted the parenthetical comment.

That still is not quite right. That would put JAVA in the cross-compiler category. I have never head anyone call JAVA a cross compiler. True that it is. But it's output runs on many machines probably most likely including the one it was compiled on. I have written many code generators for cross compilers. There is really nothing special about a cross compiler other than the code produced. And in many cases the same compiler could produce code for the machine it was running on. The target machine was an option at command lime. See Compiler output: "The output of a compiler that produces code for a virtual machine (VM) may or may not be executed on the same platform as the compiler that produced it. For this reason such compilers are not usually classified as native or cross compilers." The first description needs improvement or deletion, --Steamerandy (talk) 10:22, 15 September 2014 (UTC)

Note that it is called Java not JAVA. Java does not produce a high level language. Most people do not look at the output of Java. A cross-compiler produces output that people typically use. Java is not a cross-compiler. — Preceding unsigned comment added by Sam Tomato (talkcontribs) 18:52, 11 January 2015 (UTC)