CS 342 Review of Part 1 (the Interpreter and Larger Values) * Chapter 1 ** What are the fundamental parts of a programming language? *** How are they reflected in the interpreter? *** What is left out from Pascal? LISP? APL? *** Is anything in the language of chapter 1 redundant with other features? ** What data structures are fundamental to the interpreter? *** how do these data structures reflect the langauge? *** how are environments manipulated? *** how are syntax trees constructed? *** is the interpreter a good program? why? * LISP ** Goals *** What are the goals of LISP? Does LISP meet those goals? Why or why not? *** What good is list processing compared to just using numbers? ** Data structures *** What is an S-expression? How would you represent it in Pascal? *** What are the advantages of s-expressions vs. arrays and records? **** comment on the simplicity of LISP vs. Pascal **** do lists better satisfy the 0-1-infinity principle? **** what about the efficiency of s-expressions vs. arrays and records? ** Program structures *** how does one program recursion over lists? over non-empty lists? **** does the structure of a LISP program reflect the problem structure? **** what is the relationship between a LISP program and a list? *** Would if-expressions be useful in Pascal? *** What would be the analog of Pascal's case statement in LISP? * APL ** Goals *** What are the goals of APL? Does it meet those goals? *** Does the real APL meet the goals better than our version? *** Compare APL and LISP for manipulating vectors ** Data structures *** What is rank? shape? transpose? *** How would you represent an APL-matrix in Pascal? *** Are there any differences between APL's matricies and Pascal's arrays? ** Operators *** What do they do? **** summarize the effects of the data structure operations in APL **** how do the operators compare to the relational data base operators? *** automation **** which operations have implicit loops? which do not? **** how would you code +/ in LISP? Which is more efficient? **** what other automation is given by the operators **** what operators allow some evaluation in parallel? *** orthogonality **** how would you group (categorize) APL's operators. **** are there some ways of combining operators that are orthogonal? **** how could the language be made more regular? *** expression programming **** why are loops and recursion *not* used in APL code? **** is it possible to do any manipulation of a matrix as an APL expression? **** are APL programs harder to read than LISP programs? why? **** are APL programs easier to check than LISP programs? why? * Larger values in general ** Is programming with larger values better than not? In what way? ** What situations would it be better to not use larger values? ** Can you program with larger values in a Pascal program?