Böhm's language
This article relies largely or entirely on a single source. (December 2014) |
Böhm's language refers to the language, machine and a translation method developed by Corrado Böhm during the latter part of 1950. Böhm used this work as part of his dissertation, submitted in 1951 (amended after submission), published in 1954.[1][2][3]
The compiler
Böhm's work described the first complete meta-circular compiler. The code for the compiler was remarkably concise, and consisted of only 114 lines of code.[4] Since the language accepted only two kinds of expressions: fully parenthesized or without parenthesis, but with operator precedence, therefore the code of the compiler split into two parts. 59 lines were used to handle formulas with parenthesis, 51 to handle operator precedence expressions and 4 to decide between those two cases.[5]
Böhm's parsing technique for expressions had only linear complexity. It generated instructions to a structure similar to a binary tree.[6]
The language
Böhm's language consisted of only assignment operations. It had no special constructs like user defined functions, control structures. Variables represented only non-negative integers. To perform a jump one had to write to a special π variable. To perform I/O ? symbol was used.[7]
An example program which loads 11-element array from an input would look as follows.
A. Set i = 0 (plus the π → G base address 100 for 100 → i the input array a). B → π
B. Let a new input a[i] be π' → B given. Increase i by unity, ? → ↓i and stop if i > 10, i+1 → i otherwise repeat B. [(1∩(i∸110))∙Ω]+[(1∸(i∸110))∙B] → π
∩ represents a minimum operator and ∸ logical difference.
References
- ^ Knuth, p. 35–36, 99
- ^ "Corrado Böhm's PhD, a translation". Peter Sestoft, IT University of Copenhagen. 2016. Retrieved 2023-07-10.
- ^ Böhm, Corrado (1954). Calculatrices digitales du déchiffrage de formules logico-mathématiques par la machine même dans la conception du programme (Doctoral Thesis thesis) (in French). ETH Zurich. doi:10.3929/ethz-a-000090226. hdl:20.500.11850/132662.
- ^ Knuth, p. 36
- ^ Knuth, p. 39
- ^ Knuth, p. 40
- ^ Knuth, p. 36-37
Sources
- Knuth, Donald E.; Pardo, Luis Trabb (1976). "Early development of programming languages". Stanford University, Computer Science Department.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.