Teaching Programming with the Kernel Language Approach

We present the kernel language approach, a new way to teach programming that situates most of the widely-known programming paradigms (including imperative, object-oriented, concurrent, logic, and functional) in a uniform setting that shows their deep relationships and how to use them together. Widely-different practical languages (exemplified by Java, Haskell, Prolog, and Erlang) with their rich panoplies of abstractions and syntax are explained by straightforward translations into closely-related kernel languages, simple languages that consist of small numbers of programmer-significant concepts. Kernel languages are easy to understand and have a simple formal semantics that can be used by practicing programmers to reason about correctness and complexity. We have taught the approach at three universities in courses ranging from second-year undergraduate courses to graduate courses. We are completing a textbook with accompanying materials. As part of a curriculum, the approach naturally complements courses on algorithms & data structures and program design & software engineering. The approach is the fruit of ten years of research by an international team, the Mozart Consortium. 1 Existing Approaches For the purposes of this paper, let us consider a broad definition of computer programming as bridging the gap between specification and running program. This consists in designing the architecture and abstractions of an application and coding them in a programming language. The discipline of programming has two essential parts: a technology and its scientific foundation. The technology consists of tools, techniques, and standards, allowing to do programming. The science consists of a broad and deep theory with predictive power, allowing to understand programming. The science should be practical, that is, able to explain the technology, making it useful for a practicing programmer. Teaching programming means to teach both the science and the technology. Surprisingly, we find that programming is almost never taught in this way. Surveying existing textbooks, we find that programming is taught in three different ways.

[1]  Frédéric Loulergue,et al.  Développement d'applications avec Objective CAML by E. Chailloux, P. Manoury and B. Pagano, O'Reilley, 2003 , 2004, Journal of functional programming.

[2]  Joe Armstrong,et al.  Concurrent programming in ERLANG , 1993 .

[3]  R. Bird Introduction to functional programming using Haskell, Second Edition , 1998 .

[4]  Doug Lea Concurrent Programming in Java. Second Edition: Design Principles and Patterns , 1999 .

[5]  Doug Lea,et al.  Concurrent Programming In Java , 1996 .

[6]  Flemming Nielson,et al.  Semantics with applications - a formal introduction , 1992, Wiley professional computing.

[7]  Leon Sterling,et al.  The Art of Prolog - Advanced Programming Techniques , 1986 .

[8]  Bjørn Kirkerud Programming language semantics : imperative and object-oriented languages , 1997 .

[9]  N. S. Barnett,et al.  Private communication , 1969 .

[10]  David Lorge Parnas Teaching Programming as Engineering , 1995, ZUM.

[11]  Paul Hudak The Haskell School of Expression: Learning Functional Programming through Multimedia , 1999 .

[12]  Gregory R. Andrews,et al.  Concurrent programming - principles and practice , 1991 .

[13]  Max Hailperin,et al.  Concrete Abstractions: An Introduction to Computer Science Using Scheme , 1998 .

[14]  Matthias Felleisen,et al.  How to Design Programs: An Introduction to Computing and Programming , 2006 .

[15]  Srinivas Nedunuri The functional approach to programming , 2000, SOEN.

[16]  Peter Van Roy,et al.  Concepts, Techniques, and Models of Computer Programming , 2004 .

[17]  Mitchell Wand,et al.  Essentials of programming languages , 2008 .

[18]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[19]  Brian W. Kernighan,et al.  C programming language third edition , 2015 .

[20]  Ivan Bratko,et al.  Prolog Programming for Artificial Intelligence, 4th Edition , 2012 .

[21]  Juris Reinfelds Teaching of Programming with a Programmer's Theory of Programming , 2002, Informatics Curricula and Teaching Methods.

[22]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[23]  Peter Van Roy,et al.  Teaching Programming Broadly and Deeply: The Kernel Language Approach , 2002, Informatics Curricula and Teaching Methods.

[24]  Michael Main Data structures & other objects using Java , 1999 .

[25]  Ken Arnold,et al.  The Java Programming Language, Second Edition , 1999 .

[26]  Roger M. Needham,et al.  On the duality of operating system structures , 1979, OPSR.

[27]  Barbara Liskov,et al.  Program Development in Java - Abstraction, Specification, and Object-Oriented Design , 1986 .

[28]  Gerald J. Sussman,et al.  Structure and Interpretation of Computer Programs, Second Edition , 1996 .

[29]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[30]  Bruce J. MacLennan,et al.  Functional programming - practice and theory , 1990 .

[31]  G. Winskel The formal semantics of programming languages , 1993 .

[32]  Timothy A. Budd,et al.  Multiparadigm programming in Leda , 1994 .

[33]  Gerald J. Sussman,et al.  Structure and interpretation of computer programs , 1985, Proceedings of the IEEE.