Concepts, Techniques, and Models of Computer Programming (MIT Press)

Concepts, Techniques, and Models of Computer Programming (MIT Press)

Peter Van Roy

Language: English

Pages: 936

ISBN: 0262220695

Format: PDF / Kindle (mobi) / ePub

Concepts, Techniques, and Models of Computer Programming (MIT Press)

Peter Van Roy

Language: English

Pages: 936

ISBN: 0262220695

Format: PDF / Kindle (mobi) / ePub


This innovative text presents computer programming as a unified discipline in a way that is both practical and scientifically sound. The book focuses on techniques of lasting value and explains them precisely in terms of a simple abstract machine. The book presents all major programming paradigms in a uniform framework that shows their deep relationships and how and where to use them together. After an introduction to programming concepts, the book presents both well-known and lesser-known computation models ("programming paradigms"). Each model has its own set of techniques and each is included on the basis of its usefulness in practice. The general models include declarative programming, declarative concurrency, message-passing concurrency, explicit state, object-oriented programming, shared-state concurrency, and relational programming. Specialized models include graphical user interface programming, distributed programming, and constraint programming. Each model is based on its kernel language -- a simple core language that consists of a small number of programmer-significant elements. The kernel languages are introduced progressively, adding concepts one by one, thus showing the deep relationships between different models. The kernel languages are defined precisely in terms of a simple abstract machine. Because a wide variety of languages and programming paradigms can be modeled by a small set of closely related kernel languages, this approach allows programmer and student to grasp the underlying unity of programming. The book has many program fragments and exercises, all of which can be run on the Mozart Programming System, an Open Source software package that features an interactive incremental development environment.

GitHub Essentials

Michael Abrash's Graphics Programming Black Book (Special Edition)

Windows® Phone 7 Developer Guide: Building connected mobile applications with Microsoft Silverlight® (Patterns & Practices)

Django 1.1 Testing and Debugging

 

 

 

 

 

 

 

 

 

 

introduced with the Lisp language in the late 1950’s and has stuck ever since [120]. Our use of the vertical bar comes from Prolog, a logic programming language that was invented in the early 1970’s [40, 182]. Lisp itself writes the cons as (H . T), which it calls a dotted pair. Copyright c 2001-3 by P. Van Roy and S. Haridi. All rights reserved. 8 Introduction to Programming Concepts 1 1 1 (0) 1 First row 1 2 3 Second row 1 3 Third row 1 (0) + + + + + 1 4 6 4 1 Fourth row

if x then s 1 else s 2 end case x of pattern then s 1 else s { x y 1 ... y n } try s 1 catch x then s 2 end raise x end 2 Empty statement Statement sequence Variable creation Variable-variable binding Value creation Conditional end Pattern matching Procedure application Exception context Raise exception Table 2.9: The declarative kernel language with exceptions s end, that is needed internally for the semantics and is not allowed in programs. The catch statement is a “marker” on the semantic

default), Graph, and Minimal Graph. Tree does not take sharing or cycles into account. Graph correctly handles sharing and cycles by displaying a graph. Minimal Graph shows the smallest graph that is consistent with the data. We give some examples. Consider the following two unifications: local X Y Z in f(X b)=f(a Y) f(Z a)=Z {Browse [X Y Z]} end This shows the list [a b R14=f(R14 a)] in the browser, if the browser is set up to show the Graph representation. The term R14=f(R14 a) is the textual

fragments even when they are in an incomplete or inconsistent state. • Static typing allows to catch more program errors at compile time. The static type declarations are a partial specification of the program, i.e., they specify part of the program’s behavior. The compiler’s type checker verifies that the program satisfies this partial specification. This can be quite powerful. Modern static type systems can catch a surprising number of semantic errors. • Static typing allows a more efficient

L1=Y|L3 {ButLast L2 X L3} end end The problem with this implementation is that ButLast is slow: it takes time proportional to the number of elements in the queue. On the contrary, we would like both the insert and delete operations to be constant-time. That is, doing an operation on a given implementation and machine always takes time less than some constant number of seconds. The value of the constant depends on the implementation and machine. Whether or not we can achieve the constant-time

Download sample

Download