Process as a black box abstract

Source: Internet
Author: User

As you can see, the calculation of the square root can be naturally decomposed into several sub-problems: How to say a guess is good enough, how to improve a guess, and so on. Each of these tasks is accomplished through a separate process, and the entire SPRT program can be seen as a family process (1-2), which directly reflects the decomposition from the original problem to the sub-problem.

The importance of this decomposition is not just that it breaks down a problem into several parts. Of course, we can always get a large program, and divide it into several parts: the first 10 lines, the next 10 lines, and then 10 rows and so on. The key question here is. Each process in the decomposition completes a work that can be clearly marked, which allows them to be used as a module for defining other processes. For example, when we define a process based on square Good-enough? , the square is seen as a "black box". In doing so, we simply do not have to pay attention to how the process calculates its results, but only the fact that it can calculate the square value. The details about how the squares are calculated are hidden away, and can be postponed until later to be considered. Is this the case, if you only look at Good-enough? process, rather than square is a process, rather it is the abstraction of a process, the so-called process abstraction . At this level of abstraction, any process that can calculate the sum of squares can also be used.

The construction and interpretation of computer programs

Process as a black box abstract

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.