input
play

input output VS-Screen D-Tree DT-Panel A module tab {Q} post - PowerPoint PPT Presentation

input output VS-Screen D-Tree DT-Panel A module tab {Q} post condition tab {P} pre condition tab draw click any definition re-draw generated decision table (DT-Panel) 12 conditions and 4


  1. input output

  2. VS-Screen D-Tree DT-Panel

  3. A : module tab {Q} : post condition tab {P} : pre condition tab

  4. draw click any definition re-draw

  5.       

  6. generated decision table (DT-Panel)

  7. 12 conditions and 4 actions (all conditions and actions) are extracted. Truth values are properly generated. We confirmed that the VDTable operates correctly.

  8. The number of Sp Specification on Specification on Specification on combination of C (256) B (16) A (4 (4) truth values is different Measure and compare the time taken to complete the decision table for each specification Subj bjects VD VDTa Table

  9. subject VDM++ specification (The number of combination of truth values) specification A (4) specification B (16) specification C (256) A 252 405 1131 B 213 559 1292 C 169 499 1194 D 240 435 1859 E 134 557 1397 averag av age 216 498 1629 VDTab able 0.0 .012 0.0 .016 0.0 .02 • •

  10. BWDM outputs test cases that based on boundary value analysis.

  11. input output

  12. • • • • VDM++ specification

  13. Expected Output Data Boundary Value Analysis of outside input values of type range Type Boundary Value Test Case Input Expected Output No. Data Data No.1 intMin-1 “ Undefined Action” No.2 intMin “ a < 5 ” No.3 intMax “ 12 <= a ” No.4 intMax+1 “ Undefined Action” if-condition No.5 4 “a < 5 ” No.6 boundary value 5 “5 < a <= 12 ” No.7 11 “5 < a <= 12 ” No.8 12 “12 <= a ” test cases VDM++ Specification

  14. • •

  15. type boundary value Ex.) When the argument of the function is an int ↓ intMin, intMax, intMin-1, intMax+1 Minimum, maximum, and outside values of Integer range In testing phase, tester corrects it to actual numbers, such as intMin:-2147483648, according to the development environment (language, bit number, etc.), and performs test.

  16. if-conditions boundary value Ex. ) When the if- condition is “a<4” ↓ 3, 4 (3:true, 4:false) two integer values at the boundary of the inequality (three values when if-condition is modulo)

  17. • •

  18. Expected Output Data Boundary Value Analysis of outside input values of type range Type Boundary Value Test Case Input Expected Output No. Data Data No.1 intMin-1 “ Undefined Action” No.2 intMin “ a < 5 ” No.3 intMax “ 12 <= a ” No.4 intMax+1 “ Undefined Action” if-condition No.5 4 “a < 5 ” No.6 boundary value 5 “5 < a <= 12 ” No.7 11 “5 < a <= 12 ” No.8 12 “12 <= a ” test cases VDM++ Specification

  19. • two arguments • determine whether arg1 is an even number in the first remainder expression • In two inequalities, it judges the sign of arg2

  20. • According to the specification, • arg1:7, arg2:6 boundary values are output correctly • Output the input data and the expected output data correctly as the boundary value test case

  21. Times specification1 specification2 specification3 1 st time 325 316 6277 2 nd time 283 389 5321 3 rd time 500 371 6236 4 th time 291 334 5070 5 th time 269 371 5700 Average 334 356 5720

  22. • •

  23. • • • • • •

  24. #access private #location  in '/Users/katlab/Documents/workspace/VDMDT/data/Sample.vdmpp' at line 4:3 #name  revBin2dec  #type (seq of (nat) -> nat) #kind explicit function  #body private revBin2dec: (seq of (nat) -> nat)  revBin2dec(s) == (if (s = []) then 0  elseif (s = [0]) then 0 elseif (s = [1])  then 1 else ((hd s) + (2 * revBin2dec((tl s)))))

  25. … if1 #kind (s = []) explicit function then #body 0 private revBin2dec: (seq of (nat) -> nat) elseif revBin2dec(s) == (s = [0]) (if (s = []) then then 0 0 elseif (s = [0]) elseif then 0 (s = [1]) elseif (s = [1]) then then 1 1 else ((hd s) + (2 * revBin2dec((tl s))))) else1 ((hd s) + (2 * revBin2dec((tl s))))

  26. condition extraction pattern action extraction pattern if “condition’’ then then “ a ction’’ if elseif “condition” then then “ a ction’’ elseif then “ a ction’’ else else “ a ction’’ if else “ a ction’’ elseif else “ a ction’’ else else “ a ction’’ EOF cases “condition’’ -> -> “action’’ cases others “Action’’ EOF pre “condition’’ post pre “condition’’ EOF post “condition’’ EOF ※EOF(End Of File)

  27. internal representation data condition array if1 index conditi tion on (s = [ []) 0 (s = []) then 1 (s = [0]) 0 2 (s = [1]) extraction rule ※EOF(End Of File) elseif (s = [ [0]) condition extraction action extraction pattern pattern then if “condition’’ then then “action’’ if 0 elseif “condition” then then “action’’ elseif then “action’’ else elseif else “action’’ else (s = [ [1]) else “action’’ elseif else “action’’ else then else “action’’ EOF 1 cases “condition’’ -> -> “action’’ cases others “action’’ EOF else1 pre “condition’’ post ((hd s) + (2 * revBin2dec((tl s)))) pre “condition’’ EOF post “condition’’ EOF

  28. internal representation data action array if1 index action ac (s = []) 0 0 1 1 then ((hd s) + (2 * revBin2dec(( tl s )))) 2 0 extraction rule ※EOF(End Of File) elseif condition extraction action extraction (s = [0]) pattern pattern then if “condition’’ then then “action’’ if elseif “condition” then then “action’’ elseif 0 then “action’’ else elseif else “action’’ else else “action’’ elseif (s = [1]) else “action’’ else then else “action’’ EOF cases “condition’’ -> -> “action’’ cases 1 others “action’’ EOF else1 pre “condition’’ post pre “condition’’ EOF (( ((hd hd s) + (2 * revBin2de dec(( ((tl tl s)))) )) post “condition’’ EOF

  29. condition index condition internal representation data array 0 (s = []) if1 1 (s = [0]) (s = []) CA-Table 2 (s = [1]) then index of of token index of of 0 conditi tion on action elseif 0 if1 0 (s = [0]) 1 elseif 0 then 0 2 elseif 1 elseif 0 else1 2 (s = [1]) action array then index action 1 0 0 else1 1 1 ((hd s) + (2 * revBin2dec((tl s)))) 2 ((hd s) + (2 * revBin2dec(( tl s ))))

  30. number of condition and else and others 0 - - - - condition index of index of of token index of 1 - - - - conditi tion on action 2 - - - - 0 if1 0 1 elseif 0 0 - - - - index of action 2 elseif 1 1 - - - - 0 else1 2 2 - - - -

  31. number of condition and else and others 0 Y N N N condition index of index of of token index of 1 - - - - conditi tion on action 2 - - - - 0 if1 0 1 elseif 0 0 X - - - index of action 2 elseif 1 1 - - - - 0 else1 2 2 - - - -

  32. number of condition and else and others 0 Y N N N condition index of index of of token index of 1 - - - - conditi tion on action 2 - - - - 0 if1 0 1 elseif 0 0 X - - - index of action 2 elseif 1 1 - - - - 0 else1 2 2 - - - -

  33. number of condition and else and others 0 Y N N N condition index of index of of token index of 1 - Y N N conditi tion on action 2 - - - - 0 if1 0 1 elseif 0 0 X X - - index of action 2 elseif 1 1 - - - - 0 else1 2 2 - - - -

  34. number of condition and else and others 0 Y N N N condition index of index of of token index of 1 - Y N N conditi tion on action 2 - - Y N 0 if1 0 1 elseif 0 0 X X - - index of action 2 elseif 1 1 - - X - 0 else1 2 2 - - - -

  35. number of condition and else and others 0 Y N N N condition index of index of of token index of 1 - Y N N conditi tion on action 2 - - Y N 0 if1 0 1 elseif 0 0 X X - - index of action 2 elseif 1 1 - - X - 0 else1 2 2 - - - X

  36. number of condition and else and others 0 Y N N N condition index of index of of token index of 1 - Y N N conditi tion on action 2 - - Y N 0 if1 0 1 elseif 0 0 X X - - index of action 2 elseif 1 1 - - X - 0 else1 2 2 - - - X

  37. index dex condit dition ion 0 (s = []) 1 (s = [0]) 2 (s = [1]) index dex action ion 0 0 1 1 2 ((hd s) + (2 * revBin2dec(( tl s )))) Rule #1 #2 #3 #4 Condition (s = []) Y N N N (s = [0]) - Y N N (s = [1]) - - Y N Action 0 X X - - 1 - - X - ((hd s) + (2 * revBin2dec((tl s)))) - - - X

  38. • • • • • •

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend