Please select random order or first card below to begin studying 🤓
Congratulations! You have finished studying this set of cards
Is the substitution model described in SICP normal-order evaluation or applicative-order evaluation?
Applicative-order evaluation
What are the operator and operands of a Lisp expression considered, that must be evaluated for the expression to be evaluated?
Subexpressions
What evaluation model is described in SICP as simply evaluating the operator and operands and applying the resulting procedure to the resulting arguments?
Applicative-order evaluation
What evaluation model is described in SICP as something that involves "fully expand and reduce" and not evaluating the operands until their values are needed?
Normal-order evaluation
What is the important difference between mathematical functions and computer procedures according to SICP?
Procedures must be effective
What example does SICP give to show how a mathematical function is not "effective"?
Define the square-root function of x as the y such that y is greater than or equal to zero and y squared is x. This describes a legitimate mathematical function but it does not describe a procedure because it does not tell us how to find the square root of a given number
What type of knowledge is computer science concerned with from the perspective of SICP?
Imperative knowledge
What method for computing square roots involves taking a guess y for the value of the square root of a number x and averaging y with x/y to get a better guess?
Newton's method of successive approximations
Newton's method of successive approximations is just a special case of what general technique for finding roots of equations?
Newton's method
What dictates that free variables in a procedure are taken to refer to bindings made by enclosing procedure definitions (SICP)?
Lexical scoping
What does SICP say is the most common way to compute square roots?
Newton's method of successive approximations
What does SICP call the name of a formal parameter of a procedure?
A bound variable
What does SICP call the set of expressions for which a binding defines a name?
Scope (the scope of that name)
(define (good-enough? guess x) (< (abs (- (square guess) x)) 0.001))
What names here are bound?
guess x
What does SICP call nesting procedure definitions inside procedure definitions, that allows for lexical scoping in Lisp, and originated with Algol 60?
Block structure
What phrase did Peter Landin coin for special syntactic forms that are simply convenient alternative surface structures for things that can be written in more uniform ways?
Syntactic sugar
What does syntactic sugar cause, in the words of Alan Perlis?
Cancer of the semicolon
What kind of statements are used to construct programs (declarative or imperative)?
Imperative
What kind of statements are used to deduce things (declarative or imperative)?
Declarative
What convention does Lisp obey that is the source of the quip "Lisp programmers know the value of everything but the cost of nothing" (Alan Perlis paraphrasing Oscar Wilde)?
Every expression has a value
What does SICP call local procedures using a free variable that is in scope there because it is bound in the definition of an enclosing procedure?
Lexical scoping
(define (good-enough? guess x) (< (abs (- (square guess) x)) 0.001))
What names here are free?
abs square < -
What can we say a procedure is if it is defined in terms of itself?
Recursive
What type of knowledge is mathematics concerned with from the perspective of SICP?
Declarative knowledge
What are the two kinds of knowledge that SICP notes are related to the contrast between functions and procedures?
Declarative knowledge and imperative knowledge
When repeatedly (recursively) evaluating subexpressions of a Lisp expression, eventually what will need to be evaluated rather than combinations?
Primitive expressions
What does SICP call the context in which evaluation takes place and would provide the meaning of the symbol x in an expression such as (+ x 1)?
The environment
What is something like (define x 3) that is an exception to the general evaluation rule (in this case since the purpose of define is to associate x with a value)?
A special form
What are Lisp descriptions of processes?
Procedures
What did John Locke call "separating [ideas] from all other ideas that accompany them in their real existence?"
Abstraction
"WE ARE ABOUT TO STUDY THE IDEA OF A [...]" is how the book [...] opens.
"WE ARE ABOUT TO STUDY THE IDEA OF A COMPUTATIONAL process" is how the book SICP opens.
What serves as a framework within which we organize our ideas about processes and also are a means of instructing a computer to do things?
A programming language
What is an appropriate (or at least good enough for SICP) language to describe computational processes?
Lisp
What language will our procedural thoughts be expressed in (after reading the wizard book)?
Lisp
What was Lisp, with a focus on reasoning about recursive equations, supposed to be an academic model of?
Computation
Despite its inception as a [...], Lisp is a practical programming language.
Despite its inception as a mathematical formalism, Lisp is a practical programming language.
What was the most notable language designed by John McCarthy?
Lisp
What type of equations was Lisp invented to reason about?
Recursive equations
Well-designed [...], like well-designed automobiles or nuclear reactors, are designed in a modular manner, so that the parts can be constructed, replaced, and debugged separately.
Well-designed computational systems, like well-designed automobiles or nuclear reactors, are designed in a modular manner, so that the parts can be constructed, replaced, and debugged separately.
What do master software engineers do to their programs when problems arise?
Debug
What special symbol can be used in SICP Lisp in place of the predicate in the final clause of a cond, that will cause the cond to return as its value the value of the corresponding expression when all previous clauses have been bypassed?
else
What special form in SICP Lisp is a restricted type of conditional that can be used when there are precisely two cases in the case analysis?
if
What is the special form in Lisp for notating a case analysis, such as the definition of an absolute value function?
cond
What does the #lang sicp Scheme print when you enter this expression?
10
10
What does the #lang sicp Scheme print when you enter this expression?
(+ 5 3 4)
12
What does the #lang sicp Scheme print when you enter this expression?
(-9 1)
8
What does the #lang sicp Scheme print when you enter this expression?
(/ 6 2)
3
What will a Lisp interpreter respond with by printing if you present it with just a number like the following?
486
486
What does the #lang sicp Scheme print when you enter this expression?
(= 3 4)
#f
What is the thing called in SICP that shows the value of each subcombination in a combination in a treelike way that looks like a head scratcher?
A tree representation
How are all complex ideas made according to John Locke?
Combining several simple ideas
What is separating ideas away from all other ideas that occur with them in reality according to John Locke?
Abstraction
What most primitive operations are elements that must appear in any powerful programming language?
Arithmetic operators
What type of ideas are gained by setting simple and complex ideas by one another so as to take a view of them at once?
Relations
What is the way that all general ideas are made according to John Locke?
Abstraction
What is an abstract being that inhabits a computer?
A computational process
What is a pattern of rules that direct the evolution of a computational process?
A program
What is like a sorcerer's idea of a spirit in computation?
A computational process
What is like a sorcerer's spell conjuring a computational process?
A program
A [...] "can affect the world by disbursing money at a bank or by controlling a robot arm in a factory."
A computational process "can affect the world by disbursing money at a bank or by controlling a robot arm in a factory."
Can a computational process be seen or touched?
No
Is a computational process composed of matter?
No
A [...], in a correctly working computer, executes [...] precisely and accurately.
A computational process, in a correctly working computer, executes programs precisely and accurately.
Fortunately, learning to program is considerably less dangerous than learning [...].
Fortunately, learning to program is considerably less dangerous than learning sorcery.
Is a computational process even a real thing?
Yes
What are languages used to prescribe the tasks we want our computational processes to perform?
Programming languages
What are the arcane and esoteric things we use to carefully compose symbolic expressions to control computational processes?
Programming languages
A [...] is not even composed of matter but it can seriously perform intellectual work.
A computational process is not even composed of matter but it can seriously perform intellectual work.
What do people create to direct computational processes?
Programs
What provides a means of combining operations in Lisp and must appear in any powerful programming language?
Nesting
What associates names with values, provides a limited means of abstraction, and must appear in any powerful programming language?
Definitions
What does SICP call an abstraction technique more powerful than association names with values and is how a compound operation can be given a name and then referred to as a unit?
Procedure definitions
What defines a method called square that squares a number x in SICP Lisp?
(define (square x) (* x x))
What type of models do we begin with when modeling phenomena in science and engineering in general (related to the substitution model of procedure application in SICP)?
Simplified, incomplete models
What possible evaluation model in SICP is "evaluate the arguments and then apply?"
Applicative-order evaluation
What possible evaluation model in SICP is "fully expand and then reduce?"
Normal-order evaluation
(+ (square (+ 5 1))
(square (* 5 2)))
In what evaluation model would that become the following?
(+ (* (+ 5 1) (+ 5 1))
(* (* 5 2) (* 5 2)))
Normal-order evaluation
Do normal-order and applicative-order evaluation produce the same value?
Yes
What is the special construct in SICP Lisp for notating a case analysis such as you would need to do to compute the absolute value of a number?
cond
cond in is a "special form" in SICP Lisp that notates is used to notate a what?
A case analysis
What does SICP call an expression whose value is interpreted as either true or false and also a procedure that returns true or false?
A predicate
What is a way to define a procedure for the abs of x (absolute value of x) that uses cond in SICP Lisp?
(define (abs x)
(cond ((> x 0) x)
((= x 0) 0)
((< x 0) (- x))))
What is a way to define a procedure for the abs of x (absolute value of x) that uses cond and else in SICP Lisp?
(define (abs x)
(cond ((< x 0) (- x))
(else x)))
What is the "special form" in SICP Lisp that is a "restricted type of conditional that can be used when there are precisely two cases in the case analysis?"
if
What are the three most frequently used primitive logical composition operators in SICP Lisp?
and, or, and not
What key thing is true of not and or in SICP Lisp that make them special forms and not procedures?
The subexpressions are not necessarily all evaluated
How might the condition that a number x be in the range 5 < x < 10 be expressed in SICP Lisp?
(and (> x 5) (< x 10))
What is a way to define a procedure for the abs of x (absolute value of x) that uses if in SICP Lisp?
(define (abs x)
(if (< x 0)
(- x)
x))
"According to the description of evaluation given, the interpreter first evaluates the [...] and [...] and then applies the resulting [...] to the resulting [...]."
"According to the description of evaluation given, the interpreter first evaluates the operator and operands and then applies the resulting procedure to the resulting arguments."
The use of procedures with what type of data causes the substitution model in SICP to break down?
Mutable data
Is the purpose of the substitution model that SICP uses for procedure application meant to be how the interpreter really works or to help us think about procedure application?
Only to help us think
(define (square x) (* x x))
"We have here a compound procedure, which has been given the name [...]."
(define (square x) (* x x))
"We have here a compound procedure, which has been given the name square."
What most primitive data are elements that must appear in any powerful programming language?
Numbers
What are + and * examples of primitives of in Lisp?
Procedures
What is a Lisp expression to subtract 334 from 1000?
(- 1000 334)
What are expressions like these examples of?
(/ 10 5)
(+ 2.7 10)
(* 5 99)
Combinations
What does SICP define as "a list of expressions within parentheses in order to denote procedure application?"
Combinations
What is the leftmost element in a Lisp combination called?
The operator
What are the elements other than the operator called in a Lisp combination?
Operands
Values of the operands in a Lisp combination when the procedure specified is applied are called what?
Arguments
What expressions represent the simplest entities a programming language is concerned with (SICP)?
Primitive expressions
One advantage of [...] is that it can accommodate procedures that may take an arbitrary number of arguments.
One advantage of prefix notation is that it can accommodate procedures that may take an arbitrary number of arguments.
What is a common name for the convention of placing the operator to the left of the operands in Lisp expressions?
Prefix notation
What does SICP call when "each long combination is written so that the operands are aligned vertically?"
Pretty-printing
The Lisp interpreter always operates in the same basic cycle that is called a [...]: It reads an expression from the terminal, evaluates the expression, and prints the result.
The Lisp interpreter always operates in the same basic cycle that is called a read-eval-print loop: It reads an expression from the terminal, evaluates the expression, and prints the result.
A critical aspect of a programming language is the means it provides for using names to refer to computational objects; we say that the name identifies a variable whose value is the [...].
A critical aspect of a programming language is the means it provides for using names to refer to computational objects; we say that the name identifies a variable whose value is the object.
What is the keyword used to name things in the Scheme dialect of Lisp?
define
What is the Lisp combination that uses define to associate the value 2 with the name size?
(define size 2)
What is the Lisp combination that uses define to associate the value 10 with the name radius?
(define radius 10)
SICP says that complex programs are constructed by building, step by step, what (of increasing complexity)?
Computational objects
What does a Lisp program usually consist of a large number of relatively simple instances of?
Procedures
What is the memory (and more precise version of the term) that the Lisp interpreter uses to keep track of name-object pairs according to SICP?
The global environment
What is the Lisp interpreter itself following according to SICP?
A procedure
What number step is this to evaluate a combination according to SICP?
"Evaluate the subexpressions of the combination."
1.
To evaluate a combination, do the following:
Evaluate the subexpressions of the combination.
Apply the procedure that is the value of the leftmost subexpression (the operator) to the arguments that are the values of the other subexpressions (the operands).
What is the first fundamental thing to observe about this evaluation rule?
The evaluation rule is recursive
What general kind of process is the SICP evaluation rule forming hierarchical, treelike objects an example of?
Tree accumulation
How many combinations are there here?
(* (+ 2 (* 4 6)) (+ 3 5 7))
Four
What number step is this to evaluate a combination according to SICP?
"Apply the procedure that is the value of the leftmost subexpression (the operator) to the arguments that are the values of the other subexpressions (the operands)."
2.
"In general, [...] may have very complex structures, and it would be extremely inconvenient to have to remember and repeat their details each time we want to use them."
"In general, computational objects may have very complex structures, and it would be extremely inconvenient to have to remember and repeat their details each time we want to use them."
What keyword is the Scheme language's simplest means of abstraction according to SICP?
define
Speaking in principle, is there any limit to the depth of nesting of Lisp combinations having elements that are themselves Lisp combinations?
No
Any powerful programming language must have primitives of what two things?
Procedures and data
What are the two kinds of elements that we use in programming according to SICP?
Procedures and data
What does SICP say "later we will discover that they are really not so distinct."?
Procedures and data
What mechanism of powerful programming languages is where compound elements can be named and manipulated as units?
Means of abstraction
What does SICP define as an abstract being that inhabits a computer?
A computational process
"Just as our everyday thoughts are usually expressed in our natural language (such as English, French, or Japanese), and descriptions of quantitative phenomena are expressed with mathematical notations, our procedural thoughts will be expressed in [...]."
"Just as our everyday thoughts are usually expressed in our natural language (such as English, French, or Japanese), and descriptions of quantitative phenomena are expressed with mathematical notations, our procedural thoughts will be expressed in Lisp."
[...] was invented in the late 1950s as a formalism for reasoning about the use of certain kinds of logical expressions, called recursion equations, as a model for [...].
Lisp was invented in the late 1950s as a formalism for reasoning about the use of certain kinds of logical expressions, called recursion equations, as a model for computation.
What is a machine that carries out processes described in the Lisp language?
A Lisp interpreter
What were the two main capabilities for attacking algebraic expressions that Lisp was designed for?
Differentiation and integration
What programming language is an acronym for LISt Processing?
Lisp
Despite its inception as a mathematical formalism, [...] is a practical programming language.
Despite its inception as a mathematical formalism, Lisp is a practical programming language.
What two adjectives does SICP use to describe the languages that we use to write programs?
Arcane and esoteric
What activity is in effect conjuring the spirits of the computer by writing spells?
Programming
What is a very real thing that can perform intellectual work, but might seem like a sorcerer's idea of a spirit?
A computational process
“Recursive Functions of Symbolic Expressions and Their Computation by Machine” conceived what?
Lisp
What two data object types did Lisp have that no other programming language had?
Atoms and lists
What programming language is great for studying how important programming constructs relate to the linguistic features that support them?
Lisp
What version of Lisp does SICP say it uses?
Scheme
[...] has become a language of choice for operating-system shell languages and for extension languages for editors and computer-aided design systems.
Lisp has become a language of choice for operating-system shell languages and for extension languages for editors and computer-aided design systems.
"A Lisp interpreter is a [...] that carries out processes described in the Lisp language."
"A Lisp interpreter is a machine that carries out processes described in the Lisp language."
What type of logical expressions was Lisp invented for reasoning about as a model for computation?
Recursive equations
What is an appropriate language for describing computational processes according to Structure and Interpretation of Programs?
Lisp
What dialect of Lisp is discussed in SICP?
Scheme
What can you create to control a computational process?
A program
What is a pattern of rules that controls a computational process?
A program
What does SICP call an abstract being that inhabits a computer?
A computational process
What does SICP call the abstract things that computational processes manipulate as they evolve?
Data
What are the abstract things that computational processes manipulate as they evolve?
Data
What does SICP call a pattern of rules that directs the evolution of a computational process?
A program
What can be created to effectively conjure the spirits of the computer with our spells?
Programs
What does SICP say is very much like a sorcerer's idea of a spirit?
A computational process
What are carefully composed from symbolic expressions in arcane and esoteric programming languages to prescribe the tasks we want our computational spirits to perform?
Programs
What programming language was invented in the late 1950s as a formalism for reasoning about the use of recursive equations as a model for computation?
Lisp
Who conceived Lisp and wrote the 1960 paper that the language is based on?
John McCarthy
What is a machine that carries out processes described in the Lisp language?
A Lisp interpreter
What year did Common Lisp become an ANSI standard?
1994
What language was used for the breakthrough computation that integrated the motion of the Solar System?
Lisp
What are Lisp descriptions of processes called?
Procedures
The ability to represent procedures as data also makes [...] an excellent language for writing programs that must manipulate other programs as data, such as the interpreters and compilers that support computer languages.
The ability to represent procedures as data also makes Lisp an excellent language for writing programs that must manipulate other programs as data, such as the interpreters and compilers that support computer languages.
What language was Lisp very inefficient for numerical computations compared to in the beginning?
Fortran
What is the name Lisp an acronym for?
LISt Processing
What is the second oldest programming language in widespread use today?
Lisp
What programming language was designed to provide symbol-manipulating capabilities for attacking problems such as symbolic differentiation and integration of algebraic expressions and included for this purpose data objects known as atoms and lists that set it apart from all other languages at the time?
Lisp
What programming language does SICP say is the only programming language older than Lisp that is still in use today?
Fortran
What are Lisp descriptions of processes that themselves can be represented and manipulated as Lisp data?
Procedures
What mechanisms for combining simple ideas into more complex ideas present in every powerful language represent the simplest entities the language is concerned with?
Primitive expressions
What mechanisms for combining simple ideas into more complex ideas present in every powerful language are the way that compound elements can be named and manipulated as units?
Means of abstraction
What are the two kinds of elements that SICP says we deal with in programming and that are really not so distinct?
Procedures and data
(+ 137 349)
486
(- 1000 334)
666
(* 5 99)
495
(/ 10 5)
2
Expressions such as these that are formed by delimiting a list of expressions within parentheses in order to denote procedure application are called what?
Combinations
(+ 137 349)
What is the leftmost element in the list and what are the others?
The leftmost element is the operator and the rest are the operands
What is the name for the convention of placing the operator to the left of the operands?
Prefix notation
What is the name for the basic cycle where an interpreter reads an expression from the terminal, evaluates it, and prints the result?
Read-eval-print loop
What is the first step of how a Lisp interpreter must evaluate a combination (an expression) that makes the procedure recursive?
Evaluate the subexpressions of the combination
Imagine that you are sitting at a computer terminal: you type an [...], and the interpreter responds by displaying the result of its evaluating that [...].
Imagine that you are sitting at a computer terminal: you type an expression, and the interpreter responds by displaying the result of its evaluating that expression.
Imagine that you are sitting at a computer terminal: you type an [...], and the interpreter responds by displaying the result of its evaluating that [...].
Imagine that you are sitting at a computer terminal: you type an expression, and the interpreter responds by displaying the result of its evaluating that expression.
Imagine that you are sitting at a computer terminal: you type an [...], and the interpreter responds by displaying the result of its evaluating that [...].
Imagine that you are sitting at a computer terminal: you type an expression, and the interpreter responds by displaying the result of its evaluating that expression.