请输入您要查询的百科知识:

 

词条 Böhm's language
释义

  1. The compiler

  2. The language

  3. References

  4. Sources

{{one source|date=December 2014}}Böhm's language refers to the language, machine and a translation method developed by Corrado Böhm during 1950. Böhm used this work as his dissertation, published in 1952.[1]

The compiler

Böhm's work described the first complete meta-circular compiler. The code for the compiler was remarkably precise, and consisted of only 114 lines of code.[2] 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.[3]

Böhm's parsing technique for expressions had only linear complexity. It generated instructions to a structure similar to a binary tree.[4]

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.[5]

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

1. ^Knuth, p. 36
2. ^Knuth, p. 36
3. ^Knuth, p. 39
4. ^Knuth, p. 40
5. ^Knuth, p. 36-37

Sources

  • Knuth, Donald E.; Pardo, Luis Trabb (1976). "Early development of programming languages". Stanford University, Computer Science Department.
{{DEFAULTSORT:Bohm's language}}

4 : Translation|Computer languages|Computer data|Encodings

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/11 4:27:02