// 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_Vlunc.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_9; // BV with 32 bits const SORT_9 mask_SORT_9 = (SORT_9)-1 >> (sizeof(SORT_9) * 8 - 32); const SORT_9 msb_SORT_9 = (SORT_9)1 << (32 - 1); // Initializing constants ... const SORT_1 var_6 = 0; const SORT_9 var_11 = 1; const SORT_1 var_28 = 1; const SORT_3 var_59 = 0; const SORT_3 var_62 = 27; const SORT_3 var_71 = 85; const SORT_3 var_74 = 67; const SORT_3 var_77 = 78; // Collecting input declarations ... SORT_1 input_2; SORT_3 input_4; SORT_1 input_5; SORT_3 input_65; SORT_1 input_70; SORT_1 input_82; SORT_1 input_85; SORT_1 input_89; SORT_1 input_98; SORT_1 input_101; SORT_1 input_105; SORT_1 input_114; SORT_1 input_117; SORT_1 input_121; SORT_1 input_130; SORT_1 input_133; // Collecting state declarations ... SORT_1 state_7 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_13 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_20 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_29 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_3 state_60 = __VERIFIER_nondet_uchar() & mask_SORT_3; SORT_3 state_68 = __VERIFIER_nondet_uchar() & mask_SORT_3; // Initializing states ... SORT_1 init_8_arg_1 = var_6; state_7 = init_8_arg_1; SORT_1 init_14_arg_1 = var_6; state_13 = init_14_arg_1; SORT_1 init_21_arg_1 = var_6; state_20 = init_21_arg_1; SORT_1 init_30_arg_1 = var_28; state_29 = init_30_arg_1; SORT_3 init_61_arg_1 = var_59; state_60 = init_61_arg_1; SORT_3 init_69_arg_1 = var_59; state_68 = init_69_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_65 = __VERIFIER_nondet_uchar(); input_70 = __VERIFIER_nondet_uchar(); input_82 = __VERIFIER_nondet_uchar(); input_85 = __VERIFIER_nondet_uchar(); input_89 = __VERIFIER_nondet_uchar(); input_98 = __VERIFIER_nondet_uchar(); input_101 = __VERIFIER_nondet_uchar(); input_105 = __VERIFIER_nondet_uchar(); input_114 = __VERIFIER_nondet_uchar(); input_117 = __VERIFIER_nondet_uchar(); input_121 = __VERIFIER_nondet_uchar(); input_130 = __VERIFIER_nondet_uchar(); input_133 = __VERIFIER_nondet_uchar(); // Assuming invariants ... // Asserting properties ... SORT_1 var_10_arg_0 = state_7; var_10_arg_0 = var_10_arg_0 & mask_SORT_1; SORT_9 var_10 = var_10_arg_0; SORT_9 var_12_arg_0 = var_10; SORT_9 var_12_arg_1 = var_11; SORT_1 var_12 = var_12_arg_0 == var_12_arg_1; SORT_1 var_15_arg_0 = state_13; var_15_arg_0 = var_15_arg_0 & mask_SORT_1; SORT_9 var_15 = var_15_arg_0; SORT_9 var_16_arg_0 = var_15; SORT_9 var_16_arg_1 = var_11; SORT_1 var_16 = var_16_arg_0 == var_16_arg_1; SORT_1 var_17_arg_0 = var_12; SORT_1 var_17_arg_1 = var_16; SORT_1 var_17 = var_17_arg_0 & var_17_arg_1; SORT_1 var_18_arg_0 = state_7; var_18_arg_0 = var_18_arg_0 & mask_SORT_1; SORT_9 var_18 = var_18_arg_0; SORT_9 var_19_arg_0 = var_18; SORT_9 var_19_arg_1 = var_11; SORT_1 var_19 = var_19_arg_0 == var_19_arg_1; SORT_1 var_22_arg_0 = state_20; var_22_arg_0 = var_22_arg_0 & mask_SORT_1; SORT_9 var_22 = var_22_arg_0; SORT_9 var_23_arg_0 = var_22; SORT_9 var_23_arg_1 = var_11; SORT_1 var_23 = var_23_arg_0 == var_23_arg_1; SORT_1 var_24_arg_0 = var_19; SORT_1 var_24_arg_1 = var_23; SORT_1 var_24 = var_24_arg_0 & var_24_arg_1; SORT_1 var_25_arg_0 = var_17; SORT_1 var_25_arg_1 = var_24; SORT_1 var_25 = var_25_arg_0 | var_25_arg_1; SORT_1 var_26_arg_0 = state_7; var_26_arg_0 = var_26_arg_0 & mask_SORT_1; SORT_9 var_26 = var_26_arg_0; SORT_9 var_27_arg_0 = var_26; SORT_9 var_27_arg_1 = var_11; SORT_1 var_27 = var_27_arg_0 == var_27_arg_1; SORT_1 var_31_arg_0 = state_29; var_31_arg_0 = var_31_arg_0 & mask_SORT_1; SORT_9 var_31 = var_31_arg_0; SORT_9 var_32_arg_0 = var_31; SORT_9 var_32_arg_1 = var_11; SORT_1 var_32 = var_32_arg_0 == var_32_arg_1; SORT_1 var_33_arg_0 = var_27; SORT_1 var_33_arg_1 = var_32; SORT_1 var_33 = var_33_arg_0 & var_33_arg_1; SORT_1 var_34_arg_0 = var_25; SORT_1 var_34_arg_1 = var_33; SORT_1 var_34 = var_34_arg_0 | var_34_arg_1; SORT_1 var_35_arg_0 = state_13; var_35_arg_0 = var_35_arg_0 & mask_SORT_1; SORT_9 var_35 = var_35_arg_0; SORT_9 var_36_arg_0 = var_35; SORT_9 var_36_arg_1 = var_11; SORT_1 var_36 = var_36_arg_0 == var_36_arg_1; SORT_1 var_37_arg_0 = state_20; var_37_arg_0 = var_37_arg_0 & mask_SORT_1; SORT_9 var_37 = var_37_arg_0; SORT_9 var_38_arg_0 = var_37; SORT_9 var_38_arg_1 = var_11; SORT_1 var_38 = var_38_arg_0 == var_38_arg_1; SORT_1 var_39_arg_0 = var_36; SORT_1 var_39_arg_1 = var_38; SORT_1 var_39 = var_39_arg_0 & var_39_arg_1; SORT_1 var_40_arg_0 = var_34; SORT_1 var_40_arg_1 = var_39; SORT_1 var_40 = var_40_arg_0 | var_40_arg_1; SORT_1 var_41_arg_0 = state_13; var_41_arg_0 = var_41_arg_0 & mask_SORT_1; SORT_9 var_41 = var_41_arg_0; SORT_9 var_42_arg_0 = var_41; SORT_9 var_42_arg_1 = var_11; SORT_1 var_42 = var_42_arg_0 == var_42_arg_1; SORT_1 var_43_arg_0 = state_29; var_43_arg_0 = var_43_arg_0 & mask_SORT_1; SORT_9 var_43 = var_43_arg_0; SORT_9 var_44_arg_0 = var_43; SORT_9 var_44_arg_1 = var_11; SORT_1 var_44 = var_44_arg_0 == var_44_arg_1; SORT_1 var_45_arg_0 = var_42; SORT_1 var_45_arg_1 = var_44; SORT_1 var_45 = var_45_arg_0 & var_45_arg_1; SORT_1 var_46_arg_0 = var_40; SORT_1 var_46_arg_1 = var_45; SORT_1 var_46 = var_46_arg_0 | var_46_arg_1; SORT_1 var_47_arg_0 = state_20; var_47_arg_0 = var_47_arg_0 & mask_SORT_1; SORT_9 var_47 = var_47_arg_0; SORT_9 var_48_arg_0 = var_47; SORT_9 var_48_arg_1 = var_11; SORT_1 var_48 = var_48_arg_0 == var_48_arg_1; SORT_1 var_49_arg_0 = state_29; var_49_arg_0 = var_49_arg_0 & mask_SORT_1; SORT_9 var_49 = var_49_arg_0; SORT_9 var_50_arg_0 = var_49; SORT_9 var_50_arg_1 = var_11; SORT_1 var_50 = var_50_arg_0 == var_50_arg_1; SORT_1 var_51_arg_0 = var_48; SORT_1 var_51_arg_1 = var_50; SORT_1 var_51 = var_51_arg_0 & var_51_arg_1; SORT_1 var_52_arg_0 = var_46; SORT_1 var_52_arg_1 = var_51; SORT_1 var_52 = var_52_arg_0 | var_52_arg_1; SORT_1 var_53_arg_0 = var_52; SORT_1 var_53 = ~var_53_arg_0; SORT_1 var_56_arg_0 = var_53; SORT_1 var_56 = ~var_56_arg_0; SORT_1 var_57_arg_0 = var_28; SORT_1 var_57_arg_1 = var_56; SORT_1 var_57 = var_57_arg_0 & var_57_arg_1; var_57 = var_57 & mask_SORT_1; SORT_1 bad_58_arg_0 = var_57; __VERIFIER_assert(!(bad_58_arg_0)); // Computing next states ... SORT_3 var_63_arg_0 = state_60; SORT_3 var_63_arg_1 = var_62; SORT_1 var_63 = var_63_arg_0 == var_63_arg_1; SORT_3 var_78_arg_0 = state_68; SORT_3 var_78_arg_1 = var_77; SORT_1 var_78 = var_78_arg_0 == var_78_arg_1; SORT_3 var_75_arg_0 = state_68; SORT_3 var_75_arg_1 = var_74; SORT_1 var_75 = var_75_arg_0 == var_75_arg_1; SORT_1 var_79_arg_0 = var_78; SORT_1 var_79_arg_1 = var_75; SORT_1 var_79 = var_79_arg_0 | var_79_arg_1; var_79 = var_79 & mask_SORT_1; SORT_1 var_76_arg_0 = var_75; SORT_1 var_76_arg_1 = var_6; SORT_1 var_76_arg_2 = var_6; SORT_1 var_76 = var_76_arg_0 ? var_76_arg_1 : var_76_arg_2; SORT_3 var_72_arg_0 = state_68; SORT_3 var_72_arg_1 = var_71; SORT_1 var_72 = var_72_arg_0 == var_72_arg_1; SORT_1 var_73_arg_0 = var_72; SORT_1 var_73_arg_1 = var_6; SORT_1 var_73_arg_2 = var_28; SORT_1 var_73 = var_73_arg_0 ? var_73_arg_1 : var_73_arg_2; SORT_1 var_80_arg_0 = var_79; SORT_1 var_80_arg_1 = var_76; SORT_1 var_80_arg_2 = var_73; SORT_1 var_80 = var_80_arg_0 ? var_80_arg_1 : var_80_arg_2; SORT_1 var_81_arg_0 = var_63; SORT_1 var_81_arg_1 = var_80; SORT_1 var_81_arg_2 = input_70; SORT_1 var_81 = var_81_arg_0 ? var_81_arg_1 : var_81_arg_2; SORT_1 var_83_arg_0 = input_5; SORT_1 var_83_arg_1 = input_82; SORT_1 var_83_arg_2 = var_81; SORT_1 var_83 = var_83_arg_0 ? var_83_arg_1 : var_83_arg_2; SORT_1 var_84_arg_0 = var_63; SORT_1 var_84_arg_1 = var_83; SORT_1 var_84_arg_2 = state_7; SORT_1 var_84 = var_84_arg_0 ? var_84_arg_1 : var_84_arg_2; SORT_1 var_86_arg_0 = input_5; SORT_1 var_86_arg_1 = input_85; SORT_1 var_86_arg_2 = var_84; SORT_1 var_86 = var_86_arg_0 ? var_86_arg_1 : var_86_arg_2; SORT_1 var_87_arg_0 = input_5; SORT_1 var_87_arg_1 = var_6; SORT_1 var_87_arg_2 = var_86; SORT_1 var_87 = var_87_arg_0 ? var_87_arg_1 : var_87_arg_2; SORT_1 next_88_arg_1 = var_87; SORT_3 var_94_arg_0 = state_68; SORT_3 var_94_arg_1 = var_77; SORT_1 var_94 = var_94_arg_0 == var_94_arg_1; SORT_3 var_92_arg_0 = state_68; SORT_3 var_92_arg_1 = var_74; SORT_1 var_92 = var_92_arg_0 == var_92_arg_1; SORT_1 var_95_arg_0 = var_94; SORT_1 var_95_arg_1 = var_92; SORT_1 var_95 = var_95_arg_0 | var_95_arg_1; var_95 = var_95 & mask_SORT_1; SORT_1 var_93_arg_0 = var_92; SORT_1 var_93_arg_1 = var_6; SORT_1 var_93_arg_2 = var_6; SORT_1 var_93 = var_93_arg_0 ? var_93_arg_1 : var_93_arg_2; SORT_3 var_90_arg_0 = state_68; SORT_3 var_90_arg_1 = var_71; SORT_1 var_90 = var_90_arg_0 == var_90_arg_1; SORT_1 var_91_arg_0 = var_90; SORT_1 var_91_arg_1 = var_28; SORT_1 var_91_arg_2 = var_6; SORT_1 var_91 = var_91_arg_0 ? var_91_arg_1 : var_91_arg_2; SORT_1 var_96_arg_0 = var_95; SORT_1 var_96_arg_1 = var_93; SORT_1 var_96_arg_2 = var_91; SORT_1 var_96 = var_96_arg_0 ? var_96_arg_1 : var_96_arg_2; SORT_1 var_97_arg_0 = var_63; SORT_1 var_97_arg_1 = var_96; SORT_1 var_97_arg_2 = input_89; SORT_1 var_97 = var_97_arg_0 ? var_97_arg_1 : var_97_arg_2; SORT_1 var_99_arg_0 = input_5; SORT_1 var_99_arg_1 = input_98; SORT_1 var_99_arg_2 = var_97; SORT_1 var_99 = var_99_arg_0 ? var_99_arg_1 : var_99_arg_2; SORT_1 var_100_arg_0 = var_63; SORT_1 var_100_arg_1 = var_99; SORT_1 var_100_arg_2 = state_13; SORT_1 var_100 = var_100_arg_0 ? var_100_arg_1 : var_100_arg_2; SORT_1 var_102_arg_0 = input_5; SORT_1 var_102_arg_1 = input_101; SORT_1 var_102_arg_2 = var_100; SORT_1 var_102 = var_102_arg_0 ? var_102_arg_1 : var_102_arg_2; SORT_1 var_103_arg_0 = input_5; SORT_1 var_103_arg_1 = var_6; SORT_1 var_103_arg_2 = var_102; SORT_1 var_103 = var_103_arg_0 ? var_103_arg_1 : var_103_arg_2; SORT_1 next_104_arg_1 = var_103; SORT_3 var_110_arg_0 = state_68; SORT_3 var_110_arg_1 = var_77; SORT_1 var_110 = var_110_arg_0 == var_110_arg_1; SORT_3 var_108_arg_0 = state_68; SORT_3 var_108_arg_1 = var_74; SORT_1 var_108 = var_108_arg_0 == var_108_arg_1; SORT_1 var_111_arg_0 = var_110; SORT_1 var_111_arg_1 = var_108; SORT_1 var_111 = var_111_arg_0 | var_111_arg_1; var_111 = var_111 & mask_SORT_1; SORT_1 var_109_arg_0 = var_108; SORT_1 var_109_arg_1 = var_28; SORT_1 var_109_arg_2 = var_6; SORT_1 var_109 = var_109_arg_0 ? var_109_arg_1 : var_109_arg_2; SORT_3 var_106_arg_0 = state_68; SORT_3 var_106_arg_1 = var_71; SORT_1 var_106 = var_106_arg_0 == var_106_arg_1; SORT_1 var_107_arg_0 = var_106; SORT_1 var_107_arg_1 = var_6; SORT_1 var_107_arg_2 = var_6; SORT_1 var_107 = var_107_arg_0 ? var_107_arg_1 : var_107_arg_2; SORT_1 var_112_arg_0 = var_111; SORT_1 var_112_arg_1 = var_109; SORT_1 var_112_arg_2 = var_107; SORT_1 var_112 = var_112_arg_0 ? var_112_arg_1 : var_112_arg_2; SORT_1 var_113_arg_0 = var_63; SORT_1 var_113_arg_1 = var_112; SORT_1 var_113_arg_2 = input_105; SORT_1 var_113 = var_113_arg_0 ? var_113_arg_1 : var_113_arg_2; SORT_1 var_115_arg_0 = input_5; SORT_1 var_115_arg_1 = input_114; SORT_1 var_115_arg_2 = var_113; SORT_1 var_115 = var_115_arg_0 ? var_115_arg_1 : var_115_arg_2; SORT_1 var_116_arg_0 = var_63; SORT_1 var_116_arg_1 = var_115; SORT_1 var_116_arg_2 = state_20; SORT_1 var_116 = var_116_arg_0 ? var_116_arg_1 : var_116_arg_2; SORT_1 var_118_arg_0 = input_5; SORT_1 var_118_arg_1 = input_117; SORT_1 var_118_arg_2 = var_116; SORT_1 var_118 = var_118_arg_0 ? var_118_arg_1 : var_118_arg_2; SORT_1 var_119_arg_0 = input_5; SORT_1 var_119_arg_1 = var_6; SORT_1 var_119_arg_2 = var_118; SORT_1 var_119 = var_119_arg_0 ? var_119_arg_1 : var_119_arg_2; SORT_1 next_120_arg_1 = var_119; SORT_3 var_126_arg_0 = state_68; SORT_3 var_126_arg_1 = var_77; SORT_1 var_126 = var_126_arg_0 == var_126_arg_1; SORT_3 var_124_arg_0 = state_68; SORT_3 var_124_arg_1 = var_74; SORT_1 var_124 = var_124_arg_0 == var_124_arg_1; SORT_1 var_127_arg_0 = var_126; SORT_1 var_127_arg_1 = var_124; SORT_1 var_127 = var_127_arg_0 | var_127_arg_1; var_127 = var_127 & mask_SORT_1; SORT_1 var_125_arg_0 = var_124; SORT_1 var_125_arg_1 = var_6; SORT_1 var_125_arg_2 = var_28; SORT_1 var_125 = var_125_arg_0 ? var_125_arg_1 : var_125_arg_2; SORT_3 var_122_arg_0 = state_68; SORT_3 var_122_arg_1 = var_71; SORT_1 var_122 = var_122_arg_0 == var_122_arg_1; SORT_1 var_123_arg_0 = var_122; SORT_1 var_123_arg_1 = var_6; SORT_1 var_123_arg_2 = var_6; SORT_1 var_123 = var_123_arg_0 ? var_123_arg_1 : var_123_arg_2; SORT_1 var_128_arg_0 = var_127; SORT_1 var_128_arg_1 = var_125; SORT_1 var_128_arg_2 = var_123; SORT_1 var_128 = var_128_arg_0 ? var_128_arg_1 : var_128_arg_2; SORT_1 var_129_arg_0 = var_63; SORT_1 var_129_arg_1 = var_128; SORT_1 var_129_arg_2 = input_121; SORT_1 var_129 = var_129_arg_0 ? var_129_arg_1 : var_129_arg_2; SORT_1 var_131_arg_0 = input_5; SORT_1 var_131_arg_1 = input_130; SORT_1 var_131_arg_2 = var_129; SORT_1 var_131 = var_131_arg_0 ? var_131_arg_1 : var_131_arg_2; SORT_1 var_132_arg_0 = var_63; SORT_1 var_132_arg_1 = var_131; SORT_1 var_132_arg_2 = state_29; SORT_1 var_132 = var_132_arg_0 ? var_132_arg_1 : var_132_arg_2; SORT_1 var_134_arg_0 = input_5; SORT_1 var_134_arg_1 = input_133; SORT_1 var_134_arg_2 = var_132; SORT_1 var_134 = var_134_arg_0 ? var_134_arg_1 : var_134_arg_2; SORT_1 var_135_arg_0 = input_5; SORT_1 var_135_arg_1 = var_28; SORT_1 var_135_arg_2 = var_134; SORT_1 var_135 = var_135_arg_0 ? var_135_arg_1 : var_135_arg_2; SORT_1 next_136_arg_1 = var_135; SORT_1 var_137_arg_0 = input_5; SORT_3 var_137_arg_1 = var_59; SORT_3 var_137_arg_2 = state_68; SORT_3 var_137 = var_137_arg_0 ? var_137_arg_1 : var_137_arg_2; var_137 = var_137 & mask_SORT_3; SORT_3 next_138_arg_1 = var_137; SORT_1 var_139_arg_0 = input_5; SORT_3 var_139_arg_1 = var_59; SORT_3 var_139_arg_2 = input_4; SORT_3 var_139 = var_139_arg_0 ? var_139_arg_1 : var_139_arg_2; var_139 = var_139 & mask_SORT_3; SORT_3 next_140_arg_1 = var_139; // Assigning next states ... state_7 = next_88_arg_1; state_13 = next_104_arg_1; state_20 = next_120_arg_1; state_29 = next_136_arg_1; state_60 = next_138_arg_1; state_68 = next_140_arg_1; } return 0; }