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 us...
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.
作者简介
· · · · · ·
Peter Van Roy is Professor in the Department of Computing Science and Engineering at Université catholique de Louvain, at Louvain-la-Neuve, Belgium.
Seif Haridi is Professor of Computer Systems in the Department of Microelectronics and Information Technology at the Royal Institute of Technology, Sweden, and Chief Scientific Advisor of the Swedish Institute of Computer Science.
喜欢读"Concepts, Techniques, and Models of Computer Programming"的人也喜欢的电子书
· · · · · ·
Correctness To prove correctness in general, we have to reason about the program. This means three things: We need a mathematical model of the operations of the programming language, defining what they should do. This model is called the language’s semantics. We need to define what we would like the program to do. Usually, this is a mathematical definition of the inputs that the program needs ...
2011-05-24 04:48:591人喜欢
Correctness
To prove correctness in general, we have to reason about the program. This means three things:
We need a mathematical model of the operations of the programming language, defining what they should do. This model is called the language’s semantics.
We need to define what we would like the program to do. Usually, this is a mathematical definition of the inputs that the program needs and the output that it calculates. This is called the program’s specification.
We use mathematical techniques to reason about the program, using the semantics. We would like to demonstrate that the program satisfies the specification.引自第9页
Top-down software development Let us summarize the methodology we used to write Pascal: The first step is to understand how to do the calculation by hand. The second step is to write a main function to solve the problem, assuming that some auxiliary functions are known. The third step is to complete the solution by writing the auxiliary functions. The methodology of first writing the main funct...(3回应)
2011-05-23 22:20:301人喜欢
Top-down software development
Let us summarize the methodology we used to write Pascal:
The first step is to understand how to do the calculation by hand.
The second step is to write a main function to solve the problem, assuming that some auxiliary functions are known.
The third step is to complete the solution by writing the auxiliary functions.
The methodology of first writing the main function and filling in the blanks afterward is known as top-down software development. It is one of the best known approaches to program design, but it gives only part of the story as we shall see.引自第8页
书中的前言部分 Programming as defined above has two essential parts: a technology and its scientific foundation. The technology consists of tools, practical techniques, and standards, allowing us to do programming. The science consists of a broad and deep theory with predictive power, allowing us to understand programming. Ideally, the science should explain the technology in a way that is as d...
2011-05-23 16:47:13
书中的前言部分
Programming as defined above has two essential parts: a technology and its scientific foundation. The technology consists of tools, practical techniques, and standards, allowing us to do programming. The science consists of a broad and deep theory with predictive power, allowing us to understand programming. Ideally, the science should explain the technology in a way that is as direct and useful as possible.
If either part is left out, we are no longer doing programming. Without the technology, we are doing pure mathematics. Without the science, we are doing a craft, i.e., we lack deep understanding. Teaching programming correctly therefore means teaching both the technology (current tools) and the science (fundamental concepts). Knowing the tools prepares the student for the present. Knowing the concepts prepares the student for future developments.引自第1页
Top-down software development Let us summarize the methodology we used to write Pascal: The first step is to understand how to do the calculation by hand. The second step is to write a main function to solve the problem, assuming that some auxiliary functions are known. The third step is to complete the solution by writing the auxiliary functions. The methodology of first writing the main funct...(3回应)
2011-05-23 22:20:301人喜欢
Top-down software development
Let us summarize the methodology we used to write Pascal:
The first step is to understand how to do the calculation by hand.
The second step is to write a main function to solve the problem, assuming that some auxiliary functions are known.
The third step is to complete the solution by writing the auxiliary functions.
The methodology of first writing the main function and filling in the blanks afterward is known as top-down software development. It is one of the best known approaches to program design, but it gives only part of the story as we shall see.引自第8页
Correctness To prove correctness in general, we have to reason about the program. This means three things: We need a mathematical model of the operations of the programming language, defining what they should do. This model is called the language’s semantics. We need to define what we would like the program to do. Usually, this is a mathematical definition of the inputs that the program needs ...
2011-05-24 04:48:591人喜欢
Correctness
To prove correctness in general, we have to reason about the program. This means three things:
We need a mathematical model of the operations of the programming language, defining what they should do. This model is called the language’s semantics.
We need to define what we would like the program to do. Usually, this is a mathematical definition of the inputs that the program needs and the output that it calculates. This is called the program’s specification.
We use mathematical techniques to reason about the program, using the semantics. We would like to demonstrate that the program satisfies the specification.引自第9页
Complexity A lesson we can learn from this example is that using a good algorithm is more important than having the best possible compiler or fastest machine. 复杂度 从这个例子我们可以看到,使用一个好的算法比优秀的编译器或者更快的机器更重要。
2011-05-24 05:16:15
Complexity
A lesson we can learn from this example is that using a good algorithm is more important than having the best possible compiler or fastest machine.引自第11页
difference list有点像用两个指针表示list,一个指向队头,一个指向队尾 不过list是嵌套的结构,所以是一个指向最外层,一个指向最内层 最内层指向的是一个unbound的variable,所以bound这个variable到另一个list就等于连接两个list 比如 1 | 2 | X # X = A # X 3 | 4 | Y # Y = B # Y X是unbound的,如果X = B,也就是X bound到3 | 4 | Y 那么 1 | 2 | 3 | 4 | Y # X = A # X 1 | 2 | 3 | 4 | Y = A A仍然指向最外层,但内层已...
2012-01-15 16:33:13
difference list有点像用两个指针表示list,一个指向队头,一个指向队尾
不过list是嵌套的结构,所以是一个指向最外层,一个指向最内层
最内层指向的是一个unbound的variable,所以bound这个variable到另一个list就等于连接两个list
比如
1 | 2 | X # X = A # X
3 | 4 | Y # Y = B # Y
X是unbound的,如果X = B,也就是X bound到3 | 4 | Y
那么
1 | 2 | 3 | 4 | Y # X = A # X
1 | 2 | 3 | 4 | Y = A
A仍然指向最外层,但内层已经链接起来了,最内层的unbound variable是Y
于是A和Y又可以产生另一个difference list A # Y
把difference list当queue用,过程如下
创建队列的时候,两个variable identifier是指向同一个variable的,也就是q(0 X X),这个X指向的variable是unbound的
从指针的角度看,就是队首队尾指针指向同一个位置
然后是插入,首先创建一个unbound的variable,也就是E1,然后将要插入的值X和它组成一个tuple
X | E1
再将这个tuple bound到当前队列里那个unbound的variable,也就是E
E = X | E1
也就是原来的
S # E (这个S和E应该就是Start和End的缩写了
成了
S # X | E1
相当于队尾指针指向了一个新的值X
于是E1成了队尾,
所以返回的队列是q(N + 1, S, E1)
出队时,S = X | S1,相当于X指向队首元素,S1作为新的队首,所以返回的队列是
q(N - 1, S1, E)
0 有用 QWERTY 2012-02-03 12:29:44
看到第9章了,搁置之,后面那些有空再看吧,因为兴趣不大了。与其勉强看完,不如暂别
0 有用 GW_Parables 2014-04-27 12:03:55
外行用来学习的,能理解逻辑,具体的细节没法深究了
0 有用 罗吉 2022-01-29 09:00:40
高屋建瓴,不学电脑也应该读的电脑书之一。
0 有用 nil 2013-03-24 19:15:11
说啥呢,看不懂
0 有用 whunmr 2015-03-15 17:43:23
介绍的太宽泛。到是可以当梳理知识的线索。
0 有用 罗吉 2022-01-29 09:00:40
高屋建瓴,不学电脑也应该读的电脑书之一。
0 有用 whunmr 2015-03-15 17:43:23
介绍的太宽泛。到是可以当梳理知识的线索。
0 有用 GW_Parables 2014-04-27 12:03:55
外行用来学习的,能理解逻辑,具体的细节没法深究了
0 有用 nil 2013-03-24 19:15:11
说啥呢,看不懂
0 有用 QWERTY 2012-02-03 12:29:44
看到第9章了,搁置之,后面那些有空再看吧,因为兴趣不大了。与其勉强看完,不如暂别