Skip to main content
added 823 characters in body
Source Link
gatkin
  • 121
  • 4

Assuming there ever was a period of time when they were seen as the same, that period would naturally end once it was generally understood that a compiler is a much larger, more sophisticated program than an assembler. At first this knowledge would have been limited to those involving in creating the first compilers, but by 1977 when the "green dragon" (Aho & Ullman) textbook was published it was general knowledge. Today a CS student can write an assembler without help inMany colleges and univerisies today offer a month or two. A team of CS students needs two semesters-semester course on writing a compiler, because one semester isn't enough time to cover the relevant theory and also do a lot of guidanceteam lab project to write a compiler for a nontrivial language.

Granted, writing a compiler is easier the second time, once you know the theory and have tools that can analyze the grammar rules for the language you want.

It is also worth noting that computer terminology isn't static and isn't always universally agreed-upon. In a comment, Dave points out that ICT (later ICL) and English Electric (later merged into ICL) used "compiler" to refer to their PLAN assembler and KDF9 assembler, respectively. I'm interpreting this question to be asking why most of the industry went with "assembler," and specifically why "assembler" instead of "translator." In the text of this answer I'm using "assembler" and "compiler" as those terms are commonly understood today.

Why are assemblers named assemblers instead of translatorsWhy are assemblers named assemblers instead of translators

The industry leader at the time was IBM, which sold business machines to an international market before computers were a commercial product. They and other big players saw software development as a form of manufacturing and used assembly-line terminology to describe it; forsaw software development as a form of manufacturing and used assembly-line terminology to describe it. For example "this product is in production" means "in use by customers and available to buy" like a car model-year (as, as opposed to "in production" like a movie coming soon.)

Today we take it for granted that programming languages support parenthesis, operator precedence, and arbitrarily long expressions on one line. But in assembly it takes multiple lines of code just to divide B by 2 (possibly many lines, depending on floating-point support.) Even in Cobol, released in 1960, and its predecessor Flow-matic (1955-1958) you'd have to write a line of code for each step of the calculation, something like:

Since the 1970s less andIn recent decades there's been less interest in writing code is written in assembly language (largely because of C) and when assembly is written the process is the same as any high-level language: edit the code in an IDE and click the "play" button. As the distinction becomes less important in our daily lives, the distinction will fall out of use in our language. I've even caught myself saying "compile" when I meant "assemble."

Assuming there ever was a period of time when they were seen as the same, that period would naturally end once it was generally understood that a compiler is a much larger, more sophisticated program than an assembler. At first this knowledge would have been limited to those involving in creating the first compilers, but by 1977 when the "green dragon" (Aho & Ullman) textbook was published it was general knowledge. Today a CS student can write an assembler without help in a month or two. A team of CS students needs two semesters and a lot of guidance to write a compiler.

Why are assemblers named assemblers instead of translators

The industry leader at the time was IBM, which sold business machines to an international market before computers were a commercial product. They and other big players saw software development as a form of manufacturing and used assembly-line terminology to describe it; for example "this product is in production" means "in use by customers and available to buy" like a car model-year (as opposed to "in production" like a movie coming soon.)

Today we take it for granted that programming languages support parenthesis, operator precedence, and arbitrarily long expressions on one line. But in assembly it takes multiple lines of code just to divide B by 2 (possibly many lines, depending on floating-point support.) Even in Cobol, released in 1960, you'd have to write a line of code for each step of the calculation, something like:

Since the 1970s less and less code is written in assembly language (largely because of C) and when assembly is written the process is the same as any high-level language: edit the code in an IDE and click the "play" button. As the distinction becomes less important in our daily lives, the distinction will fall out of use in our language. I've even caught myself saying "compile" when I meant "assemble."

Assuming there ever was a period of time when they were seen as the same, that period would naturally end once it was generally understood that a compiler is a larger, more sophisticated program than an assembler. At first this knowledge would have been limited to those involving in creating the first compilers, but by 1977 when the "green dragon" (Aho & Ullman) textbook was published it was general knowledge. Many colleges and univerisies today offer a two-semester course on writing a compiler, because one semester isn't enough time to cover the relevant theory and also do a team lab project to write a compiler for a nontrivial language.

Granted, writing a compiler is easier the second time, once you know the theory and have tools that can analyze the grammar rules for the language you want.

It is also worth noting that computer terminology isn't static and isn't always universally agreed-upon. In a comment, Dave points out that ICT (later ICL) and English Electric (later merged into ICL) used "compiler" to refer to their PLAN assembler and KDF9 assembler, respectively. I'm interpreting this question to be asking why most of the industry went with "assembler," and specifically why "assembler" instead of "translator." In the text of this answer I'm using "assembler" and "compiler" as those terms are commonly understood today.

Why are assemblers named assemblers instead of translators

The industry leader at the time was IBM, which sold business machines to an international market before computers were a commercial product. They and other big players saw software development as a form of manufacturing and used assembly-line terminology to describe it. For example "this product is in production" means "in use by customers and available to buy" like a car model-year, as opposed to "in production" like a movie coming soon.

Today we take it for granted that programming languages support parenthesis, operator precedence, and arbitrarily long expressions on one line. But in assembly it takes multiple lines of code just to divide B by 2 (possibly many lines, depending on floating-point support.) Even in Cobol, released in 1960, and its predecessor Flow-matic (1955-1958) you'd have to write a line of code for each step of the calculation, something like:

