Reading SICP 2 : Metalinguistic Abstraction

如题所述

第1个回答  2022-07-13
SICP( Structure and Interpretation of Computer Programs )

In our study of program design, we have seen that expert programmers control the complexity of their designs with the same general techniques used by designers of all complex systems.

1) The major purpose is to control the complexity. 

2) This chapter will show a different way from general techniques which are used by other kinds of engineer.

expert ** /ˈekspɜːrt/ 

1-N-COUNT An expert is a person who is very skilled at doing something or who knows a lot about a particular subject.

eg:...a yoga expert.

2.ADJ Someone who is expert at doing something is very skilled at it.

eg: The Japanese are expert at lowering manufacturing costs.

They combine primitive elements to form compound objects, they abstract compound objects to form higher-level building blocks, and they preserve modularity by adopting appropriate large-scale views of system structure.

What is abstraction? In higher-level view , when you change your perspective to a higher-level, you will use the higher-level material which is the compound objects or compound blocks or modularity.

Usually we use three levels to change perspective. so there will be three level blocks as material.

combine * /kəm'bain/ (verb)      /ˈkɒmbain/ (noun)

1.VERB If you combine two or more things or if they combine, they exist together.

eg: The Chruch has something to say on how to combine freedom with responsibility.

2.VERB If you combine two or more things or if they combine, they join together to make a single thing.

Synonyms: mix/bind/merge

primitive /'primitiv/  

1.ADJ Primitive means belonging to a society in which people live in a very simple way, usually without industries or a writing system.

eg: ...studies of primitive societies.

3.ADJ If you describe something as primitive, you mean that it is very simple in style or very old-fashioned.

eg:It's using some rather primitive technology.

compound /kəm'paʊnd/(verb)   /'kɒmpaʊnd/(noun) 

1.N-COUNT A compound is an area of land that is used for a particular purpose.

eg:...a military compound.

2.N-COUNT In chemistry, a compound is a substance that consists of two or more elements.

3.N-COUNT If something is a compound of different things, it consists of those things.

4.ADJ Compound is used to indicate that something consists of two or more parts or things.

eg...the compound microscope.

preserve * /prizɜːrv/       remain / not change 

1.VERB If you preserve a situation or condition, you make sure that it remains as it is, and does not change or end.

eg: We will do everything to preserve peace.

2.VERB If you preserve something, you take action to save it or protect it from damage or decay.

eg: We need to preserve the forest.

adopt ** /'ədɒpt/    begin to have it

1.VERB If you adopt a new attitude, plan, or way of behaving, you begin to have it.

2.VERB If you adopt someone else's child, you take it into your own family and make it legally your son or daughter.

eg: ... to adopt a child.

appropriate /'əproʊpriət/ (ADJ)   suitable   /'əproʊprieit/ (VERB)    

1.ADJ Something that is appropriate is suitable or acceptable for a particular situation.

eg: The teacher can then take appropriate action.

2.VERB If someone appropriates something which does not belong to them, they take it, usually without the right to do so.

eg: Several other newspapers have appropriated the idea.

In illustrating these techniques, we have used Lisp as a language for describing processes and for constructing computational data objects and processes to model complex phenomena in the real world.

We can use Lisp to build it, but it will be too complex to control. So now we can use another way that is build a new language (DSL).

The final purpose of constructing program is to model complex phenomena in the real world.

illustrate* /'iləstreit/         show

1.VERB If you say that something illustrates a situation that you are drawing attention to, you mean that it shows that the situation exists.

eg: The example of the United States illustrates this point.

2.VERB If you use an example, story, or diagram to illustrate a point, you use it show that what you are saying is true or to make your meaning clearer.

eg:Let me give another example to illustrate this difficult point.

phenomena  /'finɒminə/

Phenomena is the plural of phenomenon.

phenomenon /'finɒminən/

1.N-COUNT A phenomenon is something that is observed to happen or exist.

eg: ...scientific explanations of natural phenomena.

However, as we confront increasingly complex problems, we will find that Lisp, or indeed any fixed programming language, is not sufficient for our needs. We must constantly turn to new languages in order to express our ideas more effectively.

