Content deleted Content added
Jerryobject (talk | contribs) m WP:LINKs: update, add. |
MichaelMaggs (talk | contribs) Adding short description: "Computer designed to run a specific language" |
||
(16 intermediate revisions by 12 users not shown) | |||
Line 1:
{{Short description|Computer designed to run a specific language}}
A '''high-level language computer architecture''' ('''HLLCA''') is a [[computer architecture]] designed to be targeted by a specific [[high-level programming language]] (HLL), rather than the architecture being dictated by hardware considerations. It is accordingly also termed '''language-directed computer design
HLLCAs date almost to the beginning of HLLs, in the [[Burroughs large systems]] (1961), which were designed for [[ALGOL 60]] (1960), one of the first HLLs. The
==Definition==
There are a wide variety of systems under this heading. The most extreme example is a Directly Executed Language (DEL), where the [[instruction set architecture]] (ISA) of the computer equals the instructions of the HLL, and the [[source code]] is directly executable with minimal processing. In extreme cases, the only
In less extreme examples, the source code is first parsed to [[bytecode]], which is then the [[machine code]] that is passed to the processor. In these cases, the system typically lacks an [[Assembly language|assembler]], as the [[compiler]] is deemed sufficient, though in some cases (such as Java), assemblers are used to produce legal bytecode which would not be output by the compiler. This approach was found in the [[Pascal MicroEngine]] (1979), and is currently used by Java processors.
More loosely, a HLLCA may simply be a general-purpose computer architecture with some features specifically to support a given HLL or several HLLs. This was found in Lisp machines from the 1970s onward, which augmented general-purpose processors with operations specifically designed to support Lisp.
Line 24 ⟶ 25:
[[Rekursiv]] (mid-1980s) was a minor system, designed to support [[object-oriented programming]] and the [[Lingo (programming language)#Other languages|Lingo]] programming language in hardware, and supported [[recursion]] at the instruction set level, hence the name.
A number of processors and coprocessors intended to implement [[Prolog]] more directly were designed in the late 1980s and early 1990s, including the [http://www.eecs.berkeley.edu/Pubs/TechRpts/1991/6379.html Berkeley VLSI-PLM], its successor (the [http://portal.acm.org/citation.cfm?id=74948 PLUM]), and a [http://www.eecs.berkeley.edu/Pubs/TechRpts/1988/5870.html related microcode implementation]. There were also a number of simulated designs that were not produced as hardware [
[[Niklaus Wirth]]'s [[Lilith (computer)|Lilith]] project included a custom CPU geared toward the [[Modula-2]] language.<ref>{{cite web |url=http://pascal.hansotten.com/index.php?page=history-of-lilith |title=Pascal for Small Machines – History of Lilith |publisher=Pascal.hansotten.com |date=28 September 2010 |access-date=12 November 2011 |archive-date=20 March 2012 |archive-url=https://web.archive.org/web/20120320091110/http://pascal.hansotten.com/index.php?page=history-of-lilith |url-status=dead }}</ref>
The INMOS [[Transputer]] was designed to support concurrent programming, using [[occam (programming language)|occam]].
Line 32 ⟶ 33:
The [[AT&T Hobbit]] processor, stemming from a design called CRISP (C-language Reduced Instruction Set Processor), was optimized to run [[C (programming language)|C]] code.
In the late 1990s, there were plans by [[Sun Microsystems]] and other companies to build CPUs that directly (or closely) implemented the stack-based [[Java (programming language)|Java]] [[Java
[[Ericsson]] developed ECOMP, a processor designed to run [[Erlang (programming language)|Erlang]].<ref>{{Cite web |url=http://www.erlang.se/euc/00/processor.ppt |title=ECOMP - an Erlang Processor |access-date=2022-12-01 |archive-url=https://web.archive.org/web/20210424115257/http://www.erlang.se/euc/00/processor.ppt |archive-date=2021-04-24 |url-status=dead }}</ref> It was never commercially produced.
The HSA Intermediate Layer (HSAIL) of the [[Heterogeneous System Architecture]] (2012) provides a virtual instruction set to abstract away from the underlying ISAs, and has support for HLL features such as exceptions and virtual functions, and include debugging support.
Line 53 ⟶ 54:
A further advantage is that a language implementation can be updated by updating the microcode ([[firmware]]), without requiring recompilation of an entire system. This is analogous to updating an interpreter for an interpreted language.
An advantage that's reappearing post-2000 is safety or security. Mainstream IT has largely moved to languages with type and/or memory safety for most applications.{{Cn|date=May 2023}} The software those depend on, from OS to virtual machines, leverage native code with no protection. Many vulnerabilities have been found in such code. One solution is to use a processor custom built to execute a safe high level language or at least understand types. Protections at the processor word level make attackers' job difficult compared to low level machines that see no distinction between scalar data, arrays, pointers, or code. Academics are also developing languages with similar properties that might integrate with high level processors in the future. An example of both of these trends is the SAFE<ref>{{Cite web |url=http://www.crash-safe.org/ |title=SAFE Project |access-date=2022-07-09 |archive-date=2019-10-22 |archive-url=https://web.archive.org/web/20191022221212/http://www.crash-safe.org/ |url-status=dead }}</ref> project. Compare [[language-based system]]s, where the software (especially operating system) is based around a safe, high-level language, though the hardware need not be: the "trusted base" may still be in a lower level language.
==Disadvantages==
Line 60 ⟶ 61:
The simplest reason for the lack of success of HLLCAs is that from 1980 [[optimizing compiler]]s resulted in much faster code and were easier to develop than implementing a language in microcode. Many compiler optimizations require complex analysis and rearrangement of the code, so the machine code is very different from the original source code. These optimizations are either impossible or impractical to implement in microcode, due to the complexity and the overhead. Analogous performance problems have a long history with interpreted languages (dating to Lisp (1958)), only being resolved adequately for practical use by [[just-in-time compilation]], pioneered in [[Self (programming language)|Self]] and commercialized in the [[HotSpot (virtual machine)|HotSpot]] [[Java virtual machine]] (1999).
The fundamental problem is that HLLCAs only simplify the [[Code generation (compiler)|code generation]] step of compilers, which is typically a relatively small part of compilation, and a questionable use of computing power (transistors and microcode). At the minimum tokenization is
A deeper problem, still an active area of development {{as of|2014|lc=1}},<ref>See [[LLVM]] and the Clang compiler.</ref> is that providing HLL debugging information from machine code is quite difficult, basically because of the overhead of debugging information, and more subtly because compilation (particularly optimization) makes determining the original source for a machine instruction quite involved. Thus the debugging information provided as an essential part of HLLCAs either severely limits implementation or adds significant overhead in ordinary use.
Further, HLLCAs are typically optimized for
The advantages of HLLCAs can be alternatively achieved in HLL Computer ''Systems'' ([[language-based system]]s) in alternative ways, primarily via compilers or interpreters: the system is still written in a HLL, but there is a trusted base in software running on a lower-level architecture. This has been the approach followed since circa 1980: for example, a Java system where the runtime environment itself is written in C, but the operating system and applications written in Java.
==Alternatives==
Since the 1980s the focus of research and implementation in general-purpose computer architectures has primarily been in RISC-like architectures, typically internally register-rich [[
In computer architecture, the RISC approach has proven very popular and successful instead, and is opposite from HLLCAs, emphasizing a very simple instruction set architecture. However, the speed advantages of RISC computers in the 1980s was primarily due to early adoption of [[on-chip cache]] and room for large registers, rather than intrinsic advantages of RISC
==See also==
Line 84 ⟶ 85:
{{reflist}}
{{refbegin}}
* {{cite conference |last=McKeeman
** {{Cite journal |
* {{Cite
* ''[http://www.tkt.cs.tut.fi/kurssit/3520/K13/CH_3.pdf A Baker’s Dozen: Fallacies and Pitfalls in Processor Design]'' Grant Martin & Steve Leibson, [[Tensilica]] (early 2000s), slides 6–9
{{refend}}
Line 92 ⟶ 93:
==Further reading==
{{refbegin}}
*
* {{Cite journal |
* {{Cite journal |
** {{Cite conference |
* {{Cite journal |
* {{Cite journal |
* {{Cite conference |
* {{Cite journal |
{{refend}}
|