TAILIEUCHUNG - Concepts, Techniques, and Models of Computer Programming - Chapter 4

Declarative Concurrency Mô hình khai báo của Chương 2 cho phép chúng ta viết nhiều chương trình và sử dụng các kỹ thuật lý luận mạnh mẽ vào chúng. Nhưng, như Phần giải thích, có tồn tại các chương trình hữu ích mà không có thể được viết một cách dễ dàng hoặc có hiệu quả ở trong đó. Ví dụ, một số chương trình được viết như là một tập hợp các hoạt động thực thi độc lập. Những chương trình này được gọi là đồng thời | Chapter 4 Declarative Concurrency Twenty years ago parallel skiing was thought to be a skill attainable only after many years of training and practice. Today it is routinely achieved during the course of a single skiing season. . All the goals of the parents are achieved by the children . But the movements they make in order to produce these results are quite different. - Mindstorms Children Computers and Powerful Ideas 141 Seymour Papert 1980 The declarative model of Chapter 2 lets us write many programs and use powerful reasoning techniques on them. But as Section explains there exist useful programs that cannot be written easily or efficiently in it. For example some programs are best written as a set of activities that execute independently. Such programs are called concurrent. Concurrency is essential for programs that interact with their environment . for agents GUI programming OS interaction and so forth. Concurrency also lets a program be organized into parts that execute independently and interact only when needed . client server and pro-ducer consumer programs. This is an important software engineering property. Concurrency can be simple This chapter extends the declarative model of Chapter 2 with concurrency while still being declarative. That is all the programming and reasoning techniques for declarative programming still apply. This is a remarkable property that deserves to be more widely known. We will explore it throughout this chapter. The intuition underlying it is quite simple. It is based on the fact that a dataflow variable can be bound to only one value. This gives the following two consequences What stays the same The result of a program is the same whether or not it is concurrent. Putting any part of the program in a thread does not change the result. Copyright 2001-3 by P. Van Roy and S. Haridi. All rights reserved. 238 Declarative Concurrency What is new The result of a program can be calculated incrementally. If the input to a .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.