// dowhile.txt Draft templates, with and without input REW 7/27/2010 // This is the master plan for the different loops // [Single Loop] // PassThrough - One Iteration // // Infinite // // [Many Iterations] - Normal case, not mentioned // Initialization // Yes // No // // Condition // No // [Exists] // Arithmetic // [True] // [False] // Logical // [Short Circuit + Side Effect] // [No Short Circuit] // Assignment // [True] // [False] // Relational // Boundary does not change // Boundary changes // // Action // Empty [statement] // Simple [statement] // Compound [statement] // // Update // None // After [body] // [Keyboard input] // [Expression] // Before [body] // [Keyboard input] // [Expression] // // PostLoop [Resume after loop] // // // Multiple [Back to back] // Dependent // [2 loop problems] - degrees of hardness // [3 loop problems] - degrees of hardness // [All loops of same type] - degrees of hardness // [Loops of different types] - degrees of hardness // Up [Counting] // Down [Counting] // // Independent // [2 loop problems] - degrees of hardness // [3 loop problems] - degrees of hardness // [All loops of same type] - degrees of hardness // [Loops of different types] - degrees of hardness // Up [Counting] // Down [Counting] // // Nested // Dependent // [2 loop problems] - degrees of hardness // [3 loop problems] - degrees of hardness // [All loops of same type] - degrees of hardness // [Loops of different types] - degrees of hardness // Up [Counting] // Down [Counting] // // Independent // [2 loop problems] - degrees of hardness // [3 loop problems] - degrees of hardness // [All loops of same type] - degrees of hardness // [Loops of different types] - degrees of hardness // Up [Counting] // Down [Counting] // // // ----------------------------------------------------------- // Other factors that affect template hardness: // Loop body: // Just a print statement // a constant // the loop counter // a simple expression involving the loopvar // the loopvar, boundary value (when boundary is a variable or expression) // an expression involving the loopvar and boundary value (when // it is a variable) - No, too complicated // an if-else statement with different variables in the two clauses // // Note that the type of operator, and its subtypes determine hardness, // not learning objectives. // Number of iterations: // Zero iterations // < > // far off value // boundary value // <= >= // far off value // == // far off value // != // same value // Only One iteration // Multiple iterations // < > // far off value // <= >= // far off value // boundary value // == // same value // != // n-removed value // // -------- do-while Learning Objectives -------------------- // PostTest.PassThrough - 100 // PostTest.Condition.Relational - 125 -> 200 // PostTest.Condition.Arithmetic - 300 -> 225 // PostTest.Condition.Assignment - 350 -> 250 // PostTest.Condition.Logical.Range.Conjunct - 400 -> 300 // PostTest.Condition.Logical.Range.Disjunct - 425 -> 325 // PostTest.Condition.Logical.Discrete - 450 -> 350 // PostTest.Condition.Logical.Negation - -> 375 // PostTest.Condition.Changing - 150 -> 400 // monotonic increasing // monotonic decreasing // PostTest.Condition.No - 325 -> 425 // PostTest.Multiple.Dependent - 200 -> 500 // First loop reads, second loop prints (up/down) // PostTest.Multiple.Independent - 225 -> 525 // PostTest.Nested.Dependent - 250 -> 550 // PostTest.Nested.Independent - 275 -> 575 // // ------ Orthogonal Learning Objectives ----------------------- // Input.Legal // Input.Illegal // Input.Boundary.Legal // Input.Boundary.Illegal // // ------------------------------------------------------------------ // Templates from other loops not considered here: // // PostTest.Initialization.No // PostTest.Initialization.Yes // // PostTest.Condition.Logical // PostTest.Condition.Relational // // PostTest.Action.Empty // PostTest.Action.Simple // PostTest.Action.Compound // // PostTest.Update.No // PostTest.Update.Before // PostTest.Update.After // // PostTest.PostLoop // // -------Guidelines for creating Templates // (i) All do-while learning objectives will have problets with and without inputs // (ii) Problets will be modeled on inputting until a valid value // // A problem like 435 was original sample template for inputs // See June 19. 2010 email from Amruth for more guidelines //********************* DO-WHILE LOOPS ************************************ // ------------------------------------------------------------------------ // Itereation.Logic.PostTest.PassThrough - 100 ***** with input - 110 ***** // Intersperse, reversed: // Without input: // <=, >, ==, != (update before vs after printing) // With input: // <, >=, ==, != // 100 - 102 Problets in original do-while file - values assigned to variables // Assignment before loop, output and update in loop, condition is greater than. # 100 PostTest.PassThrough > {(){=;do{<<; = - 1;}while( > 6);}} > Type: debug_output Hardness: 30 // Assignment before loop, output and update in loop, condition is equal to. # 101 PostTest.PassThrough > {(){=;do{<<; = + 1;}while( == 0);}} > Type: debug_output Hardness: 30 // Assignment before loop, output and update in loop, condition is less than. # 102 PostTest.PassThrough > {(){=;do{<<; = + 1;}while( < 0);}} > Type: debug_output Hardness: 30 // 110 - 112 New sample problets with input read into variable // Input and output in loop, condition is greater than, first input clearly passes through # 110 PostTest.PassThrough ? Input.Legal > []{(){;do{>> ;<< ;}while( > );}} > Input: "\n \n \n 0" > Type: debug_output Hardness: 30 // Input in loop and output after loop, condition is greater than or equal, first input clearly passes through # 111 PostTest.PassThrough ? Input.Legal > []{(){;do{>> ;}while( >= );<<;}} > Input: " 5" > Type: debug_output Hardness: 30 // Output and input in loop, condition is less than, first input is borderline and passes through # 112 PostTest.PassThrough ? Input.Boundary.Legal > [,]{(){=;do{>> ;<< ;}while( < );}} > Input: " 2" > Type: debug_output Hardness: 30 // ------------------------------------------------------------------------ // PostTest.Condition.Relational - 200 ***** with input - 210 ***** // Intersperse, reversed: (at least 3 iterations) // Without input: // <=, >, ==, != (update before vs after printing) // With input: // <, >=, ==, != // 200 - 207 Previously PostTest.Relational problets -- values assigned to variables // Output has been moved to after update in 4 of the 8 problets // Assignment before loop, output and increment in loop, condition is less than. # 200 PostTest.Condition.Relational > {(){=;do{<<; = + 1;}while( < 6);}} > Type: debug_output Hardness: 30 // Assignment before loop, increment and output in loop, condition is less than or equal. # 201 PostTest.Condition.Relational > {(){=;do{ = + 1;<<;}while( <= 5);}} > Type: debug_output Hardness: 30 // Assignment before loop, output and decrement in loop, condition is greater than. # 202 PostTest.Condition.Relational > {(){=;do{<<; = - 1;}while( > 0);}} > Type: debug_output Hardness: 30 // Assignment before loop, decrement and output in loop, condition is greater than or equal. # 203 PostTest.Condition.Relational > {(){=;do{ = - 1;<<;}while( >= 0);}} > Type: debug_output Hardness: 30 // Assignment before loop, increment by 5 and output in loop, condition is less than. # 204 PostTest.Condition.Relational > {(){=;do{ = + 5;<<;}while( < 30);}} > Type: debug_output Hardness: 30 // Assignment before loop, output and increment by 6 in loop, condition is less than or equal. # 205 PostTest.Condition.Relational > {(){=;do{<<; = + 6;}while( <= 30);}} > Type: debug_output Hardness: 30 // Assignment before loop, decrement by 10 and output in loop, condition is greater than. # 206 PostTest.Condition.Relational > {(){=;do{ = - 10;<<;}while( > 0);}} > Type: debug_output Hardness: 30 // Assignment before loop, output and decrement by 20 in loop, condition is greater than or equal. # 207 PostTest.Condition.Relational > {(){=;do{<<; = - 20;}while( >= 0);}} > Type: debug_output Hardness: 30 // Assignment before loop, output and input in loop, condition is less than. # 210 PostTest.Condition.Relational ? Input.Illegal, Input.Boundary.Illegal, Input.Boundary.Legal > [,]{(){=;do{<<;>>;}while( < );}} > Input: " 5" > Type: debug_output Hardness: 30 // Declaration before loop, input and output in loop, condition is less than or equal. # 211 PostTest.Condition.Relational ? Input.Illegal, Input.Boundary.Illegal, Input.Legal > []{(){;do{>>;<<;}while( <= );}} > Input: " 5" > Type: debug_output Hardness: 30 // Declaration before loop, input and output in loop, condition is greater than. # 212 PostTest.Condition.Relational ? Input.Illegal, Input.Legal > []{(){;do{>>;<<;}while( > );}} > Input: " 3" > Type: debug_output Hardness: 30 // ------------------------------------------------------------------------ // PostTest.Condition.Arithmetic ******* 225 *** with inputs *** 235 ***** // Valid in C++ but syntax error in Java and C# // Interspersed: // Without input vs With input to variable involved in expression: // +, -, *, / // 225 - 227 New Sample PostTest.Condition.Arithmetic problets -- values assigned to variables // Assignment before loop, output and decrement in loop, condition variable. # 225 PostTest.Condition.Arithmetic > {(){=;do{<<; = - 1;}while();}} > Type: debug_output Hardness: 30 // Assignments before loop, output and increment in loop, condition is constant minus variable. # 226 PostTest.Condition.Arithmetic > {(){=; do{<<; = + 1;}while( - );}} > Type: debug_output Hardness: 30 // Assignments before loop, decrement and output in loop, condition is variable minus constant. # 227 PostTest.Condition.Arithmetic > {(){=; do{ = - 1;<<;}while( - );}} > Type: debug_output Hardness: 30 // 230 - New input read into variable sample PostTest.Condition.Arithmetic problets // Input is read and output is done in loop, condition is variable. # 230 PostTest.Condition.Arithmetic ? Input.Illegal, Input.Boundary.Legal > {(){;do{>>;<<;}while();}} > Input: " 0 " > Type: debug_output Hardness: 30 // Input is read and output is done in loop, condition is constant minus variable. # 231 PostTest.Condition.Arithmetic ? Input.Illegal, Input.Boundary.Legal > []{(){;do{>>;<<;}while( - );}} > Input: " 0 2" > Type: debug_output Hardness: 30 // Input is read and output is done in loop, condition is variable minus constant. # 232 PostTest.Condition.Arithmetic ? Input.Illegal, Input.Boundary.Illegal, Input.Boundary.Legal > []{(){;do{>>;<<;}while( - );}} > Input: " 9 2" > Type: debug_output Hardness: 30 // ------------------------------------------------------------------------ // PostTest.Condition.Assignment ******* 250 *** with inputs *** 260 ***** // Syntax error in C++, Java, and C# // Variation in what is assigned to variable: // const value, variable to which value was input in loop, // expression involving variable to which value was not/was input in loop // Assignment before loop, output and increment in loop, condition is an assignment. # 250 PostTest.Condition.Assignment > {(){=;ido{<<; = + 1;}while( = );}} > Type: debug_output Hardness: 30 // Assignment before loop, increment and output in loop, condition is an assignment. # 251 PostTest.Condition.Assignment > {(){=;ido{ = + 1;<<;}while( = );}} > Type: debug_output Hardness: 30 // Assignment before loop, output and decrement in loop, condition is an assignment. # 252 PostTest.Condition.Assignment > {(){=;ido{<<; = - 1;}while( = );}} > Type: debug_output Hardness: 30 // Assignment before loop, decrement and output in loop, condition is an assignment. # 253 PostTest.Condition.Assignment > {(){=;ido{ = - 1;<<;}while( = );}} > Type: debug_output Hardness: 30 // 360 - 362 New sample PostTest.Condition.Assignment problets // Input is read and output is done in loop, condition is an assignment. # 260 PostTest.Condition.Assignment ? Input.Legal > []{(){;ido{>>;<<;}while( = );}} > Input: " 0 " > Type: debug_output Hardness: 30 // Variable assigned before loop, output is done and input is read in loop, condition // is an assignment. # 261 PostTest.Condition.Assignment ? Input.Illegal > [,]{(){ = ;ido{<<;>>;}while( = );}} > Input: " 0 2" > Type: debug_output Hardness: 30 // Input is read and and incremented and output is done in loop, condition is an assignment. # 262 PostTest.Condition.Assignment ? Input.Illegal > [,]{(){;ido{>>; = +;<<;}while( = );}} > Input: " 7 2" > Type: debug_output Hardness: 30 // ------------------------------------------------------------------------ // PostTest.Condition.Logical.Range.Conjunct - 300 - DONE/INTERSPERSE // Intersperse: // Without input // Increment by 1 // Decrement by 1 // Increment by many // Decrement by many // With input // Ends with illegal low // Ends with illegal high // Ends with boundary illegal low // Ends with boundary illegal high // Variable is output and incremented in the loop # 300 PostTest.Condition.Logical.Range.Conjunct > {(){=; do{<<; = + 1;}while( >= && <= );}} > Type: debug_output Hardness: 30 // Variable is decremented and output in the loop # 301 PostTest.Condition.Logical.Range.Conjunct > {(){=; do{ = - 1;<<;}while( > && <= );}} > Type: debug_output Hardness: 30 // Variable is incremented by many and output in the loop # 302 PostTest.Condition.Logical.Range.Conjunct > {(){=; do{ = + ;<<;}while( >= && < );}} > Type: debug_output Hardness: 30 // Variable is decremented by many and output in the loop # 303 PostTest.Condition.Logical.Range.Conjunct > [,,]{(){=; do{ = - ;<<;}while( > && <= );}} > Type: debug_output Hardness: 30 // Variable is assigned before, output and input in the loop, Ends with illegal high # 310 PostTest.Condition.Logical.Range.Conjunct ? Input.Illegal > [,,]{(){=; do{<< ;>> ;}while( >= && <= );}} > Input: "\n\n\n\n\n" > Type: debug_output Hardness: 40 // Variable is assigned before, output and input in the loop, Ends with illegal low # 311 PostTest.Condition.Logical.Range.Conjunct ? Input.Illegal > [,,]{(){=; = 1; do{<< ; = + 1;>> ;}while( > && < );}} > Input: "\n\n0\n\n\n" > Type: debug_output Hardness: 40 // Variable is input in the loop and output after loop, Ends with boundary illegal low # 312 PostTest.Condition.Logical.Range.Conjunct ? Input.Boundary.Illegal > [,]{(){;do{>> ;}while( > && <= );<< ;}} > Input: "\n\n\n\n\n0" > Type: debug_output Hardness: 50 // Variable is input and output in the loop, Ends with boundary illegal high # 313 PostTest.Condition.Logical.Range.Conjunct ? Input.Boundary.Illegal > [,]{(){;do{>> ;<< ;}while( >= && < );}} > Input: "\n\n\n\n\n" > Type: debug_output Hardness: 50 // ------------------------------------------------------------------------ // PostTest.Condition.Logical.Range.Disjunct - 325 ******** with input - 335 // Intersperse: // Without input // Increment by 1 in lower range // Decrement by 1 in upper range // Increment by many in lower range // Decrement by many in upper range // With input // Ends with illegal // Ends with boundary lower range upper limit // Ends with boundary upper range lower limit // 325 - 327 New sample problets with values assigned to variables // Variable is output and incremented in the loop # 325 PostTest.Condition.Logical.Range.Disjunct > {(){=; do{<<; = + 1;}while( < || >= );}} > Type: debug_output Hardness: 50 // Variable is decremented and output in the loop # 326 PostTest.Condition.Logical.Range.Disjunct > {(){=; do{ = - 1;<<;}while( <= || > );}} > Type: debug_output Hardness: 50 // Variable is incremented by 2 and output in the loop # 327 PostTest.Condition.Logical.Range.Disjunct > {(){=; do{ = + 2;<<;}while( >= || < );}} > Type: debug_output Hardness: 50 // 335 - 337 are variations of an original sample by AK - values are input to variables // Variable is input in the loop and output after loop # 335 PostTest.Condition.Logical.Range.Disjunct ? Input.Illegal, Input.Boundary.Legal > [,]{(){;do{>> ;}while( <= || > );<< ;}} > Input: " 0" > Type: debug_output Hardness: 50 // Variable is input and output in the loop # 336 PostTest.Condition.Logical.Range.Disjunct ? Input.Boundary.Illegal,Input.Illegal, Input.Legal > [,]{(){;do{>> ;<< ;}while( > || <= );}} > Input: " 3" > Type: debug_output Hardness: 50 // Variable is assigned before, output and input in the loop # 337 PostTest.Condition.Logical.Range.Disjunct ? Input.Boundary.Illegal, Input.Legal > [,,]{(){=; do{<< ;>> ;}while( < || >= );}} > Input: " 5" > Type: debug_output Hardness: 50 // ------------------------------------------------------------------------ // PostTest.Condition.Logical.Discrete - 350 ******** with input - 360 // Intersperse: // Without input (discrete values are uniformly spaced) // Increment by many to visit discrete values // Decrement by many to visit discrete values // Multiply to reach various products of a factor (increasing) // With input - randomly visits randomly spaced discrete values // Ends with illegal over // Ends with illegal under // Ends with illegal in between // 350 - 352 New sample problets with values assigned to variables // Variable is output and incremented in the loop, condition is conjunction of three not equals # 350 PostTest.Condition.Logical.Discrete > {(){=;do{<<; = + 1;} while( != && != && != );}} > Type: debug_output Hardness: 50 // Variable is decremented and output in the loop, condition is conjunction of three not equals # 351 PostTest.Condition.Logical.Discrete > {(){=;do{ = - 1;<<;} while( != && != && != );}} > Type: debug_output Hardness: 50 // Variable is incremented by 2 and output in the loop, condition is conjunction of three not equals # 352 PostTest.Condition.Logical.Discrete > {(){=;do{ = + 2;<<;} while( != && != && != );}} > Type: debug_output Hardness: 50 // 460 - 462 are variations of an original sample by AK - values are input to variables // Variable is input in the loop and output after loop, condition is conjunction of three not equals # 360 PostTest.Condition.Logical.Discrete ? Input.Illegal, Input.Boundary.Legal > [,,]{(){;do{>> ;} while( != && != && != );}} > Input: " 0" > Type: debug_output Hardness: 50 // Variable is input and output in the loop, condition is conjunction of three not equals # 361 PostTest.Condition.Logical.Discrete ? Input.Boundary.Illegal,Input.Illegal, Input.Boundary.Legal > [,,]{(){;do{>> ;<< ;} while( != && != && != );}} > Input: " 3 " > Type: debug_output Hardness: 50 // Variable is assigned before, output and input in the loop, condition is conjunction of three not equals # 362 PostTest.Condition.Logical.Discrete ? Input.Boundary.Illegal, Input.Boundary.Legal > [,,]{(){=;do{<< ;>> ;} while( != && != && != );}} > Input: " 5 " > Type: debug_output Hardness: 50 // ------------------------------------------------------------------------ // PostTest.Condition.Logical.Negation - 375 ******** with input - 385 // Intersperse: // Without input // Increment by 1, ! > // Decrement by 1, ! < // Increment by many, ! >= // Decrement by many, ! <= // With input // Ends with illegal over, ! > // Ends with illegal under, ! < // Ends with boundary, ! >= // Ends with boundary, ! <= // ------------------------------------------------------------------------ // PostTest.Condition.Changing - 400 ******* with input - 410 ********* // Intersperse // Without input: // var1 < var2: var1++, var2-- // var1 >= var2: var1--, var2++ // With input for var1: // var1 < var2: var2-- // var1 >= var2: var2++ // With input for var2: // var1 = var2; >> var2; while( var1 < var2 ) // var1 = var2; >> var2; while( var1 > var2 ) // With input for var1 and var2: // var1 <= var2 // var1 >= var2 // var1 != var2 // var1 == var2 // 400 - 402 New Sample PostTest.Condition.Changing problets -- values assigned to variables // Assignments before loop, output and increment and decrement in loop, condition is less than. # 400 PostTest.Condition.Changing > {(){=;=; do{<<;<<; = + 1; = - 1;}while( < );}} > Type: debug_output Hardness: 40 // Assignment before loop, increment and decrement and output in loop, condition is less than or equal. # 401 PostTest.Condition.Changing > {(){=;=; do{ = + 1; = - 1;<<;<<;}while( <= );}} > Type: debug_output Hardness: 40 // Assignment before loop, output and decrement and increment in loop, condition is greater than. # 402 PostTest.Condition.Changing > {(){=;=; do{<<;<<; = - 1; = + 1;}while( > );}} > Type: debug_output Hardness: 40 // 410 - 412 New Sample PostTest.Condition.Changing problets // Values input to one or both variables // Two variables, one assignment before loop, one variable input and other decremented in loop, // both variables output in loop, condition is less than. # 410 PostTest.Condition.Changing ? Input.Illegal, Input.Legal > []{(){;=; do{>>; = - 1;<<;<<;}while( < );}} > Input: " 4" > Type: debug_output Hardness: 30 // Two variables, one assignment before loop, one variable incremented and other input in loop, // both variables output in loop, condition is less than or equal. # 411 PostTest.Condition.Changing ? Input.Boundary.Illegal, Input.Legal > []{(){=;; do{ = + 1;>>;<<;<<;}while( <= );}} > Input: " 0 5" > Type: debug_output Hardness: 30 // Two variables declared before loop, both variables input in loop, // both variables output in loop, condition is greater than. # 412 PostTest.Condition.Changing ? Input.Illegal, Input.Boundary.Legal > {(){;; do{>>;>>;<<;<<;}while( > );}} > Input: " 5 1 " > Type: debug_output Hardness: 30 // ------------------------------------------------------------------------ // PostTest.Condition.No ******* 425 *** with inputs *** 435 ***** // Syntax error in C++, Java, and C# // Variation in body (output in all cases): // No input, with input, // Assignment before loop, output and increment in loop, condition is empty. # 425 PostTest.Condition.No > {(){=;do{<<; = + 1;}while();}} > Type: debug_output Hardness: 30 // Assignment before loop, increment and output in loop, condition is empty. # 426 PostTest.Condition.No > {(){=;do{ = + 1;<<;}while();}} > Type: debug_output Hardness: 30 // Assignment before loop, output and decrement in loop, condition is empty. # 427 PostTest.Condition.No > {(){=;do{<<; = - 1;}while();}} > Type: debug_output Hardness: 30 // Assignment before loop, decrement and output in loop, condition is empty. # 428 PostTest.Condition.No > {(){=;do{ = - 1;<<;}while();}} > Type: debug_output Hardness: 30 // 435 - 437 New sample PostTest.Condition.No problets // Input is read and output is done in loop, condition is empty. # 435 PostTest.Condition.No ? Input.Illegal > {(){;do{>>;<<;}while();}} > Input: " 0 " > Type: debug_output Hardness: 30 // Variable assigned before loop, output is done and input is read in loop, condition is empty. # 436 PostTest.Condition.No ? Input.Illegal > []{(){ = ;do{<<;>>;}while();}} > Input: " 0 2" > Type: debug_output Hardness: 30 // Input is read and and incremented and output is done in loop, condition is empty. # 437 PostTest.Condition.No ? Input.Illegal > []{(){;do{>>; = +;<<;}while();}} > Input: " 9 2" > Type: debug_output Hardness: 30 // ------------------------------------------------------------------------ // PostTest.Multiple.Dependent - 500 ****** with input 510 ******** // First loop reads value into a variable, second loop prints up to or from it, inc/dec // First loop prints up to or from a value, inc/dec; second loop reads up to its value // 500 - 502 New Sample PostTest.Multiple.Dependent problets // values assigned to variables //2-loops, two variables output and incremented in first loop, // second variable output and incremented in second loop # 500 PostTest.Multiple.Dependent > {(){=;=; do{<<;<<; = + 1; = + 1;}while( < ); do{<<; = + 1;}while( < );}} > Type: debug_output Hardness: 70 //2-loops, two variables decremented and output in first loop, // second variable incremented and output in second loop # 501 PostTest.Multiple.Dependent > {(){=;=; do{ = - 1; = - 1;<<;<<;}while( > ); do{ = + 1;<<;}while( < );}} > Type: debug_output Hardness: 70 //3-loops, single variable output and incremented in first loop, // output and decremented in second loop, output and incremented in third loop # 502 PostTest.Multiple.Dependent > {(){=; do{<<; = + 1;}while( < ); do{<<; = - 1;}while( > ); do{<<; = + 1;}while( < );}} > Type: debug_output Hardness: 80 // 510 - 512 New Sample PostTest.Multiple.Dependent problets // values read into variables //2 loops, single variable input and output in first loop // and same variable output and input in second loop, output after loops # 510 PostTest.Multiple.Dependent ? Input.Illegal, Input.Legal > [,]{(){;do{>> ;<<;}while( > ); do{<<;>> ;}while( < );<<;}} > Input: " " > Type: debug_output Hardness: 70 //2 loops, 2 variables, first variable input and output in first loop, first // variable assigned to second, then second variable output input in second loop // output after loops # 511 PostTest.Multiple.Dependent ? Input.Boundary.Illegal, Input.Boundary.Legal > [,]{(){;;do{>> ;<<;}while( < ); = ; do{<<;>> ;}while( < );<<;}} > Input: " " > Type: debug_output Hardness: 70 //3-loops, single variable, Variable assigned before loops, // output and input on all three loops, output after loops # 512 PostTest.Multiple.Dependent ? Input.Boundary.Illegal, Input.Legal > [,,,]{(){=; do{<<;>> ;}while( <= ); do{<<;>> ;}while( > ); do{<<;>> ;}while( < );}} > Input: " " > Type: debug_output Hardness: 80 // ------------------------------------------------------------------------ // PostTest.Multiple.Independent - 525 ****** with input - 535 ********** // 525 - 527 New sample problets values assigned to variables // 2-loops, a variable output and incremented in first loop, // second variable output and incremented in second loop # 525 PostTest.Multiple.Independent > {(){=; do{<<; = + 1;}while( < ); =;do{<<; = + 1;}while( <= );}} > Type: debug_output Hardness: 70 //2-loops, a variables decremented and output in first loop, // second variable incremented and output in second loop # 526 PostTest.Multiple.Independent > {(){=; do{ = - 1;<<;}while( >= ); =;do{ = + 1;<<;}while( < );}} > Type: debug_output Hardness: 70 //3-loops, a variable output and incremented in first loop, // second variable output and decremented in second loop, // third variable output and incremented in third loop # 527 PostTest.Multiple.Independent > {(){=; do{<<; = + 1;}while( < ); =;do{<<; = - 1;}while( > );}} =;do{<<; = + 1;}while( <= );}} > Type: debug_output Hardness: 80 // 535 - 537 New sample problets some values input // 2 loops, 2 variables, input and output in both loops, // first condition >=, second condition <= # 535 PostTest.Multiple.Independent ? Input.Boundary.Illegal, Input.Legal > [,]{(){;do{>> ;<<;}while( => ); ;do{>> ;<<;}while( <= );}} > Input: " " > Type: debug_output Hardness: 70 //2 loops, 1 variable, input and output in both loop // first condition <, second condition > # 536 PostTest.Multiple.Independent ? Input.Illegal, Input.Boundary.Legal > [,]{(){;do{>> ;<<;}while( < ); do{>> ;<<;}while( > );}} > Input: " 5 " > Type: debug_output Hardness: 70 //3-loops, a variable input and output in first loop, // 2nd variable assigned before 2nd loop, output and input in 2nd loop, // 3rd variable assigned before 3rd loop, output and input in 3rd loop, // 1st condition <, 2nd condition >, 3rd condition <= # 537 PostTest.Multiple.Independent ? Input.Illegal, Input.Legal > [,,,,] {(){;do{>> ;<<;}while( < ); =;do{<<;>> ;}while( > );}} =;do{<<;>> ;}while( <= );}} > Input: " " > Type: debug_output Hardness: 80 // ------------------------------------------------------------------------ // PostTest.Nested.Dependent - 550 ***** with inputs - 560 ***** // 550 - 552 New sample problets - values assigned to variables // Pair of nested loops, two variables output and one incremented in inside loop with condition <, // other variable incremented by 2 after first loop in second loop with condition < # 550 PostTest.Nested.Dependent > {(){=;=; do{do{<<;<<; = + 1;}while( < ); = + 2;}while( < 5);}} > Type: debug_output Hardness: 70 // Pair of nested loops, 2 variable, one variable incremented and the other assigned before inside loop // both variables output and the second variable decremented in inside loop with condition >=, // outside loop has condition < # 551 PostTest.Nested.Dependent > {(){=;; do{=+1;=;do{ = - 1;<<;<<;}while( >= ); }while( < );}} > Type: debug_output Hardness: 70 // Pair of nested loops, 2 variable, second variable assigned the first variable, // then the first variable incremented before inside loop // both variables output and the second variable incremented in inside loop with condition >, // outside loop has condition < # 552 PostTest.Nested.Dependent > {(){=;; do{=; = + 1;do{<<; = - 1;<<;}while( > ); }while( < );}} > Type: debug_output Hardness: 70 // 560 - 562 New sample problets - values input to variables // Pair of nested loops, 2 variables, 1 variable input before inner loop, // other variable input in inner loop and both variables output in inner loop // both conditions use < # 560 PostTest.Nested.Dependent ? Input.Illegal, Input.Boundary.Illegal, Input.Legal, Input.Boundary.Legal > []{(){;; do{>>;do{>>;<<;<<;}while( < );}while( < );}} > Input: " " > Type: debug_output Hardness: 80 // Pair of nested loops, 2 variables, 1 variable input and output before inner loop, // other variable input and output in inner loop, conditions are >= and < # 561 PostTest.Nested.Dependent ? Input.Boundary.Illegal, Input.Boundary.Legal > []{(){;; do{>>;<<;do{>>;<<;}while( => );}while( < );}} > Input: " 8 " > Type: debug_output Hardness: 80 // Pair of nested loops, 2 variables, 1 variable input before inner loop and output after, // other variable input and output in inner loop, conditions are > and >= # 562 PostTest.Nested.Dependent ? Input.Illegal, Input.Legal > []{(){;; do{>>;do{>>;<<;}while( > );<<;}while( >= );}} > Input: " 2 0 " > Type: debug_output Hardness: 80 // ------------------------------------------------------------------------ // PostTest.Nested.Independent - 575 ******* with inputs - 585 ************* // 575-578 Problets from original do-while file //Nested Up-Counting - 2-levels # 575 PostTest.Nested.Independent > {(){=;do{=; do{<<;<<; = + 1;}while( < 3); = + 1;}while( < 3);}} > Type: debug_output Hardness: 70 //3-levels # 576 PostTest.Nested.Independent > {(){=;do{=; do{=;do{<<;<<;<<; = + 1;}while( < 2); = + 1;}while( < 2); = + 1;}while( < 2);}} > Type: debug_output Hardness: 80 //Nested Down-Counting //2-levels # 577 PostTest.Nested.Independent > {(){=;do{=; do{<<;<<; = - 1;}while( > 0); = - 1;}while( > 0);}} > Type: debug_output Hardness: 70 //3-levels # 578 PostTest.Nested.Independent > {(){=;do{=; do{=;do{<<;<<;<<; = - 1;}while( >= 0); = - 1;}while( >= 0); = - 1;}while( >= 0);}} > Type: debug_output Hardness: 80 // 585 - 587 New sample problets - values input to variables // Pair of nested loops, 2 variables, 1 variable input and output before inner loop, // other variable input and output in inner loop, both conditions use < # 585 PostTest.Nested.Independent ? Input.Illegal, Input.Boundary.Illegal, Input.Legal, Input.Boundary.Legal > [,]{(){;; do{>>;<<;do{>>;<<;}while( < );}while( < );}} > Input: " " > Type: debug_output Hardness: 80 // Pair of nested loops, 2 variables, 1 variable input before inner loop and output after, // other variable input and output in inner loop, conditions are <= and > # 586 PostTest.Nested.Independent ? Input.Boundary.Illegal, Input.Boundary.Legal > [,]{(){;; do{>>;<<;do{>>;<<;}while( <= );}while( > );}} > Input: " 5 " > Type: debug_output Hardness: 80 // Pair of nested loops, 2 variables, 1 variable input and output after inner loop, // other variable input and output in inner loop, conditions are > and >= # 587 PostTest.Nested.Independent ? Input.Illegal, Input.Legal > [,]{(){;; do{do{>>;<<;}while( > );>>;<<;}while( >= );}} > Input: " 1 2 1 2 " > Type: debug_output Hardness: 80 //--------------------------------------------------------------------------- // Amruth ********************* // These problets, which were in the file emailed to me, seem to me to be very similar to those in // PostTest.Condition.Fixed problets - see 125 - 132 // Shall we eliminate these? // ************* Ralph # 575 PostTest.Update.After > {(){=;do{<<; = + 1;}while( < 11);}} > Type: debug_output Hardness: 20 # 576 PostTest.Update.After > {(){=;do{<<; = + 1;}while( <= 10);}} > Type: debug_output Hardness: 20 # 577 PostTest.Update.After > {(){=;do{<<; = - 1;}while( > 6);}} > Type: debug_output Hardness: 20 # 578 PostTest.Update.After > {(){=;do{<<; = - 1;}while( >= 5);}} > Type: debug_output Hardness: 20 # 579 PostTest.Update.After > {(){=;do{<<; = + 3;}while( < 15);}} > Type: debug_output Hardness: 20 # 580 PostTest.Update.After > {(){=;do{<<; = + 2;}while( <= 10);}} > Type: debug_output Hardness: 20 # 581 PostTest.Update.After > {(){=;do{<<; = - 3;}while( > 5);}} > Type: debug_output Hardness: 20 # 582 PostTest.Update.After > {(){=;do{<<; = - 5;}while( >= 10);}} > Type: debug_output Hardness: 20