[ 0:01] compiling /var/obj/divine-nightly/semidbg/test/_expand/svcomp/recursion/recHanoi01_true.pkg.c/small.5.c [ 0:01] compiling /dios/lib/config/seqklee.bc [ 0:01] setting up pass: functionmeta, options = [ 0:02] setting up pass: fuse-ctors, options = [ 0:02] KLEE: output directory is "/var/obj/divine-nightly/semidbg/test/__test_work_dir.0/_klee_out" [ 0:04] KLEE: Using Z3 solver backend [ 0:09] WARNING: this target does not support the llvm.stacksave intrinsic. [ 0:09] warning: Linking two modules of different target triples: klee_div_zero_check.bc' is 'x86_64-unknown-linux-gnu' whereas 'klee.bc' is 'x86_64-unknown-none-elf' [ 0:09] [ 0:09] KLEE: WARNING: undefined reference to function: __dios_tainted_init [ 0:09] KLEE: WARNING: undefined reference to function: klee_free [ 0:09] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:09] about to __boot:0 [ 0:09] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:09] about to run the scheduler:0 [ 0:09] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:09] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:09] KLEE: NOTE: now ignoring this error at this location [ 0:09] KLEE: ERROR: EXITING ON ERROR: [ 0:09] Error: failed external call: __dios_tainted_init [ 0:09] File: /dios/libc/sys/start.cpp [ 0:09] Line: 87 [ 0:09] assembly.ll line: 34117 [ 0:09] Stack: [ 0:09] #000034117 in __dios_start (l=0, argc=1, argv=94274885378056, envp=94274885396488) at /dios/libc/sys/start.cpp:87 [ 0:09] #100010136 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:09] #200042467 in klee_boot (argc=1, argv=94274872518720) at /dios/arch/klee/boot.c:41 [ 0:09] [ 0:09] [ 0:09] 1 /* VERIFY_OPTS: --symbolic --sequential */ [ 0:09] 2 /* TAGS: sym c */ [ 0:09] 3 /* CC_OPTS: -DNUM=5 */ [ 0:09] 4 [ 0:09] 5 extern void __VERIFIER_error() __attribute__ ((__noreturn__)); [ 0:09] 6 [ 0:09] 7 /* [ 0:09] 8 * recHanoi.c [ 0:09] 9 * [ 0:09] 10 * Created on: 17.07.2013 [ 0:09] 11 * Author: Stefan Wissert [ 0:09] 12 */ [ 0:09] 13 [ 0:09] 14 // V: small.5 CC_OPT: -DNUM=5 [ 0:09] 15 // V: big.31 CC_OPT: -DNUM=31 TAGS: big [ 0:09] 16 [ 0:09] 17 extern int __VERIFIER_nondet_int(void); [ 0:09] 18 [ 0:09] 19 int counter; [ 0:09] 20 /* [ 0:09] 21 * This function returns the optimal amount of steps, [ 0:09] 22 * needed to solve the problem for n-disks [ 0:09] 23 */ [ 0:09] 24 int hanoi(int n) { [ 0:09] 25 if (n == 1) { [ 0:09] 26 return 1; [ 0:09] 27 } [ 0:09] 28 return 2 * (hanoi(n-1)) + 1; [ 0:09] 29 } [ 0:09] 30 [ 0:09] 31 /* [ 0:09] 32 * This applies the known algorithm, without executing it (so no arrays). [ 0:09] 33 * But the amount of steps is counted in a global variable. [ 0:09] 34 */ [ 0:09] 35 void applyHanoi(int n, int from, int to, int via) [ 0:09] 36 { [ 0:09] 37 if (n == 0) { [ 0:09] 38 return; [ 0:09] 39 } [ 0:09] 40 // increment the number of steps [ 0:09] 41 counter++; [ 0:09] 42 applyHanoi(n-1, from, via, to); [ 0:09] 43 applyHanoi(n-1, via, to, from); [ 0:09] 44 } [ 0:09] 45 [ 0:09] 46 int main() { [ 0:09] 47 int n = __VERIFIER_nondet_int(); [ 0:09] 48 if (n < 1 || n > NUM) { [ 0:09] 49 return 0; [ 0:09] 50 } [ 0:09] 51 counter = 0; [ 0:09] 52 applyHanoi(n, 1, 3, 2); [ 0:09] 53 int result = hanoi(n); [ 0:09] 54 // result and the counter should be the same! [ 0:09] 55 if (result == counter) { [ 0:09] 56 return 0; [ 0:09] 57 } else { [ 0:09] 58 ERROR: __VERIFIER_error(); [ 0:09] 59 } [ 0:09] 60 } [ 0:09] 61 [ 0:09] 62 [ 0:09] 63 [ 0:09] # no errors were expected but one was found anyway