1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
   | # $ java -Xmx1024m -ea -jar ../jpf-core/build/RunJPF.jar src/examples/demo/NumericExample.jpf symbolic.min_int=-2147483648 symbolic.min_long=-9223372036854775808 symbolic.min_short=-32768 symbolic.min_byte=-128 symbolic.min_char=0 symbolic.max_int=2147483647 symbolic.max_long=9223372036854775807 symbolic.max_short=32767 symbolic.max_byte=127 symbolic.max_char=65535 symbolic.min_double=4.9E-324 symbolic.max_double=1.7976931348623157E308 JavaPathfinder core system v8.0 - (C) 2005-2014 United States Government. All rights reserved.
 
  ====================================================== system under test demo.NumericExample.main()
  ====================================================== search started: 23-12-29 下午2:55 >0 <=0 Property Violated: PC is constraint ## = 1 ((a_1_SYMINT[15] + b_2_SYMINT[-13]) - CONST_2) == CONST_0 Property Violated: result is  "java.lang.ArithmeticException: div by 0..." ****************************
  ====================================================== error 1 gov.nasa.jpf.vm.NoUncaughtExceptionsProperty java.lang.ArithmeticException: div by 0         at demo.NumericExample.test(NumericExample.java:26)         at demo.NumericExample.main(NumericExample.java:34)
 
  ====================================================== snapshot #1 thread java.lang.Thread:{id:0,name:main,status:RUNNING,priority:5,isDaemon:false,lockCount:0,suspendCount:0}   call stack:         at demo.NumericExample.test(NumericExample.java:26)         at demo.NumericExample.main(NumericExample.java:34)
 
  ====================================================== Method Summaries Inputs: a_1_SYMINT,b_2_SYMINT
  demo.NumericExample.test(-50,17)  --> Return Value: -- demo.NumericExample.test(0,0)  --> Return Value: -- demo.NumericExample.test(15,-13)  --> "java.lang.ArithmeticException: div by 0..."
  ====================================================== Method Summaries (HTML) <h1>Test Cases Generated by Symbolic JavaPath Finder for demo.NumericExample.test (Path Coverage) </h1> <table border=1> <tr><td>a_1_SYMINT</td><td>b_2_SYMINT</td><td>RETURN</td></tr> <tr><td>-50</td><td>17</td><td>Return Value: --</td></tr> <tr><td>0</td><td>0</td><td>Return Value: --</td></tr> <tr><td>15</td><td>-13</td><td>"java.lang.ArithmeticException: div by 0..."</td></tr> </table>
  ====================================================== results error #1: gov.nasa.jpf.vm.NoUncaughtExceptionsProperty "java.lang.ArithmeticException: div by 0  at demo.N..."
  ====================================================== statistics elapsed time:       00:00:00 states:             new=5,visited=0,backtracked=5,end=2 search:             maxDepth=3,constraints=0 choice generators:  thread=1 (signal=0,lock=1,sharedRef=0,threadApi=0,reschedule=0), data=2 heap:               new=371,released=20,maxLive=349,gcCycles=3 instructions:       3246 max memory:         709MB loaded code:        classes=64,methods=1325
  ====================================================== search finished: 23-12-29 下午2:55
   |