Establishing new languages is a powerful strategy for controlling complexity in engineering design; we can often enhance our ability to deal with a complex problem by adopting a new language that enables us to describe (and hence to think about) the problem in a different way, using primitives, means of combination, and means of abstraction that are particularly well suited to the problem at hand.

Why we should create a new language? Because there is a big space between our business and any fixed programming language, like Lisp. So we need a middle layer to reduce the complex , the middle layer calls a new language or a new interpreter.

from :  business --> Lisp

to :      business --> a new language --> Lisp

The new language not only change the way of working but  the way of our thinking. Because we will be in a higher level perspective. It is almost like the consciousness of human beings , consciousness let human can think at a different place as a cat or a dog. But the  material of brain are the same,  nether a cat or a human.

confront * /kə'frʌnt/    deal with

1.VERB If you are confronted with a problem, task, or difficulty, you have to deal with it.

eg: She was confronted with severe money problems.

2.VERB If you confront a difficult situation or issue, you accept the fact that it exists and try to deal with it.

eg: We are learning how to confront death.

sufficient * /sə'fiʃənt/    enough

1.ADJ If something is sufficient for a particular purpose, there is enough of it for the purpose.

eg:  There was not sufficient evidence to secure a conviction.

constant ** /'kɒnstənt/   not change

1.ADJ You use constant to describe something that happends all the time or is always there.

constantly ADV

eg: The direction of the wind is constantly changing.

enhance * /in'hɑːns/    improve

1.VERB To enhance something means to improve its value, quality, or attractiveness.

eg: They'll be keen to enhance their reputation abroad.

hence /'hens/

1.ADV You use hence to indicate that the statement you are about to make is a consequence of what you have just said.

eg:The trade imbalance is likely to rise again in 1990. Hence a new set of policy actions will be required soon.

suited /'su:tid/

1.ADJ If something is well suited to a particular purpose, it is right or appropriate for that purpose. If someone is well suited to a particular job they are right or appropriate for that job.

Programming is endowed with a multitude of languages. There are physical languages, such as the machine languages for particular computers. These languages are concerned with the representation of data and control in terms of individual bits of storage and primitive machine instructions . The machine-language programmer is concerned with using the given hardware to erect systems and utilities for the efficient implementation of resource-limited computations. High-level languages, erected on a machine-language substrate , hide concerns about the representation of data as collections of bits and the representation of programs as sequences of primitive instructions . These languages have means of combination and abstraction , such as procedure definition, that are appropriate to the larger-scale organization of systems.

Intel Cpu (ADM is another) is an interpreter of one kind of machine languages, but this time the interpreter's material is physical logic unit , which can be called "NAND GATE".

The relationship, between High-level language and machine language, is the same as our new language and Lisp.

The high-level language can alway hide detail and shows combination and abstraction.

Why the abstraction so important? Because abstraction close to the essential of real business purpose.

endow  /in'daʊ/    give

1.VERB You say that someone is endowed with a particular desirable ability, characteristic, or possession when they have it by chance or by birth.

eg: You are endowed with wealth, good health and a lively intellect.

2.VERB If you endow something with a particular feature or quality, you provide it with that feature or quality.

eg: Herbs have been used for centuries to endow a whole range of foods with subtle flavours.

3.VERB If someone endows an institution, scholarship, or project, they provide a large amount of money which will produce the income needed to pay for it.

eg: The ambassador has endowed a $1 million public-service fellowships program.

concern *** /kən'sɜːrn/    concerned with 

7.VERB If you concern yourself with something, you give it attention because you think that it is important.

eg: I didn't concern myself with politics.

- concerned ADJ [v-link ADJ with n]

eg: The agency is more concerned with making arty ads than understanding its clients' businesses.

8.VERB If something such as a book or a piece of information concerns a particular subject, it is about that subject.

eg: The bulk of the book concerns Sandy's two middle-aged children.

eg: Chapter 2 concerns itself with the methodological difficulties.

- concerned ADJ [v-link ADJ with n]

eg: Randolph's work was exclusively concerned with the effects of pollution on health.

instruction * /instrʌkʃən/    order/command/rule/direction

1.N-COUNT An instruction is something that someone tells you to do.

eg: Tow lawyers were told not to leave the building but no reason for this instruction was given.

3.N-PLURAL Instructions are clear and detailed information on how to do something.