In recent decades there's been less interest in writing code in assembly language and when assembly is written the process is the same as any high-level language: edit the code in an IDE and click the "play" button. As the distinction becomes less important in our daily lives, the distinction will fall out of use in our language. I've even caught myself saying "compile" when I meant "assemble."

Source Link
gatkin
  • 121
  • 4

I'm going to try answering your questions in reverse order.

Since when are assemblers seen as something different than compilers

Assuming there ever was a period of time when they were seen as the same, that period would naturally end once it was generally understood that a compiler is a much larger, more sophisticated program than an assembler. At first this knowledge would have been limited to those involving in creating the first compilers, but by 1977 when the "green dragon" (Aho & Ullman) textbook was published it was general knowledge. Today a CS student can write an assembler without help in a month or two. A team of CS students needs two semesters and a lot of guidance to write a compiler.

Why are assemblers named assemblers instead of translators

The industry leader at the time was IBM, which sold business machines to an international market before computers were a commercial product. They and other big players saw software development as a form of manufacturing and used assembly-line terminology to describe it; for example "this product is in production" means "in use by customers and available to buy" like a car model-year (as opposed to "in production" like a movie coming soon.)

So the last two entries for "assembly" in Merriam-Webster might be illuminating.

6a. the fitting together of manufactured parts into a complete machine, structure, or unit of a machine
6b. a collection of parts so assembled
7. the translation of assembly language to machine language by an assembler

It isn't hard to see how sense 7 was inspired by sense 6b. In the punch-card days, the output of the assembler would have been a fresh, neat stack of punch cards representing the finished program, ready to run. Which is an "assembly" in sense 6b. The definition also fits if you only assembled part of the source code, say the part you were working on, in which case you have a "unit" as in "unit testing" and consistent with the way the word "unit" is used in 6a. If the result is an assembly (sense 6b) then process producing it is also assembly (sense 6a), so let's call the program doing it an assembler.

C# programmers still use "assembly" in sense 6b, referring to the object code for part of a system, contained in a DLL file.

I don't dispute that "translate" was and is used when explaining assemblers and compilers, like definition 7 in the dictionary entry above. I am doubtful that anybody using an assembler or compiler would speak the word "translate" to describe what they were doing.

Also, the word "translate" carries a connotation of like-for-like. When you ask someone to translate a poem, you expect to get a poem back: a translation of the original poem, but still a poem. Likewise if you ask for a translation of a book. When the original work is changed into something else, we reach for different words like "condense" (Reader's Digest), "adaptation" (a screenplay from a book), or "reduction" (a musical arrangment requiring fewer players.) The transformation from a high-level language to an assembly language, and from assembly language to machine language, are both big enough changes that "translation" doesn't feel like the right word.

We do sometimes use the word "translate" when converting something from one high-level language to another one. (Or one markup language to another one.)

FORTRAN has it in its name FORmula TRANslator

Fortran's major innovation was it allowed programmers to write a formula in Fortran code that (kinda) resembled how it would be written on a blackboard. The example in the 1957 paper cited in John's answer was:

ROOT = ( - (B/2.0) + SQRTF((B/2.0) * * 2 - A * C))/A 

Today we take it for granted that programming languages support parenthesis, operator precedence, and arbitrarily long expressions on one line. But in assembly it takes multiple lines of code just to divide B by 2 (possibly many lines, depending on floating-point support.) Even in Cobol, released in 1960, you'd have to write a line of code for each step of the calculation, something like:

DIVIDE 2 INTO B GIVING TEMP1 MULTIPLY A BY C GIVING TEMP2 

and so on. In assembly or Cobol the code would look nothing like the blackboard equation, but in Fortran there would be a simple correspondence. Thus, "formula translation."

Even today IBM still uses the term translator when describing the actual zSeries HLL-Assembler

I know it's been a couple of years since this question was posted, but are you referring to the zOS Basic Skills zOS assembler page?

That page says the zOS assembler language has two kinds of statements, one of which is "instruction statements", and three groups of instruction statements, one of which is "machine instruction." Regarding the latter, it says:

It is called a machine instruction because the assembler translates it into the machine language code that the computer can execute.

I think the author's intent here is to point out that each "machine instruction" in assembly language results in exactly one instruction in the actual machine language the computer executes. Which fits the like-for-like connotation of "translate." And the author is contrasting that with the other kinds of instructions in assembly language where that relationship isn't true.

Also, it would feel odd to use "assemble" in that sentence to describe what the assembler is doing with a single machine instruction, because that would be like saying you're going to "assemble" a machine consisting of a single manufactured part.

To my reading, that document is not suggesting that "translate" is a synonym for "assemble."

early on only the term translator was used for the tool converting source text to machine code

I would argue that typically happens when the writer is explaining what compilers and assemblers are or what they do, and definitions of associated terminology. Once the shared terminology is established, you use the word that expresses your intended meaning.

We tend use the term assembler as if there is a fundamental implication of being different from a compiler.

Because there is, at least in the minds of the people choosing to use those words. They've made the distinction in their heads, and it's reflected in the language they use.

All that said... you're not wrong.

Since the 1970s less and less code is written in assembly language (largely because of C) and when assembly is written the process is the same as any high-level language: edit the code in an IDE and click the "play" button. As the distinction becomes less important in our daily lives, the distinction will fall out of use in our language. I've even caught myself saying "compile" when I meant "assemble."