There is an effective and quite general method of manually deriving compilers from programminglanguage interpreters without dealing directly with machine language. The method is an implementation of the largely theoretical and under-appreciated concept of partial computation, but can be understood on its own terms. It involves the translation of a source program's intermediate form into the interpreter's implementation language. This paper shows how the method can be used to transform both a sample iterative interpreter and a sample recursive interpreter into compilers. The result can be a large gain in program execution speed. Other advantages of the method, including the ease and practicality of applying it, are discussed.
A brief account of the concep t of partial computation is given in th e context of the Pascal language .The manual conversion of programs int o generating extensions is explained using examples of gradually increasing complexity . This culminates in a readil y applicable but too-little known techniqu e of converting interpreters into compiler s without dealing directly with machin e language . Students taking courses i n language processing should be taught thi s technique and perhaps also the genera l principles underlying it .A simpl e example of the application of th e technique is presented .
Two sequences of nested sublanguages of Algol 68 suitable for use in teaching introductory programming are proposed. "A68/k" is a sequence of twelve sublanguages suitable for use in an educational context where the learning of Algol 68 per se is considered important. "SA/k" is a sequence of eight sublanguages suitable for use in a context where the aim is to teach the principles of good programming with minimal concern for the purely linguistic aspects. SA/k is claimed to be superior to other teaching languages such as Pascal.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.