eg: Always read the instructions before you start taking the medicine.

erect /i'rekt/    create/build

1.VERB If people erect something such as a building, bridge, or barrier, they build it or create it.

2.VERB If you erect a system, a theory, or an institution, you create it.

utility  /juːˈtiləti/

1.N-UNCOUNT The utility of something is its usefulness.

2.N-COUNT A utility is an important service such as water, electricity, or gas that is provided for everyone, and that everyone pays for.

eg:...public utilities such as gas, electricity and phones.

substrate  /'sʌbstreit/     basic layer

1. N the substance upon which an enzyme acts 基质 [biochem]

another word for substratum

substratum /'sʌbstrɑːtəm/

1.N-COUNT A substratum of something is a layer that lies under the surface of another layer, or a feature that is less obvious than other features.

eg: ... its deep substraum of chalk.

Metalinguistic abstraction--establishing new languages--plays an important role in all branches of engineering design. It is particularly important to computer programming, because in programming not only can we formulate new languages but we can also implement these languages by constructing evaluators. An evaluator(or interpreter) for a programming language is a procedure that, when applied to an expression of the language, performs the actions required to evaluate that expression.

It is no exaggeration to regard this as the most fundamental idea in programming:

The evaluator, which determines the meaning of expressions in a programming language, is just another program.

The basic idea in programming is about interpreter.  The interpreter is just another program. Everything is interpreter , everything is program.

An evaluator means An Interpreter. It is working like to evaluate the expression.

Metalinguistic  /ˌmetəliŋˈɡwistik/    meta-interpreter

Metalingual (metalinguistic) function: the function of language that can be used to talk about language itself.

formulate  /ˈfɔːrmjuleit/    create/invent

1.  V-T If you  formulate  something such as a plan or proposal, you invent it, thinking about the details carefully. 

eg: Little by little, he formulated his plan for escape.

2.V-T If you  formulate  a thought, opinion, or idea, you express it or describe it using particular words. 

eg: I was impressed by the way he could formulate his ideas.

exaggeration  /iɡˌzædʒəˈreiʃn/

1.the act of making something more noticeable than usual

eg: "the dance involved a deliberate exaggeration of his awkwardness"

regard       consider

1.  V-T If you  regard  someone or something  as  being a particular thing or  as  having a particular quality, you believe that they are that thing or have that quality.

2. V-T If you  regard  something or someone  with  a feeling such as dislike or respect, you have that feeling about them. 

To appreciate this point is to change our images of ourselves as programmers. We come to see ourselves as designers of languages, rather than only users of languages designed by others.

Change position. change our images from user to creator.When you change to be a creator it is a different world. That means you will see a new worldview.

In fact, we can regard almost any program as the evaluator for some language . For instance, the polynomial manipulation system of section 2.5.3 embodies the rules of polynomial arithmetic and implements them in terms of operations on list-structured data. If we augment this system with procedures to read and print polynomial expressions, we have the core of a special-purpose language for dealing with problems in symbolic mathematics. The digital-logic simulator of section 3.3.4 and the constraint propagator of section 3.3.5 are legitimate languages in their own right, each with its own primitives, means of combination, and means of abstraction. Seen from this perspective, the technology for coping with large-scale computer systems merges with the technology for building new computer languages, and computer science itself becomes no more(and no less) than the discipline of constructing appropriate descriptive languages.

My understanding:

1)What? A common perspective that every business is the discipline of constructing appropriate descriptive languages. or we can say : creating an interpreter.

2)Why? Author want tell us the essential of computer science.

3)How? The most important thing is to understanding the essential of interpreter. Because computer science itself is to create interpreter. An application is an interpreter too.

4)The meaning is the water, the descriptive languages is the pipeline. The God is the water, Pray is the pipeline.  Focus on direction.

5)We don't need too much resource we need information to let our mind focus on the correct direction.

In this chapter we shall use Lisp as a base, implementing evaluators as Lisp procedures. Lisp is particularly well suited to this task, because of its ability to represent and manipulate symbolic expressions. We will take the first step in understanding how languages are implemented by building an evaluator for Lisp itself.

1)What? The behavior is using Lisp to build a evaluator for Lisp itself.

2)Why? Because Lisp is the most simply language.
相似回答