LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN 510.84 no. 758-759 cop. 2 *3^-355-? The person charging this material is re- sponsible for its return to the library from which it was withdrawn on or before the Latest Date stamped below. Theft, mutilation, and underlining of books are reasons for disciplinary action and may result in dismissal from the University. To renew call Telephone Center, 333-8400 UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN MAY 2 8 1! 82 L161— O-1096 lit." UIUCDCS-R-75-759 rhua AN EXPERIMENT ON A UNIFIED CONTROL CONSTRUCT August 1975 by David W. Embley IHEUBRARYOETME NOV 21 1975 DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN URBANA, ILLINOIS UIUCDCS-R-T5-T59 AN EXPERIMENT ON A UNIFIED CONTROL CONSTRUCT BY DAVID W. EMBLEY August, 1975 Department of Computer Science University of Illinois at Urbana-Champaign Urbana, Illinois 6l801 This work was supported in part by the National Science Foundation under Grant No. US-NSF-EC-U1511. Digitized by the Internet Archive in 2013 http://archive.org/details/experimentonunif759embl ii ABSTRACT This report describes and gives the results of an experiment designed to investigate the psychological soundness of a proposed unified control construct, the KAIL selector. The KAIL selector subsumes several traditional control constructs including if-then-else , case , and while . The experiment compared two sets of control constructs to determine their effect on under- standing. One set consisted of the traditional if-then-else , case , and while; the other set consisted of a simplified KAIL selector. Results showed that subjects understood programs better when they were written using the KAIL selector. iii ACKNOWLEDGMENTS Professor Wilfred J. Hansen deserves a special thanks for guiding me through this study. He spent many hours discussing the experiment with me and suggested numerous modifications and improvements. I appreciate the help given by Professor Richard G. Montanelli on the statistical aspects of this study. He also read the manuscript and offered many helpful comments. I appreciate the CS201 students who gave their time to take the experiment . Many others helped in numerous ways. Barr Segal assisted me in preparing data for the statistical package (SOUPAC). Dave Eland and Paul McNabb suggested several improvements for the experiment. Professor George H. Friedman gave technical and administrative assistance, and Kathy Gee typed this report. iv TABLE OF CONTENTS Page 1. INTRODUCTION 1 1.1 Objective 1 1.2 KAIL 1 1.3 Related Work 2 2. THE KAIL SELECTOR 3 2.1 Basic Selector 3 2.2 Defaults 5 2.3 Else 5 2.U Sel-tags 6 2.5 Iteration 6 2.6 Actions 7 2.7 Blocks and Expressions 8 3. THE EXPERIMENT 9 3.1 Hypotheses 9 3.2 Subjects 11 3.3 Teaching the Languages lU 3.1+ Problems and Programs 16 3.5 Question-Answer Session 17 k. RESULTS 22 U.l Observable Measures of Understanding 22 U.2 Difficulties 22 U.3 Background 23 h.k Performance Statistics 23 V Page U.5 Learning Statistics 26 U.6 Problem Comparison 26 U.7 Correlations 28 5. CONCULSION 32 5.1 Summary of Results 32 5.2 Suggestions for Further Research 32 REFERENCES 3^ APPENDIX A. FULL GRAMMAR OF THE KAIL SELECTOR 35 APPENDIX B. SUBJECT BACKGROUND DATA 36 APPENDIX C. PROBLEMS AND PROGRAM SOLUTIONS 39 APPENDIX D. QUESTIONS kk APPENDIX E. PERFORMANCE STATISTICS U6 APPENDIX F. CORRELATIONS 53 vi LIST OF TABLES Table Page 1 Group Averages 25 2 Self-evaluations 27 3 Average Learning and Reviewing Times 27 k Correlations with Correct Answer Statistics 29 5 Data Correlated with Class Standard Score 30 vii LIST OF FIGURES Figure Page 1 Design Layout 10 2 Introduction to the Experiment 12 3 Experiment Overview 13 U Instructions 18 5 Subjective Self-evaluation 18 6 Preparation for Question-Answer Session 19 7 Possible Requests for Help 19 8 Typical Question 20 1 . INTRODUCTION 1.1 Objective Historically, programming languages have been conceived and developed by individuals or relatively small groups [l]. Language features have arisen from the designer's own experiences, but little or no effort has been made to determine if the design is psychologically sound [2]. This report describes an experiment to investigate the psycho- logical soundness of a new control construct called the KAIL selector [3]. The selector (outlined in chapter 2) is the dominant control construct of the KAIL programming language [k] . 1.2 KAIL This work is part of the Automated Computer Science Education System (ACSES) project [5] which uses the PLATO CAI system [6] to teach elementary computer science. PLATO runs on a CDC Cyber 73 dual processor with two million 60-bit words of extended core storage. Attached to the processor are over nine hundred plasma display terminals, which were in- vented by the PLATO group for this project. The peak comfortable system load is about four hundred simultaneous users. Under PLATO, all programs are written in a special system langu- age called TUTOR [7] which mixes FORTRAN-like flow of control with peculiar CAI sequencing and sophisticated answer judging facilities. The language KAIL is an attempt to influence the development of TUTOR by showing that modern control constructs can be combined with the higher level features of TUTOR. 1.3 Related Work In 1971 » Gerald M. Weinberg wrote The Psychology of Computer Pro- gramming [8]. Its stated purpose was "to trigger the beginning of a new field of study: computer programming as a human activity." In the book, he advocated the use of experimentation as a method to study programming and suggested that human factors be considered in language design. Since the appearance of Weinberg's book, several researchers have conducted psychological experiments on programming language features. Using inexperienced programmers, three psychologists concluded that nested if programs are easier to understand than corresponding goto programs [9]. Larry Weissman listed and catagorized factors affecting the complexity of programs, began development of a methodology for studying the psychological complexity of computer programs, and conducted some experiments attempting to determine which factors or combinations of factors reduce complexity [10, 11]. At the University of Indiana, memorization tests were used to measure the effect of program structure on understanding [12]. Recently, John D. Gannon completed a Ph.D. thesis for which he gathered empirical evidence to support or discredit specific language design decisions [13]. Like Gannon's work, the KAIL selector experiment was an approach to language design. It examined, however, a new syntatic and semantic construct rather than a controversy between existing features. The methodology of this experiment resembled Weissman' s. One major difference was the use of automated rather than manual techniques. Because the PLATO CAI system administered the experiment on-line, the language constructs could be taught as part of the experiment; and precise timing data and all other relevant information could be gathered. 2. THE KAIL SELECTOR 2.1 Basic Selector The KAIL selector differs from most typical high level control constructs in three ways: 1. It combines flow of control with "answer judging," the process by which a Computer-Aided Instruction (CAI) program determines whether a student reply matches one of the replies anticipated by the lesson author. 2. It combines most of the other control constructs that have been widely used, e.g., if-then-else , case , cond , while , ... 3. The syntax suggests an answer to the trivial, yet thorny, question of how to end a nested block of code. Previous proposals include: end of one statement, end , fi-esac- elihw . . . , endif-endcase-endwhile ... This KAIL selector is the result of a search for a syntactic struc- ture for CAI answer judging. In answer judging the common control operation is to compare a student response against a set of expected correct and incorrect responses. This suggests a control syntax where a given expression (usually the student's reply) is tested against a number of alternatives. The full selector syntax is given in appendix A, but will be introduced piecemeal in the sections below. The essential selector syntax can be sketched as selector : "[" statement -sequence control choices "]" control : "if" expression choices : X "|" relation expression ":" statement-sequence choices where expression, relation, and statement-sequence are defined by the base language. (The two expressions are referred to as control-expression and choice- expression, respectively.) The selector is executed in four steps: 1. Execute the statement-sequence in the selector. 2. Evaluate the control-expression and save its value in a temporary, t. 3. Test each choice in turn until a "selected choice" is found such that (t relation choice-expression) yields true . k. Execute the statement-sequence in the selected choice. If no selected choice is found, step four is omitted. This simple example tests a student's arithmetic abilities: x := rand(25); y := rand(25); comment set x and y to random integers in [1,25]; write What is <(x)> + <(y)>? ; [ accept reply; if_ reply = x+y: write Very good; right_count := right_count + 1; = x*y: write Add, don't multiply; > x+y+20: tx := x div 10; ty := y div 10; write But <(tx+l)>0 + <(ty+l)>0 is only <(tx+ty+2)>0! ; ]; 2.2 Defaults The key to the adaptability of the KAIL selector is its default values. The expressions and relations may be omitted with the following result, control-expression true relation = choice-expression (l) true choice-expression (2) false choice-expression (i) i-2 (i >_ 3) (in TUTOR, -1 is true , and is false . In a spirit of compatibility, KAIL has adopted these conventions.) When the choice-expression is omitted, the relation and ":" must also be left out. By proper choice of default values, the selector has the semantics of several other control constructs, including: if-then-else , labelled -case (similar to LISP's SELECT), unlabelled -case , and COND. For example, for if-then-else there are only two choices and no choice-expressions (e.g., [ if x >_ y | max :=x | max :=y]). For a labelled- case , the relations are omitted and the choice-expressions are constants. (it would be closer to a labelled- case if the quotes could be omitted from string constants, but then the selector could not be mapped into such a variety of constructs.) 2.3 Else One additional choice is choice : " | else : " statement-sequence If evaluation reaches this choice, it is always the "selected choice" and its statement-sequence is executed. This corresponds to the out clause in the ALGOL 68 case construct. Notice the distinction between "|" and "| else :" in an if-then-else : without the else , the second choice will only be selected if the control-expression yields false ; with the else , any value but true will select the second choice. 2.k Sel-tags Selectors can become deeply nested. To help the reader and compiler match brackets, the programmer may tag them with matching sel-tags: selector : sel-tag "_" selector "_" sel-tag where the two sel-tags are both the same unique identifier. In practice, the separation of the tag from the bracket by the unobtrusive underline has a reasonably good appearance. (intuitively, this is so because bracketed expres- sions are often surrounded by spaces.) 2. 5 Iteration The KAIL selector unifies iteration and selection, selector : ".*[" statement-sequence [loop-control choices] "]*" loop-control : " while" expression j " until" expression For iteration, a fifth step is added to the selector semantics: 5. For while , if no "selected choice" is found, exit; otherwise, return to step one. For until , if no "selected choice" is found, return to step one; otherwise, exit. Notice that "*" distinguishes iteration from selection both at the beginning and ending of a loop, and that the keywords, while and until reinforce this notion from within the construct. Just as the basic selector maps into several branching constructs, the iteration construct maps into several existing loop constructs, including: while , repeat-until , loop-while-repeat [lU], and the nesting of a single case statement inside of a while . For example, for while , there is only one choice, and either the control-expression, the choice-expression, or an appropriate combination serves as the predicate. For repeat-until , the body of the loop is the initial statement -sequence, and no choice appears. As an example, consider the inner loop of Hoare's "Quicksort" algorithm [15]. comment m < n and A(m-l) exists and A(m-l) < A(i) for m _^ i _< n; i := m; j := n-1; v := A(n) ; # [ *[ while | A(i) < v : i := i+1; ]*; comment incr i; *[ vhile | A(j) > v : j := j-1; ]*; comment deer J; vhile 1 < J A(i) :=: A( j ) ; comment svap A(i) and A(j); ]•; This example illustrates hov the selector solves the problem of looping "n and a half times" [lU] vithout introducing an exit or a goto . Such problems arise often in practive, and sometimes almost demand a goto . Goto- free programmers usually resort to code duplication and/or redundant tests. 2.6 Actions Actions alter normal flov of control patterns. choice : "I" [relation expression ":"] statement -sequence [action] action : " exit" [sel-tag] " again" [sel-tag] Exit causes control to leave the selector; again directs control to the begin- ning of the initial statement-sequence. Sel-tags allow exit and again from within nested selectors. Actions may be used in the CAI example of section 2.1 to force the student to answer correctly before proceeding. A programmer may use selection and again , but iteration and exit would serve just as well: x := rand(25); y :- rand(25); vrite What is <(x)> + <(y)>? . [ accept reply; if reply x+y : vrite Very good; right_count := right_count+l; x*y : vrite Add, don't multiply; again ; j >x+y+20 : tx := x div 10; ty := y div 10; vrite But <(x+l)>0 + <(ty+l)>0 is only <(tx+ty+2)>0! ; again ; ]; 2.7 Blocks and Expressions If both the control and the choice-sequences are omitted, the selector groups statements into a block. The selector may be used in an expression context by replacing the statement-sequence in every choice vith an expression. There must be at least one choice. Note that this construct permits statements inside expressions . 3. THE EXPERIMENT 3.1 Hypotheses Observations on the characteristics of the KAIL-selector and its use in programming lead to the hypothesis that the KAIL selector is easier to understand than an equivalent set of traditional constructs. The selector unifies selection and iteration and subsumes CAI answer judging and most typical high level control constructs. This should enhance understanding because programmers would only need to know one control construct, not several, In the selector snytax, symbols replace keywords in some instances. This should also enhance programmer understanding because it tightens the code and packs more information into a program listing. For instance, the closure itself indicates whether or not the statement is to be repeated. In order to test the hypothesis, it is first necessary to devise a method for measuring understanding. A subject's ability to comprehend is a function of several factors. These include the following: Environmental factors: 1. Educational experience 2. Knowledge of programming languages 3. Basic intelligence h. Motivation Observable factors: 1. Speed at answering questions 2. Accuracy at answering questions 3. Self-evaluation of understanding Together, these factors comprise a model of subject understanding. This model of understanding allows the hypothesis to be broken down into measurable variables. The effects of environmental factors can be 10 minimized by grouping subjects so that among groups, background and motivation are similar. The hypothesis can then be tested by measuring the observable factors. If the hypothesis is correct, subjects working with the selector should be able to answer more questions and answer them quicker; they should make fewer mistakes; and they should give higher self-evaluations. To test these hypotheses an experiment was devised. Two versions of two programs were written: one version in KAIL, one in a language with standard control constructs. Each subject was assigned to one of four groups as shown in figure 1. language u 0) u o bO o U ft #1, #2 #2, #1 group #1 group #2 group #3 group #U Figure 1. Design Layout 11 3.2 Subjects The subjects were volunteers from CS 201, Spring Semester, 1975- Most were sophomores or juniors and had previously taken one programming course using FORTRAN, PL/1, or both. The typical subject's programming ability con- sisted of experience in one or two languages and some knowledge of a smattering of others. About half had previously used PLATO, some quite extensively. The experiment gathered this background information along with each subject's name and social security number which was later used to associate a student's CS 201 grade with the data. Appendix B contains a table which summarizes this information. To motivate subject participation, it was explained to a general CS 201 class session that an experiment was being conducted on PLATO to deter- mine why seme programming languages are easier to understand than others, and it was pointed out that this would be an opportunity to become acquainted with the PLATO system and participate in an unusual experiment. Fifty-three percent of the CS 201 students eventually responded and came to one of several sessions when terminals were reserved. In each session as the actual experiment began, this announcement was made, "You will not be graded on how well you do; however, please treat this experiment like an exam." After subjects signed in, the system welcomed them and encouraged them to do their best as illustrated in Figure 2. If a subject was not acquainted with PLATO, the system taught the use of function keys and other basics. (Since the experiment only required short responses, often only a single keypress, extensive PLATO experience was unnecessary. ) 12 o- ■ i- lO £ zi i~ V • t— 1 *-. X •+-• 4-' 1.0 UJ i" £l 'D ■ r-H r— 0" 4-' rW iti • r-H i~ 1.0 i jZT 4-' • 1— J • i— i t. TJ 1 5 ~o l- V itf 4J 'I' 4 J -H <•— o 10 !•— '!> r •rH 10 'ti a.' i' i I* "i 4-' IH X C.i 'I' Zi ij.M ■ r-H 1.0 -••'s i.O lZ 'k 1 4- ! 1_ iti (Jt- ■ r-H i' 4-' |L o.o o ili +' 11 i- cz H'l o i- , , V -i' . » '^ 3 i.j • i-H c S- ^ m _i 1.0 o D . r— H o 3 ijj dJ 1' +•' i 1 a: n ■ r-H iT5 -\ 4-' ~0 £ $- 1 t~ '_>-. ZJ 4-' jll ilj V ("" Q c 4-' 13 -\ Zi •i- 1 1.0 Q l' 1* J\ ? 1' 4-' Q l. .1 • r-H m ;>.; 1™ r>~ «J- •X U IJ III li'j 'U h- cr li. 4-' 4-' II". i.O i.O ■■-H in 'I' 4-' ai 1.0 'H— t ■ t—i n 3 -p 0) (U -P O -P a o •H -p o o -p 0) i •H 'U 4-' 13 Exper 1 ment Overv 1 euj I . Background i n format 1 on 1 1 . Programm i ng 1 anguage descry pt i on ft . Dec 1 ara b i oris Rss i gnment st at ement s Input -output Se 1 ect i on Iter at ion Express i ons Samp I e program TTT Problem 1 ft . Exp 1 anat i on o f prob 1 em B . I n i t i t i a 1 st udy o f program C . Se 1 f eva 1 uat i on 1 D . Qu i z E . be 1 f eva 1 uat l on 2 IV. Problem 2 same as above press Ihextj Figure 3. Experiment Overview Ik The system then outlined the experiment for all subjects (Figure 3). After subjects completed the background information section, the experiment assigned each to one of the four cells by first computing a level number level number = f( education level, programming experience) and then assigning subjects on the same level successively to cell 1, 2, 3, h, 1, 2, ... , etc. (As it turned out, f was unnecessarily complicated because the students in CS 201 were already reasonably similar. Even worse, f divided the subjects unevenly among the four cells. Successively assigning subjects to cells would have been sufficient.) 3.3 Teaching the Languages The two objectives of the instruction section of the experiment were to teach the syntax and semantics of the assigned language and to establish some minimum level of understanding. Declarations, assignment statements, and input-output statements were identical in both languages. declaration : integer identifier-list character identifier-list assignment-statement : variable <= expression input -output -statement : read identifier -list write identifier-list identifier-list : identifier identifier, identifier-list Selection, iteration, and expressions differed in the two languages. The selector syntax chosen for use in the KAIL-like language emphasized the basic selector characteristics. The other language was akin to ALGOL 68* Keywords were used liberally, and selection and iteration were different constructs. Also, using the ALGOL 68 closures fi, esac , and od made the introduction of begin and end unnecessary. -LP In the ALGOL-like language selection had two forms: selection : if-statement case-statement if-statement : "if" integer-expression " then " statement-sequence " else" statement -sequence "f i" case-statement : " case " integer-expression choices " esac " choices : ":" [ subscript ] statement-sequence ":" [ subscript ] statement-sequence choices For the if-statement, if the integer-expression evaluated to 0, the then statement-sequence was executed; if it evaluated to 1, the else statement- sequence was executed; otherwise, neither statement-sequence was executed, (in both languages, boolean expressions evaluated to if true and 1 if false . ) For the case-statement, the integer-expression was evaluated and saved in a temproary t; then the statement -sequence in the t+lst choice was executed. If t+1 was out of range, no statement-sequence was executed. For example , case k : 8 write "a"; : : write "b"; : 2< write "c"; esac; output "a" if k is 0, "b" if it is 1, "c" if it is 2, and nothing if k is anything else. In the KAIL-like language, selection had one form: selection : "[" integer-expression choices "]" choices : "|" [ subscript ] statement-sequence choices When executed, the integer-expression was evaluated and saved in a temporary t then the statement-sequence in the t+lst choice was executed. If t+1 was out of range, no statement -sequence was executed. In this language, iteration appeared in exactly the same form as selection except that "*" was placed in front of the left bracket and after the right bracket to indicate repetition. iteration : * selection * 16 The semantics of iteration were identical to the semantics of selection except that as long as t+1 was in range, the statement was repeatedly executed. For example , sum <> J0f ; 1 .> 1 ; L i-n 1 sum : l ; j * 1 ; wh lie j ' i i do j e used with [...], 2. while and until may only be used with *[. .]•• 3. seltags must match. 36 APPENDIX B SUBJECT BACKGROUND DATA The table on background information is understood as follows: Group : language problem order group #1 group §2 group #3 group #U ALGOL-like Automorphic Numbers problem first KAIL-like Automorphic Numbers problem first ALGOL-like Arithmetic Expression problem first KAIL-like Arithmetic Expression problem first Education Level: 1. Freshman 2. Sophomore 3. Junior h. Senior 5. Four years plus, but no degree 6. One year graduate school 7. Two years graduate school 8. Three years graduate school 9. Four or more years graduate school Language Experience: 1. Never heard of it 2. Knew of its existence 3. Knew a little about it or had written a program in it k. Knew it fairly well or had written several programs in it 5. Knew practically everything about it or had programmed extensively using it 37 PLATO Experience: , _ _ subjects with PLATO experience 100 x u - ; c number in group Class Standard Score in CS 201: mean: 500 standard deviation: 170 38 Group #1 #2 #3 #h Number in Group 20 IT 20 15 Education Level 2.8 2.3 3.1 2.7 Language Experience 2.2 2.2 2.1 2.2 ALGOL 68 2.1 1.8 1.9 1.8 ALGOL W 1.5 1.6 1.8 1.8 COBOL 2.3 2.2 2.3 2,3 EULER 1.2 1.2 l.U 1.0 FORTRAN 3.7 3.8 3.6 3.7 KAIL 1.1 1.2 1.1 1.0 LISP 1.1* 1.2 1.3 1.1+ PL/1 k.k h.5 1+.2 h.5 SNOBOL 1.6 l.T 1.8 1.8 TUTOR 2.1+ 2.6 2.1 2.2 PLATO Experience 75$ 652 6o% 872 Class Standard Score U89 517 512 513 39 APPENDIX C PROBLEMS AND PROGRAM SOLUTIONS Automorphic Numbers Problem This program finds all automorphic numbers which are less than or equal to the number read at the beginning of the program. ' R number, n, represented by djd ? ... d^ is •i Qo ... di. automorphic if the last k digits of n are dido ... di, . Some examples of automorphic numbers are Rs you can see, the squares of these numbers end with the digits which represent the original number. 36 Uo ALGOL-like Solution i nt eger i , j , k , n , i sqr ; read n; 1 i + k 4= 0: od ; KAIL-like Solution integer i, j ,k,n, isqr; read n ; l :< [ j '< i 8 j <= 1*10; 1 ; [ i a (isqr - j*(isqr*j)) I write i,isqr; 3; E k L i <= i + 4; k <= 1 "a" = 3 "he last input is always a. .9' denoting ^r\d of file (eof) . Thus , t he above express i on " - + a - + - a + - a " is encoded f^>r l nput as "213212-312 3 " . k2 ALGOL-like Solution comment = eo f , 1 ■ " + " , 2 ■ " - " , 3 = " a " ; integer i, state; char act er pr f x ; state 4= 1 ; while state 2: do case state j • i ii _ ii ii ii it „ ii ii _ it li__.ll. : e write e , r , r , o , r ; state <£ - 1 ; : t pr f x case i : e -1 : t 4 : 2 5 : 3 esac; ; , pr : x ■£ + ; read l ; state <{= case i : e : x 4 : 5 prfx * "-" ; read" i; state v= case i : - i 4 5 :^ 4 : - 3 esac; U3 KAIL-like Solution in- a^ « » II <~i II II *\ II II . comment ■ eox , I ■ + , 2 = -,3= a; mtege" l, state; character prfx; state ♦ 1 ; *[ state l e write "e\"r","r\"o","r"; state "-" ; read i; state * [ i | e Bj 2 l 2 1 l 9 3 3; S^ write prfx, "a."; read i; state + [ i | f -1 l t 4 l 2 5 I, ff ]; 1 4 pr f x j= " + " ; read l ; state + [ i I, I* 4 l 3 5 | 3 3 ]; 1 5 prfy. <> "-"; read i; state * [ i Igilj 5 l 2 4 l 3i 3 ]; kk APPENDIX D QUESTIONS Automorphic Numbers Problem 1. Each time the write statement is executed, how many values are output ? 2. How many times does k appear on the left hand side of "<="? 3. List the values that k can have during program execution. (Separate values with "," or space.) U. How many times does i appear on the left hand side of "<="? 5. List, in order, the first seven values that i can have. (Separate values with "," or space.) 6. List, in order, the first four values that isqr can have. (Separate values with "," or space.) 7. If i is 1537 > what value does j have when j *(isqr f j) is evaluated? 8. If i is 5> what is (isqr - j*(isqr -r J))? 9. If n is 52, how many times is the statement "j<=l" executed? 10. Approximately what is the probability that i is equal to n the last time through the outer loop? Arithmetic Expression Problem 1. How many read statements are in the program? 2. How many times does state appear on the left hand side "<="? 3. In how many different statements is "-" assigned to prfx? h. In how many different statements is "+" assigned to prfx? 5. If the input string consists only of "0" what is the output? 6. If the input string is "3 0" , what is the output? U5 7. A sequence of two statements can be simplified to "read state". What statement immediately precedes these? 8. Which statement can be replaced by "state <= -13" without altering the program behavior? 9. When the input is "12 3 3 0" , what sequence of characters is output? 10. What is the sequence of state values for the input "2313 0"? (Separate values with "," or space.) U6 APPENDIX E PERFORMANCE STATISTICS A three-way analysis of variance using the approximate method of unweighted means was used to compute these statistics. The three factors were language, order, and problem. Subjects took both problems, but only in one order using one language. UT Number of questions answered correctly Source of variance df MS F significance language order language x order subjects within levels of language and order (error) problem language x problem problem x order language x problem x order subjects within levels of language and order x problem (error) 1 1T.2U 5.3U <2.5/& 1 6.U9 2.01 1 3. 97 1.23 5U 3.22 1 Ik. 63 13.55 <1% 1 2.U5 2.27 1 0.08 0.08 1 2.62 2.1+3 5h 1.08 1+8 Number of questions answered correctly on first attempt Sources of varience df MS F significance language 1 2.40 0.1+8 order 1 5-91 1.19 language x order 1 6.05 1.22 subjects within levels of language and order (error) 5^ h.97 problem language x problem problem x order language x problem x order subjects within levels of language and order x problem (error) 1 1 1 1 5^ 10.68 5.61+ O.n 0.06 0.3I+ 0.18 0.10 0.05 1.89 <2. U9 Average time taken to answer a question correctly To obtain these statistics, raw data on the time taken to answer a question correctly was first transformed to N(0,l), and an average for each subject on each problem was computed. Data on questions answered incorrectly was ignored. Sources of variance df MS F significance language 1 0.1+7 1.3»i order 1 0.U9 1.39 language x order 1 0.06 0.17 subjects within levels of language \ and order (error) 5* 0.35 problem 1 0.00 0.00 language x problem 1 0.03 0.18 problem x order 1 0.31 1.9^ language x problem x order 1 0.13 0.82 subjects within levels of language and order x problem (error) 5^ 0.l6 50 Initial self-evaluation Sources of variance df MS significance language order language x order subjects within levels of language and order (error) problem language x problem problem x order language x problem x order subjects within levels of language and order x problem (error) 1 1.57 0.31 1 2.12 O.Ul 1 3.19 0.62 5^ 5.13 1 15. Qh 7.98 1 U.93 2.U8 1 1.30 O.65 1 0.39 0.19 <1% 5^ 1.99 Final self-evaluation 51 Sources of variance df MS significance language order language x order subjects within levels of language and order (error) problem language x problems problem x order language x problem x order subjects within levels of language and order x problem (error) 1 l.hl 0.18 1 2k. 61 3.02 1 0.81 0.10 5h 8.15 1 7>+.29 31.1+3 1 0.33 o.lI+ 1 0.08 o.03 1 0.69 0.29 5h 0.2U 52 Difference "between initial and final self -evaluation Sources of variance df MS significance language order language x order subjects within levels of language and order (error) problem language x problem problem x order language x problem x order subjects iwthin levels of language and order x problem (error) 1 0.00 0.00 1 12.30 i.6o 1 0.78 0.10 5h 1.66 1 21.52 7. 1| 1 2.72 0.89 1 0.75 0.2U 1 o-o^ 0.01 < 2. 5^ 3.05 53 APPENDIX F CORRELATIONS A missing data correlation program was used to compute these statistics In the following: AN = Automorphic Numbers Problem, AE = Arithmetic Expression Problem, * = significant with probability .010, ** = significant with probability .005. Correlation factors : 1. Number correct (AN) 2. Number correct (AE) 3. Number initially correct (AN) h. Number initially correct (AE) 5. Standardized mean time to a correct answer (AN) 6. Standardized mean time to a correct answer (AE) 7. Initial self-evaluation (AN) 8. Initial self-evaluation (AE) 9. Final self -evaluation (AN) 10. Final self -evaluation (AE) 11. Difference in self -evaluations (AN) 12. Difference in self-evaluations (AE) 13. Language knowledge ik. Class standard score 15. Time spent learning 5U co o co H vo o I o un vo vo un -3 r-t o CO • • • * un vo VO UN o .3 ON vo -3 o CVJ H 1 « * CO CO -3 t— O on VO ON o VO CVJ t- CM o o * • * * * * o\ on CO un H VO J- t— CM CM ro CO un UN oo -3 o C\J I 4J .C ■P W a CO +> o 4) CO >-. o c O 1-1 -P