论坛首页 综合技术论坛

How did the first Erlang compiler get written?

浏览 2499 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2007-03-22  
(or: how was Erlang bootstrapped?) In Joe's words: " First I designed an abstract machine to execute Erlang. This was called the JAM machine; JAM = Joe's Abstract Machine. "

" Then I wrote a compiler from Erlang to JAM and an emulator to see if the machine worked. Both these were written in prolog. "

" At the same time Mike Williams wrote a C emulator for the JAM. "

" Then I rewrote the erlang-to-jam compiler in Erlang and used the prolog compiler to compile it. The resultant object code was run in the C emulator. Then we threw away prolog. "

上面这段话看得不是很明白,哪位牛人解释一下

我的解释是,Joe先设计了一个JAM(一个抽象机)。然后他用prolog语言写了一个Erlang语言到JAM机器指令的编译器和一个测试JAM机器是否能够正常工作的仿真器;同时Mike用C写了一个JAM的仿真器;Joe用Erlang写了一个Erlang语言到JAM机器指令的编译器,并用之前用prolog写的那个编译器编译生成可以运行在JAM上的程序。这些目标代码直接可以运行在Mike用C写的仿真器上。从此,就再也用不到prolog了。
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics