Some languages ​​have built-in processor architectures for design

I am curious to see if certain design languages ​​are more suitable for certain processor architectures. When I talk about architecture, I do not mean ARM / PPC / MIPS, but more archives with accumulation, battery or register.

For example, I can think of Forth, which is a stack architecture. Any others?

+4
source share
7 answers

Yes, definitely ... it goes differently: many hardware architectures are designed to host specific languages.

  • RISC architectures are a very important response to the fact that people have switched from assembly to compiled languages ​​such as C / C ++.
  • Burroughs B5000 had Algol instead of assembler.
  • There are several different Forth chips .
  • Lisp machines were designed to efficiently execute Lisp.
  • Java processors run Java bytecode on hardware.
  • Some ARM processors have (optionally) Java acceleration technology .

Perhaps many more good examples are available.

+5
source

Yes Yes. For example, Occam programming language was originally aimed specifically at Transputer .

+4
source

Perhaps this is a bit of a smart ass answer, but:

The assembler languages ​​of the involved processors are closely related to architecture, so yes, there are some languages ​​where this is true.

Perhaps more interesting are higher-level languages.

+2
source

I saw a conversation on Google Video by Simon Payton Jones talking about it. He mentioned that on that day, people were very interested in writing hardware that specialized in running a specific language, but people figured out the best way to solve the problem: make the compiler smarter. Take a look at Haskell. The GHC releases some ridiculously fast code from high-level constructs, but Haskell is so different from x86 assembler that the two look alien to each other. The same thing happened with Java and Lisp: Java and Lisp work very quickly on modern computers and take a decent advantage of our processors, but Java was originally compiled for weird stack-based byte code and for a long time, people built Lisp machines.

Here is the video, by the way. Most of them are not relevant to the current issue, but you might find it interesting that “it is important why functional programming is important” and how to make unit tests in an easy way.

http://video.google.com/videoplay?docid=-4991530385753299192&hl=en

It was quite recently (the last decade or so?) That compilers were smart enough to make Haskell and Java almost as fast as C, although none of them revealed much of the underlying architecture. Heck, GHC doesn't even use the stack, how bizarre is that?

+1
source

Most languages ​​target von Neumann architecture , which is the foundation of most processors.

Occam for the transporter, mentioned by Neil Butterworth, is a notable exception.

VHDL is another exception based on the concept of data flow, but it is not a programming language, it is a hardware description and a modeling language.

0
source

The most famous example is, of course, c

0
source

C was written in the early 1970s in accordance with DEC PDP-11 for example. On PDP-7 in programming language B there was only one data type, but porting it to PDP-11 with data of different sizes types, data types for variables were added into the tongue.

0
source

All Articles