Abstract
A career in Computer Science is a commitment to a lifetime of learning. You will not be taught every detail you will need in your career while you are a student. The goal of a Computer Science education is to give you the tools you need so you can teach yourself new languages, frameworks, and architectures as they come along. The creativity encouraged by a lifetime of learning makes Computer Science one of the most exciting fields today. There are engineering and theoretical aspects to the field of Computer Science. Theory often is a part of the development of new programming languages and tools to make programmers more productive. Computer programming is the process of building complex systems with those tools. Computer programmers are program engineers and this process is sometimes called software engineering. No matter what kind of job you end up doing, understanding the tools of Computer Science, and specifically the programming languages you use, will help you become a better programmer. As programmers it is important that we be able to predict what our programs will do. Predicting what a program will do is easier if you understand the way the programming language works. Programs execute according to a computational model. A model may be implemented in many different ways depending on the targeted hardware architecture. While there are currently a number of popular hardware architectures, most can be categorized into one of two main areas: register- based central processing units and stack-based virtual machines. While these two types of architectures are different in some ways, they also share a number of characteristics when used as the target for programming languages. This text develops a stack-based virtual machine based on the Python virtual machine called CoCo. Computer scientists differentiate programming languages based on three paradigms or ways of thinking about programming: object-oriented/imperative programming, functional programming, and logic programming. This text covers these three paradigms while using each of them in the implementation of a non-trivial programming language. It is expected that most readers of this text will have had some prior experience with object-oriented languages. CoCo is implemented in C++, providing a chance to learn C++ in some detail and see it used in a larger software project like the CoCo implementation. The text proceeds in a bottom-up fashion by implementing extensions to CoCo using C++. Then a full-featured functional language called Small is implemented on top of the CoCo virtual machine. The Small language is a subset of Standard ML. Standard ML is first introduced in this text and then used to implement the Small subset of the Standard ML language, which really isn’t that small afterall. Finally, late in the text a type inference system for Small is developed and implemented in Prolog. Prolog is an example of a logic programming language. The text is meant to be used interactively. You should read a section and as you read it, do the practice exercises. Each of the exercises are meant to give you a goal in reading a section of the text. The text website http://www.cs.luther.edu/∼leekent/PL includes code and other support files that may be downloaded. These include the CoCo virtual machine and the MLComp compiler/type inference system. I hope you enjoy reading the text and working through the exercises and practice problems. Have fun with it and get creative!
Cite
CITATION STYLE
Wilhelm, R. (2021). Foundations of programming languages. Formal Aspects of Computing, 33(6), 1279–1280. https://doi.org/10.1007/s00165-021-00561-4
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.