List of Figures

1.1 Conceptual depiction of a set of objects communicating by message passing.

1.2 Within the context of their support for a variety of programming styles, all languages involve a core set of universal concepts.

1.3 Programming languages and the styles of programming therein are conduits into computation.

1.4 Evolution of programming languages across a time axis.

1.5 Factors influencing language design.

2.1 A finite-state automaton for a legal identifier and positive integer in C.

2.2 The dual nature of grammars as generative and recognition devices.

2.3 Two parse trees for the expression x + y * z.

2.4 Parse trees for the expression x.

2.5 Parse tree for the expression 132.

2.6 Parse trees for the expression 1 + 3 + 2.

2.7 Parse trees for the expression 1 + 3 * 2.

2.8 Parse trees for the expression 6 – 3 – 2.

2.9 Parse trees for the sentence if (a < 2) if (b > 3) x else y.

3.1 Simplified view of scanning and parsing: the front end.

3.2 More detailed view of scanning and parsing.

3.3 A finite-state automaton for a legal identifier and positive integer in C.

4.1 Execution by interpretation.

4.2 Execution by compilation.

4.3 Interpreter for language simple.

4.4 Low-level view of execution by compilation.

4.5 Alternative view of execution by interpretation.

4.6 Four different approaches to language implementation.

4.7 Mutually dependent relationship between compilers and interpreters.

5.1 List box representation of a cons cell.

5.2 ’(a b) = ’(a . (b))

5.3 ’(a b c) = ’(a . (b c)) = ’(a . (b . (c)))

5.4 ’(a . b)

5.5 ’((a) (b) ((c))) = ’((a) . ((b) ((c)))).

5.6 ’(((a) b) c)

5.7 ’((a b) c) = ’(((a) b) . (c)) = ’(((a) . (b)) . (c))

5.8 ’((a . b) . c)

5.9 Graphical depiction of the foundational nature of lambda.

5.10 Layers of functional programming.

6.1 Run-time call stack at the time the expression (+ a b x) is evaluated.

6.2 Static call graph of the program illustrating dynamic scoping in Section 6.7.

6.3 Two run-time call stacks possible from dynamic scoping program in Section 6.7.

6.4 Run-time stack at print call on line 37 of program of Listing 6.2.

6.5 Illustration of the upward FUNARG problem.

6.6 The heap in a process from which dynamic memory is allocated.

7.1 Hierarchy of concepts to which the study of typing leads.

8.1 foldr using the right-associative : cons operator.

8.2 foldl in Haskell (left) vis-à-vis foldl in ML (right).

9.1 Abstract-syntax tree for ((lambda (x) (f x)) (g y)).

9.2 (left) Visual representation of TreeNode Python class. (right) A value of type TreeNode for an identifier.

9.3 An abstract-syntax representation of a named environment in Python.

9.4 An abstract-syntax representation of a named environment in Racket Scheme.

9.5 A list-of-lists representation of a named environment in Scheme.

9.6 A list-of-vectors representation of a nameless environment in Scheme.

9.7 A list-of-lists representation of a named environment in Python

9.8 A list-of-lists representation of a nameless environment in Python

9.9 An abstract-syntax representation of a nameless environment in Racket Scheme

9.10 An abstract-syntax representation of a nameless environment in Python

10.1 Execution by interpretation.

10.2 Abstract-syntax tree for the Camille expression *(7,x).

10.3 Abstract-syntax tree for the Camille expression let x = 1 y = 2 in *(x,y).

10.4 Dependencies between Camille interpreters thus far.

11.1 Abstract-syntax representation of our Closure data type in Python.

11.2 An abstract-syntax representation of a non-recursive, named environment

11.3 A list-of-lists representation of a non-recursive, named environment

11.4 Dependencies between Camille interpreters thus far.

11.5 A list-of-lists representation of a non-recursive, nameless environment.

11.6 An abstract-syntax representation of a non-recursive, nameless environment

11.7 An abstract-syntax representation of a circular, recursive, named environment.

11.8 A list-of-lists representation of a circular, recursive, named environment.

11.9 Dependencies between Camille interpreters supporting functions thus far.

11.10 An abstract-syntax representation of a circular, recursive, nameless environment.

11.11 A list-of-lists representation of a circular, recursive, nameless environment.

11.12 Dependencies between Camille interpreters thus far.

12.1 A primitive reference to an element in a Python list.

12.2 Passing arguments by value in C.

12.3 Passing of references (to objects) by value in Java.

12.4 Passing arguments by value in Scheme.

12.5 The pass-by-reference parameter-passing mechanism in C++.

12.6 Passing memory-address arguments by value in C.

12.7 Passing arguments by result.

12.8 Passing arguments by value-result.

12.9 Summary of parameter-passing concepts in Java, Scheme, C, and C++

12.10 Three layers of references to indirect and direct targets representing parameters to functions.

12.11 Passing variables by reference in Camille.

12.12 Dependencies between Camille interpreters.

12.13 Dependencies between Camille interpreters thus far.

13.1 The general call/cc continuation capture and invocation process

13.2 Example of call/cc continuation capture and invocation process

13.3 The run-time stack during the continuation replacement process depicted in Figure 13.2.

13.4 The run-time stacks in the factorial example in C.

13.5 The run-time stacks in the jumpstack.c example.

13.6 Data and procedural abstraction with control abstraction as an afterthought.

13.7 Recursive control behavior (left) vis-à-vis iterative control behavior (right).

13.8 Decision tree for the use of foldr, foldl, and foldl’ in designing functions.

13.9 Both call/cc and CPS involve reification and support control abstraction.

13.10 Program readability/writability vis-à-vis space complexity.

13.11 CPS transformation and subsequent low-level let-to-lambda transformations.

14.1 The theoretical foundations of functional and logic programming are λ-calculus and first-order predicate calculus, respectively.

14.2 A search tree illustrating the resolution process.

14.3 An alternative search tree illustrating the resolution process.

14.4 Search tree illustrating an infinite expansion of the path predicate in the resolution process used to satisfy the goal path(X,c).

14.5 The branch of the resolution search tree for the path(X,c) goal that the cut operator removes in the first path predicate.

14.6 The branch of the resolution search tree for the path(X,c) goal that the cut operator removes in the second path predicate.

14.7 The branch of the resolution search tree for the path(X,c) goal that the cut operator removes in the third path predicate.

15.1 The relationships between some of the concepts we studied.

15.2 Interplay of advanced concepts of programming languages.

C.1 A portion of the Haskell type class inheritance hierarchy.

D.1 The grammar in EBNF for the Camille programming language.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.108.105