Programming in XML”
Total Page:16
File Type:pdf, Size:1020Kb
Growing a Language from the Inside Out Theo D’Hondt Growing a Language from the Inside Out Francqui Chair - 2010 Inaugural Lecture - 19 March 2010 Theo D’Hondt Software Languages Lab Faculty of Sciences - Vrije Universiteit Brussel http://soft.vub.ac.be Francqui Chair - 2010 1 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Francqui Chair - 2010 2 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Francqui Chair - 2010 2 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Converting to MP3 Francqui Chair - 2010 2 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Francqui Chair - 2010 3 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Compiling a big project Francqui Chair - 2010 3 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Francqui Chair - 2010 4 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Compiling a small project Francqui Chair - 2010 4 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Francqui Chair - 2010 5 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Application with green threads Francqui Chair - 2010 5 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Francqui Chair - 2010 6 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt A Simple Experiment Application without threads Francqui Chair - 2010 6 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt The infamous “law” of Moore Francqui Chair - 2010 7 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt The infamous “law” of Moore This is a law of human ingenuity, not a law of nature Francqui Chair - 2010 7 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt The infamous “law” of Moore This is a law of human ingenuity, not a law of nature This law has hit a law of nature Francqui Chair - 2010 7 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt The infamous “law” of Moore This is a law of human ingenuity, not a law of nature This law has hit a law of nature Ingenuity has kicked in again, but in a different direction Francqui Chair - 2010 7 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt Computer{Engineering|Science} Replication instead of Miniaturization Concurrency becomes the Default Francqui Chair - 2010 8 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt Technology Response Multi-core processors Hyperthreading Multi-level caching Francqui Chair - 2010 9 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt An Apt Quote ... “Software gets slower, faster than hardware gets faster” Niklaus Wirth, 1995 Francqui Chair - 2010 10 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt The General Feeling of Security Francqui Chair - 2010 11 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt The General Feeling of Security Shmuel Katz CS department Technion Francqui Chair - 2010 11 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt The General Feeling of Security Shmuel Katz CS department Technion Francqui Chair - 2010 11 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt History repeats itself Francqui Chair - 2010 12 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt History repeats itself Francqui Chair - 2010 12 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt History repeats itself Francqui Chair - 2010 12 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt History repeats itself Anno 1990 Francqui Chair - 2010 12 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt Occam = Instantiation of CSP grams, three basic constructs have received widespread recognition and use: A repetitive construct (e.g. the while loop), an alternative construct (e.g. the conditional if..then..else), and normal sequential program composi- Programming S. L. Graham, R. L. Rivest tion (often denoted by a semicolon). Less agreement has Teclmiques Editors been reached about the design of other important pro- gram structures, and many suggestions have been made: Communicating Subroutines (Fortran), procedures (Algol 60 [15]), entries (PL/I), coroutines (UNIX [171), classes (SIMULA 67 [5]), Sequential Processes processes and monitors (Concurrent Pascal [2]), clusters (CLU [13]), forms (ALPHARD [19]), actors (Hewitt [1]). C.A.R. Hoare The traditional stored program digital computer has The Queen's University been designed primarily for deterministic execution of a Belfast, Northern Ireland single sequential program. Where the desire for greater speed has led to the introduction of parallelism, every attempt has been made to disguise this fact from the This paper suggests that input and output are basic programmer, either by hardware itself (as in the multiple primitives of programming and that parallel function units of the CDC 6600) or by the software (as composition of communicating sequential processes is a in an I/O control package, or a multiprogrammed op- fundamental program structuring method. When erating system). However, developments of processor combined with a development of Dijkstra's guarded technology suggest that a multiprocessor machine, con- command, these concepts are surprisingly versatile. structed from a number of similar self-contained proc- Their use is illustrated by sample solutions of a variety essors (each with its own store), may become more of familiar programming exercises. powerful, capacious, reliable, and economical than a Key Words and Phrases: programming, machine which is disguised as a monoprocessor. programming languages, programming primitives, In order to use such a machine effectively on a single program structures, parallel programming, concurrency, task, the component processors must be able to com- input, output, guarded commands, nondeterminacy, municate and to synchronize with each other. Many coroutines, procedures, multiple entries, multiple exits, methods of achieving this have been proposed. A widely classes, data representations, recursion, conditional adopted method of communication is by inspection and critical regions, monitors, iterative arrays updating of a common store (as in Algol 68 [18], PL/I, CR Categories: 4.20, 4.22, 4.32 and many machine codes). However, this can create severe problems in the construction of correct programs and it may lead to expense (e.g. crossbar switches) and 1. Introduction unreliability (e.g. glitches) in some technologies of hard- ware implementation. A greater variety of methods has Among the primitive concepts of computer program- been proposed for synchronization: semaphores [6], ming, and of the high level languages in which programs events (PL/I), conditional critical regions [10], monitors are expressed, the action of assignment is familiar and and queues (Concurrent Pascal [2]), and path expressions well understood. In fact, any change of the internal state [3]. Most of these are demonstrably adequate for their of a machine executing a program can be modeled as an purpose, but there is no widely recognized criterion for assignment of a new value to some variable part of that choosing between them. machine. However, the operations of input and output, This paper makes an ambitious attempt to find a which affect the external environment of a machine, are single simple solution to all these problems. The essential not nearly so well understood. They are often added to proposals are: a programming language only as an afterthought. (1) Dijkstra's guarded commands [8] are adopted (with Among the structuring methods for computer pro- a slight change of notation) as sequential control struc- General permission to make fair use in teaching or research of all tures, and as the sole means of introducing and control- or part of this material is granted to individual readers and to nonprofit ling nondeterminism. libraries acting for them provided that ACM's copyright notice is given (2) A parallel command, based on Dijkstra's and that reference is made to the publication, to its date of issue, and parbegin to the fact that reprinting privileges were granted by permission of the [6], specifies concurrent execution of its constituent se- Association for Computing Machinery. To otherwise reprint a figure, quential commands (processes). All the processes start table, other substantial excerpt, or the entire work requires specific simultaneously, and the parallel command ends only permission as does republication, or systematic or multiple reproduc- tion. when they are all finished. They may not communicate This research was supported by a Senior Fellowship of the Science with each other by updating global variables. Research Council. (3) Simple forms of input and output command are Author's present address: Programming Research Group, 45, Ban- bury Road, Oxford, England. introduced. They are used for communication between © 1978 ACM 0001-0782/78/0800-0666 $00.75 concurrent processes. 666 Communications August 1978 of Volume 21 the ACM Number 8 Francqui Chair - 2010 13 Inaugural Lecture Growing a Language from the Inside Out Theo D’Hondt Occam = Instantiation of CSP grams, three basic constructs have received widespread recognition and use: A repetitive construct (e.g. the while loop), an alternative construct (e.g. the conditional if..then..else), and normal sequential program composi- Programming S. L. Graham, R. L. Rivest tion (often denoted by a semicolon). Less agreement has Teclmiques Editors been reached about the design of other important pro- gram structures, and many suggestions have been made: Communicating Subroutines (Fortran), procedures (Algol 60 [15]), entries (PL/I), coroutines (UNIX [171), classes (SIMULA 67 [5]), Sequential Processes processes and monitors (Concurrent Pascal [2]), clusters (CLU [13]), forms (ALPHARD [19]), actors (Hewitt [1]).