// This file is part of the SV-Benchmarks collection of verification tasks: // https://gitlab.com/sosy-lab/benchmarking/sv-benchmarks // // SPDX-FileCopyrightText: 2020 Aman Goel // SPDX-FileCopyrightText: 2022 The SV-Benchmarks Community // // SPDX-License-Identifier: GPL-3.0-or-later // This C program is converted from Btor2 by Btor2C version sha1:a0fa249 // with arguments: { architecture=64, lazy_modulo=true, use_memmove=false, unroll_inner_loops=false, shortest_type=true, diff_type=true, decimal_constant=true, zero_init=false, sra_extend_sign=true } // Comments from the original Btor2 file: // ; source: https://github.com/aman-goel/avr/tree/92362931700b66684418a991d018c9fbdbebc06f/tests // ; BTOR description generated by Yosys 0.9+431 (git sha1 4a3b5437, clang 4.0.1-6 -fPIC -Os) for module main. extern unsigned char __VERIFIER_nondet_uchar(); extern unsigned short __VERIFIER_nondet_ushort(); extern unsigned int __VERIFIER_nondet_uint(); extern unsigned long __VERIFIER_nondet_ulong(); extern void abort(void); extern void __assert_fail(const char *, const char *, unsigned int, const char *); void reach_error() { __assert_fail("0", "h_b08.c", 0, "reach_error"); } void __VERIFIER_assert(int cond) { if (!(cond)) { ERROR: { reach_error(); abort(); } } } void assume_abort_if_not(int cond) { if (!cond) { abort(); } } int main() { // Defining sorts ... typedef unsigned char SORT_1; // BV with 1 bits const SORT_1 mask_SORT_1 = (SORT_1)-1 >> (sizeof(SORT_1) * 8 - 1); const SORT_1 msb_SORT_1 = (SORT_1)1 << (1 - 1); typedef unsigned char SORT_3; // BV with 8 bits const SORT_3 mask_SORT_3 = (SORT_3)-1 >> (sizeof(SORT_3) * 8 - 8); const SORT_3 msb_SORT_3 = (SORT_3)1 << (8 - 1); typedef unsigned int SORT_6; // BV with 20 bits const SORT_6 mask_SORT_6 = (SORT_6)-1 >> (sizeof(SORT_6) * 8 - 20); const SORT_6 msb_SORT_6 = (SORT_6)1 << (20 - 1); typedef unsigned char SORT_9; // BV with 3 bits const SORT_9 mask_SORT_9 = (SORT_9)-1 >> (sizeof(SORT_9) * 8 - 3); const SORT_9 msb_SORT_9 = (SORT_9)1 << (3 - 1); typedef unsigned int SORT_13; // BV with 32 bits const SORT_13 mask_SORT_13 = (SORT_13)-1 >> (sizeof(SORT_13) * 8 - 32); const SORT_13 msb_SORT_13 = (SORT_13)1 << (32 - 1); typedef unsigned char SORT_90; // BV with 4 bits const SORT_90 mask_SORT_90 = (SORT_90)-1 >> (sizeof(SORT_90) * 8 - 4); const SORT_90 msb_SORT_90 = (SORT_90)1 << (4 - 1); // Initializing constants ... const SORT_6 var_7 = 196596; const SORT_6 var_8 = 829275; const SORT_9 var_10 = 0; const SORT_13 var_15 = 6; const SORT_13 var_20 = 5; const SORT_13 var_25 = 4; const SORT_13 var_30 = 3; const SORT_13 var_35 = 2; const SORT_13 var_40 = 1; const SORT_13 var_45 = 0; const SORT_6 var_48 = 1047464; const SORT_6 var_60 = 1048430; const SORT_6 var_70 = 1046202; const SORT_6 var_78 = 692223; const SORT_6 var_84 = 236898; const SORT_6 var_88 = 522618; const SORT_1 var_96 = 1; const SORT_1 var_107 = 0; // Collecting input declarations ... SORT_1 input_2; SORT_3 input_4; SORT_1 input_5; SORT_6 input_18; SORT_6 input_23; SORT_6 input_28; SORT_6 input_33; SORT_6 input_38; SORT_6 input_43; SORT_6 input_50; SORT_6 input_52; SORT_6 input_54; SORT_6 input_56; SORT_6 input_58; SORT_6 input_62; SORT_6 input_64; SORT_6 input_66; SORT_6 input_68; SORT_6 input_72; SORT_6 input_74; SORT_6 input_76; SORT_6 input_80; SORT_6 input_82; SORT_6 input_86; SORT_3 input_100; SORT_90 input_102; SORT_90 input_104; SORT_1 input_113; // Collecting state declarations ... SORT_9 state_11 = __VERIFIER_nondet_uchar() & mask_SORT_9; SORT_1 state_108 = __VERIFIER_nondet_uchar() & mask_SORT_1; // Initializing states ... SORT_9 init_12_arg_1 = var_10; state_11 = init_12_arg_1; SORT_1 init_109_arg_1 = var_107; state_108 = init_109_arg_1; for (;;) { // Getting external input values ... input_2 = __VERIFIER_nondet_uchar(); input_4 = __VERIFIER_nondet_uchar(); input_5 = __VERIFIER_nondet_uchar(); input_5 = input_5 & mask_SORT_1; input_18 = __VERIFIER_nondet_uint(); input_23 = __VERIFIER_nondet_uint(); input_28 = __VERIFIER_nondet_uint(); input_33 = __VERIFIER_nondet_uint(); input_38 = __VERIFIER_nondet_uint(); input_43 = __VERIFIER_nondet_uint(); input_50 = __VERIFIER_nondet_uint(); input_52 = __VERIFIER_nondet_uint(); input_54 = __VERIFIER_nondet_uint(); input_56 = __VERIFIER_nondet_uint(); input_58 = __VERIFIER_nondet_uint(); input_62 = __VERIFIER_nondet_uint(); input_64 = __VERIFIER_nondet_uint(); input_66 = __VERIFIER_nondet_uint(); input_68 = __VERIFIER_nondet_uint(); input_72 = __VERIFIER_nondet_uint(); input_74 = __VERIFIER_nondet_uint(); input_76 = __VERIFIER_nondet_uint(); input_80 = __VERIFIER_nondet_uint(); input_82 = __VERIFIER_nondet_uint(); input_86 = __VERIFIER_nondet_uint(); input_100 = __VERIFIER_nondet_uchar(); input_102 = __VERIFIER_nondet_uchar(); input_104 = __VERIFIER_nondet_uchar(); input_113 = __VERIFIER_nondet_uchar(); // Assuming invariants ... // Asserting properties ... SORT_9 var_44_arg_0 = state_11; var_44_arg_0 = var_44_arg_0 & mask_SORT_9; SORT_13 var_44 = var_44_arg_0; SORT_13 var_46_arg_0 = var_44; SORT_13 var_46_arg_1 = var_45; SORT_1 var_46 = var_46_arg_0 == var_46_arg_1; SORT_9 var_39_arg_0 = state_11; var_39_arg_0 = var_39_arg_0 & mask_SORT_9; SORT_13 var_39 = var_39_arg_0; SORT_13 var_41_arg_0 = var_39; SORT_13 var_41_arg_1 = var_40; SORT_1 var_41 = var_41_arg_0 == var_41_arg_1; SORT_9 var_34_arg_0 = state_11; var_34_arg_0 = var_34_arg_0 & mask_SORT_9; SORT_13 var_34 = var_34_arg_0; SORT_13 var_36_arg_0 = var_34; SORT_13 var_36_arg_1 = var_35; SORT_1 var_36 = var_36_arg_0 == var_36_arg_1; SORT_9 var_29_arg_0 = state_11; var_29_arg_0 = var_29_arg_0 & mask_SORT_9; SORT_13 var_29 = var_29_arg_0; SORT_13 var_31_arg_0 = var_29; SORT_13 var_31_arg_1 = var_30; SORT_1 var_31 = var_31_arg_0 == var_31_arg_1; SORT_9 var_24_arg_0 = state_11; var_24_arg_0 = var_24_arg_0 & mask_SORT_9; SORT_13 var_24 = var_24_arg_0; SORT_13 var_26_arg_0 = var_24; SORT_13 var_26_arg_1 = var_25; SORT_1 var_26 = var_26_arg_0 == var_26_arg_1; SORT_9 var_19_arg_0 = state_11; var_19_arg_0 = var_19_arg_0 & mask_SORT_9; SORT_13 var_19 = var_19_arg_0; SORT_13 var_21_arg_0 = var_19; SORT_13 var_21_arg_1 = var_20; SORT_1 var_21 = var_21_arg_0 == var_21_arg_1; SORT_9 var_14_arg_0 = state_11; var_14_arg_0 = var_14_arg_0 & mask_SORT_9; SORT_13 var_14 = var_14_arg_0; SORT_13 var_16_arg_0 = var_14; SORT_13 var_16_arg_1 = var_15; SORT_1 var_16 = var_16_arg_0 == var_16_arg_1; SORT_1 var_17_arg_0 = var_16; SORT_6 var_17_arg_1 = var_8; SORT_6 var_17_arg_2 = var_7; SORT_6 var_17 = var_17_arg_0 ? var_17_arg_1 : var_17_arg_2; SORT_1 var_22_arg_0 = var_21; SORT_6 var_22_arg_1 = input_18; SORT_6 var_22_arg_2 = var_17; SORT_6 var_22 = var_22_arg_0 ? var_22_arg_1 : var_22_arg_2; SORT_1 var_27_arg_0 = var_26; SORT_6 var_27_arg_1 = input_23; SORT_6 var_27_arg_2 = var_22; SORT_6 var_27 = var_27_arg_0 ? var_27_arg_1 : var_27_arg_2; SORT_1 var_32_arg_0 = var_31; SORT_6 var_32_arg_1 = input_28; SORT_6 var_32_arg_2 = var_27; SORT_6 var_32 = var_32_arg_0 ? var_32_arg_1 : var_32_arg_2; SORT_1 var_37_arg_0 = var_36; SORT_6 var_37_arg_1 = input_33; SORT_6 var_37_arg_2 = var_32; SORT_6 var_37 = var_37_arg_0 ? var_37_arg_1 : var_37_arg_2; SORT_1 var_42_arg_0 = var_41; SORT_6 var_42_arg_1 = input_38; SORT_6 var_42_arg_2 = var_37; SORT_6 var_42 = var_42_arg_0 ? var_42_arg_1 : var_42_arg_2; SORT_1 var_47_arg_0 = var_46; SORT_6 var_47_arg_1 = input_43; SORT_6 var_47_arg_2 = var_42; SORT_6 var_47 = var_47_arg_0 ? var_47_arg_1 : var_47_arg_2; SORT_1 var_49_arg_0 = var_21; SORT_6 var_49_arg_1 = var_48; SORT_6 var_49_arg_2 = var_47; SORT_6 var_49 = var_49_arg_0 ? var_49_arg_1 : var_49_arg_2; SORT_1 var_51_arg_0 = var_26; SORT_6 var_51_arg_1 = input_50; SORT_6 var_51_arg_2 = var_49; SORT_6 var_51 = var_51_arg_0 ? var_51_arg_1 : var_51_arg_2; SORT_1 var_53_arg_0 = var_31; SORT_6 var_53_arg_1 = input_52; SORT_6 var_53_arg_2 = var_51; SORT_6 var_53 = var_53_arg_0 ? var_53_arg_1 : var_53_arg_2; SORT_1 var_55_arg_0 = var_36; SORT_6 var_55_arg_1 = input_54; SORT_6 var_55_arg_2 = var_53; SORT_6 var_55 = var_55_arg_0 ? var_55_arg_1 : var_55_arg_2; SORT_1 var_57_arg_0 = var_41; SORT_6 var_57_arg_1 = input_56; SORT_6 var_57_arg_2 = var_55; SORT_6 var_57 = var_57_arg_0 ? var_57_arg_1 : var_57_arg_2; SORT_1 var_59_arg_0 = var_46; SORT_6 var_59_arg_1 = input_58; SORT_6 var_59_arg_2 = var_57; SORT_6 var_59 = var_59_arg_0 ? var_59_arg_1 : var_59_arg_2; SORT_1 var_61_arg_0 = var_26; SORT_6 var_61_arg_1 = var_60; SORT_6 var_61_arg_2 = var_59; SORT_6 var_61 = var_61_arg_0 ? var_61_arg_1 : var_61_arg_2; SORT_1 var_63_arg_0 = var_31; SORT_6 var_63_arg_1 = input_62; SORT_6 var_63_arg_2 = var_61; SORT_6 var_63 = var_63_arg_0 ? var_63_arg_1 : var_63_arg_2; SORT_1 var_65_arg_0 = var_36; SORT_6 var_65_arg_1 = input_64; SORT_6 var_65_arg_2 = var_63; SORT_6 var_65 = var_65_arg_0 ? var_65_arg_1 : var_65_arg_2; SORT_1 var_67_arg_0 = var_41; SORT_6 var_67_arg_1 = input_66; SORT_6 var_67_arg_2 = var_65; SORT_6 var_67 = var_67_arg_0 ? var_67_arg_1 : var_67_arg_2; SORT_1 var_69_arg_0 = var_46; SORT_6 var_69_arg_1 = input_68; SORT_6 var_69_arg_2 = var_67; SORT_6 var_69 = var_69_arg_0 ? var_69_arg_1 : var_69_arg_2; SORT_1 var_71_arg_0 = var_31; SORT_6 var_71_arg_1 = var_70; SORT_6 var_71_arg_2 = var_69; SORT_6 var_71 = var_71_arg_0 ? var_71_arg_1 : var_71_arg_2; SORT_1 var_73_arg_0 = var_36; SORT_6 var_73_arg_1 = input_72; SORT_6 var_73_arg_2 = var_71; SORT_6 var_73 = var_73_arg_0 ? var_73_arg_1 : var_73_arg_2; SORT_1 var_75_arg_0 = var_41; SORT_6 var_75_arg_1 = input_74; SORT_6 var_75_arg_2 = var_73; SORT_6 var_75 = var_75_arg_0 ? var_75_arg_1 : var_75_arg_2; SORT_1 var_77_arg_0 = var_46; SORT_6 var_77_arg_1 = input_76; SORT_6 var_77_arg_2 = var_75; SORT_6 var_77 = var_77_arg_0 ? var_77_arg_1 : var_77_arg_2; SORT_1 var_79_arg_0 = var_36; SORT_6 var_79_arg_1 = var_78; SORT_6 var_79_arg_2 = var_77; SORT_6 var_79 = var_79_arg_0 ? var_79_arg_1 : var_79_arg_2; SORT_1 var_81_arg_0 = var_41; SORT_6 var_81_arg_1 = input_80; SORT_6 var_81_arg_2 = var_79; SORT_6 var_81 = var_81_arg_0 ? var_81_arg_1 : var_81_arg_2; SORT_1 var_83_arg_0 = var_46; SORT_6 var_83_arg_1 = input_82; SORT_6 var_83_arg_2 = var_81; SORT_6 var_83 = var_83_arg_0 ? var_83_arg_1 : var_83_arg_2; SORT_1 var_85_arg_0 = var_41; SORT_6 var_85_arg_1 = var_84; SORT_6 var_85_arg_2 = var_83; SORT_6 var_85 = var_85_arg_0 ? var_85_arg_1 : var_85_arg_2; SORT_1 var_87_arg_0 = var_46; SORT_6 var_87_arg_1 = input_86; SORT_6 var_87_arg_2 = var_85; SORT_6 var_87 = var_87_arg_0 ? var_87_arg_1 : var_87_arg_2; SORT_1 var_89_arg_0 = var_46; SORT_6 var_89_arg_1 = var_88; SORT_6 var_89_arg_2 = var_87; SORT_6 var_89 = var_89_arg_0 ? var_89_arg_1 : var_89_arg_2; SORT_6 var_91_arg_0 = var_89; SORT_90 var_91 = var_91_arg_0 >> 0; SORT_90 var_92_arg_0 = var_91; var_92_arg_0 = var_92_arg_0 & mask_SORT_90; SORT_13 var_92 = var_92_arg_0; SORT_13 var_93_arg_0 = var_92; SORT_13 var_93_arg_1 = var_45; SORT_1 var_93 = var_93_arg_0 != var_93_arg_1; SORT_1 var_97_arg_0 = var_93; SORT_1 var_97 = ~var_97_arg_0; SORT_1 var_98_arg_0 = var_96; SORT_1 var_98_arg_1 = var_97; SORT_1 var_98 = var_98_arg_0 & var_98_arg_1; var_98 = var_98 & mask_SORT_1; SORT_1 bad_99_arg_0 = var_98; __VERIFIER_assert(!(bad_99_arg_0)); // Computing next states ... SORT_1 var_111_arg_0 = state_108; SORT_9 var_111_arg_1 = var_10; SORT_9 var_111_arg_2 = state_11; SORT_9 var_111 = var_111_arg_0 ? var_111_arg_1 : var_111_arg_2; SORT_9 next_112_arg_1 = var_111; SORT_1 var_115_arg_0 = state_108; SORT_1 var_115_arg_1 = var_107; SORT_1 var_115 = var_115_arg_0 == var_115_arg_1; SORT_1 var_114_arg_0 = input_5; SORT_1 var_114_arg_1 = var_96; SORT_1 var_114_arg_2 = state_108; SORT_1 var_114 = var_114_arg_0 ? var_114_arg_1 : var_114_arg_2; SORT_1 var_116_arg_0 = var_115; SORT_1 var_116_arg_1 = var_114; SORT_1 var_116_arg_2 = input_113; SORT_1 var_116 = var_116_arg_0 ? var_116_arg_1 : var_116_arg_2; SORT_1 var_117_arg_0 = state_108; SORT_1 var_117_arg_1 = var_107; SORT_1 var_117_arg_2 = var_116; SORT_1 var_117 = var_117_arg_0 ? var_117_arg_1 : var_117_arg_2; var_117 = var_117 & mask_SORT_1; SORT_1 next_118_arg_1 = var_117; // Assigning next states ... state_11 = next_112_arg_1; state_108 = next_118_arg_1; } return 0; }