インタプリタ
(インタプリタ方式 から転送)
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2023/07/30 07:46 UTC 版)
インタプリタ(英: interpreter)とは、プログラミング言語で書かれたソースコードないし中間表現を逐次解釈しながら実行するプログラムのこと[1]。「インタープリタ」「インタープリター」などと表記することもある。
注釈
- ^ この意味では、CPUは機械語インタプリタであると見ることができる。
- ^ 現在では、「インタプリタ / コンパイラ」という区分に関しては状況が変わっており、[誰?]に言わせると『だが、それらは必ずしも相互排他的に2つに分類できるわけではない。なぜなら多くのインタプリタ方式の処理系は、コンパイラが行っているような変換も内部で行っているからだ。[要出典]」とも言われ、『「インタプリタ言語」あるいは「コンパイラ言語」といった呼称も見掛けることがあるが、これらは単にその言語の規範的実装がインタプリタかコンパイラかを示しているに過ぎない(実際、詳しく調べれば、実験的な程度の実装まで含めれば両方ともあるということも多い)。』という見解も出てくることになる。高水準言語は基本的に抽象であり、(理想的には)特定の実装からは独立している。しかし、動的プログラミング言語のようにインタプリタでの実装が向いている方向性の言語、あるいはその逆もあるということは確かである。
- ^ つまり、近年では高速化にはキャッシュのほうが重要なので、高速化に有利か否かはわからない。
出典
- ^ bit 編集部『bit 単語帳』共立出版、1990年8月15日、19頁。ISBN 4-320-02526-1。
- ^ a b "An interpreter dispatches a virtual instruction body to emulate each virtual instruction in turn." Zaleski (2007). YETI: a GraduallY Extensible Trace Interpreter. University of Toronto.
- ^ "we defined dispatch as the mechanism used by a high level language virtual machine to transfer control from the code to emulate one virtual instruction to the next." Zaleski (2007). YETI: a GraduallY Extensible Trace Interpreter. University of Toronto.
- ^ 日本のソフトウェアの草創期:座談会:日本のソフトウェアの草創期
- ^ Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I のこと
- ^ History of Lisp の、§3 の最後のほうに、次のようにある「S.R. Russell noticed that eval could serve as an interpreter for LISP, promptly hand coded it, and we now had a programming language with an interpreter. (段落) The unexpected appearance of an interpreter ...(後略)」
- ^ ポール・グレアムの『ハッカーと画家』(原著「Hackers & Painters、185ページ)によれば、マッカーシーは「ラッセルは『ねえ、この
eval
をプログラムしようか』と言った。…私は『ほう、ほう。君は理論と実際を混同している。この eval は読み物として書いたもので、実際に動かすために書いたものじゃない』と答えた。しかし彼はそれをやってのけた。つまり彼は私の論文にある eval を IBM 704 の機械語にコンパイルして、バグを修正し、それを LISP インタプリタだと宣伝したし、実際それはそのとおりだった。だからその時点で LISP は今日のような形態を本質的に備えていた」と述べたという。 - ^ "Conventional wisdom states that this indirect jump incurs a major performance degradation on deeply pipelined architectures because it is hardly predictable" Rohou, et al. (2015). Branch Prediction and the Performance of Interpreters - Don’t Trust Folklore. International Symposium on Code Generation and Optimization, Feb 2015, Burlingame, United States.
- ^ "we show that the accuracy of indirect branch prediction is no longer critical for interpreters." Rohou, et al. (2015). Branch Prediction and the Performance of Interpreters - Don’t Trust Folklore. International Symposium on Code Generation and Optimization, Feb 2015, Burlingame, United States.
- ^ AST intermediate representations — Lambda the Ultimate forum
- ^ A Tree-Based Alternative to Java Byte-Codes — トーマス・キスラー、マイケル・フランズ
- ^ Annoucing SquirelFish
- ^ L. ドイチュ、A. シフマン、Efficient implementation of the Smalltalk-80 system、Proceedings of 11th POPL symposium、1984年
- インタプリタ方式のページへのリンク