CS & E Course Assessment Form CS 326 Instructor: Mircea Nicolescu Semester/year: Spring 2006 The purpose of this form is to document the achievement of student outcomes in the courses that you instruct. Answers to the questions below should cite supporting evidence from your own observations, student performance on assignments and examinations, student self assessment forms, and other feedback. First time course taught by this instructor x Course taught previously Course prerequisite(s): CS 302 Were the students adequately prepared by prerequisite courses? Yes x No Were changes implemented since the last time this course was taught? Yes x No If yes, what changes were made since the last time this course was taught? Did these changes improve the course? Changes made since last time Effects of change Avoid ambiguous answers to homework questions. No negative comments have been received in regard to homework assignments. Better understanding, help students learn from Instructed grader to provide more feedback on their own mistakes. A significant increase in homework assignments. student performance has been observed, especially on “traditionally” difficult topics. Revised homework assignments, some questions had been too general. Are changes called for the next time this course is taught? Yes If yes, what changes should be made the next time this course is taught? Changes recommended for next time Devote more time to each programming language. x Purpose of changes Expand the hands-on experience in programming, on a wide range of programming language paradigms. Most useful comments from students Very good course content and instructor performance, effective class participation. Spend more time on each language. No Achievement of Student Outcomes Did the students demonstrate achievement of the student outcomes specific to this course? In the table provided, cite evidence using student responses on the student self assessment questions and evidence from your direct assessment of student work. If sampling, please indicate the approximate percent of the class sampled: 100 Mapping between Student Outcomes – Course Outcomes – Instruments of Assessment CSE Student Outcomes 1 11 3 9 Student SelfAssessment Course Outcomes Instruments of Direct Assessment by Instructor 4.167 Students are capable to understand and apply formal methods in language specification and design (context-free grammars, regular expressions, parse trees, scanning, parsing). Midterm – pb. 6 4.000 Students demonstrate a thorough understanding of the fundamental issues in language implementation (naming, control flow, data types, subroutines), and make more effective use of languages they already know. 4.333 Students are able to make use of the fundamental concepts learned in this course for improving their programming skills. 4.450 Students emerge better prepared to choose the best language for particular problems, to understand different programming paradigms (functional, logic, object-oriented), and to learn new languages quickly and completely. Direct Assessment 3.9 Midterm – pb. 3 3.7 Final – pb. 4 Final – pb. 8 4.0 Midterm – pb. 9 3.6 Final – pb. 11 Student Samples CSE Student Outcomes 1 11 3 9 Instruments of Direct Assessment Midterm (6) Avg Midterm (3) Final (4) Avg Final (8) Avg Midterm (9) Final (11) Avg Student Samples (5=excellent to 1=poor) 5 2 1 4 4 5 3 5 5 5 5.0 2.0 1.0 4.0 4.0 5.0 3.0 5.0 5.0 5.0 5 4 1 5 3 2 4 2 3 5 1 5 1 5 5 2 5 5 5 5 3.0 4.5 1.0 5.0 4.0 2.0 4.5 3.5 4.0 5.0 2 1 5 4 5 5 5 3 5 5 2.0 1.0 5.0 4.0 5.0 5.0 5.0 3.0 5.0 5.0 4 4 2 5 2 3 5 1 1 5 5 3 5 4 5 5 2 1 5 5 4.5 3.5 3.5 4.5 3.5 4.0 3.5 1.0 3.0 5.0 Outcome Average 3.9 3.7 4.0 Distribution of Scoring (text) CSE Student Outcomes 1 11 Poor [1.0-1.5) 1 1 3 9 1 1 Distribution of Scoring Very Fair Good good [1.5-2.5) [2.5-3.5) [3.5-4.5) 1 1 2 1 1 3 1 0 Distribution of Scoring (graphic) 1 1 1 5 Excellent [4.5-5.0] 5 4 6 3 3.6 Midterm: 6. [9 points] Write a context-free grammar that describes simple function headers in C syntax. Assume that the return type and the type of formal parameters are either int or float. The following are examples of legal strings according to this grammar: int f (); float g (int x); int h (float a, int b, float c); You do not need to describe the identifiers for function names and parameter names, consider them given by the scanner as ID. 3. [8 points] Assume two versions of the same program – one using macros, and the other using functions. In general, which one will run faster? Which one will produce a larger compiler-generated code? Why? 9. [10 points] Write a recursive function (tally V L), which counts and returns the number of occurrences of the element V in the list L. The following example illustrates the use of this function: > (tally 'a '(b a 7 c a a 3 a)) 4 Final: 11. [10 points] Write the rules for a Prolog predicate add_last(X,L,L1) that succeeds if L1 is the list that results by adding the element X at the end of list L. The following example illustrates the use of this predicate: ?- add_last(7,[1,5,3],L1). L1 = [1,5,3,7] 4. [9 points] In most languages, local variables are allocated dynamically on the stack, thus introducing a run-time overhead caused by stack maintenance operations. Why not just reserve a memory region for each subroutine’s local variables, and allocate them statically there? 8. [10 points] Consider the following Scheme function f: (define (f L1 L2) (cond ((null? L1) L2) ((null? L2) (else L1) (if (< (car L1) (car L2)) (cons (car L1) (f (cdr L1) L2)) (cons (car L2) (f L1 (cdr L2))))))) Indicate the value returned by the following calls: (f '(1 5 8) '()) (f '(1 5 8 9) '(2 7)) (f '(3 5 6) '(1 5 7 8)) Is function f tail-recursive? Justify your answer.