// 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", "vis_arrays_am2910_p2.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 short SORT_5; // BV with 12 bits const SORT_5 mask_SORT_5 = (SORT_5)-1 >> (sizeof(SORT_5) * 8 - 12); const SORT_5 msb_SORT_5 = (SORT_5)1 << (12 - 1); typedef unsigned char SORT_7; // BV with 4 bits const SORT_7 mask_SORT_7 = (SORT_7)-1 >> (sizeof(SORT_7) * 8 - 4); const SORT_7 msb_SORT_7 = (SORT_7)1 << (4 - 1); typedef unsigned char SORT_16; // BV with 3 bits const SORT_16 mask_SORT_16 = (SORT_16)-1 >> (sizeof(SORT_16) * 8 - 3); const SORT_16 msb_SORT_16 = (SORT_16)1 << (3 - 1); // Initializing constants ... const SORT_1 var_12 = 0; const SORT_16 var_17 = 0; const SORT_16 var_20 = 6; const SORT_16 var_25 = 7; const SORT_1 var_30 = 1; const SORT_5 var_34 = 0; const SORT_7 var_39 = 0; const SORT_7 var_42 = 8; const SORT_7 var_44 = 9; const SORT_7 var_47 = 15; const SORT_7 var_55 = 12; const SORT_7 var_58 = 4; const SORT_7 var_64 = 10; const SORT_7 var_66 = 11; const SORT_7 var_69 = 13; const SORT_7 var_84 = 1; const SORT_7 var_89 = 5; const SORT_16 var_114 = 1; const SORT_16 var_116 = 5; const SORT_5 var_125 = 1; // Collecting input declarations ... SORT_1 input_2; SORT_1 input_3; SORT_1 input_4; SORT_5 input_6; SORT_7 input_8; SORT_1 input_9; SORT_1 input_10; SORT_1 input_11; SORT_5 input_93; SORT_5 input_95; SORT_5 input_97; SORT_5 input_99; SORT_5 input_101; SORT_5 input_103; SORT_5 input_105; SORT_5 input_107; SORT_5 input_109; // Collecting state declarations ... SORT_1 state_13 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_16 state_18 = __VERIFIER_nondet_uchar() & mask_SORT_16; SORT_16 state_23 = __VERIFIER_nondet_uchar() & mask_SORT_16; SORT_5 state_35 = __VERIFIER_nondet_ushort() & mask_SORT_5; // Initializing states ... SORT_1 init_14_arg_1 = var_12; state_13 = init_14_arg_1; SORT_16 init_19_arg_1 = var_17; state_18 = init_19_arg_1; SORT_16 init_24_arg_1 = var_17; state_23 = init_24_arg_1; SORT_5 init_36_arg_1 = var_34; state_35 = init_36_arg_1; for (;;) { // Getting external input values ... input_2 = __VERIFIER_nondet_uchar(); input_3 = __VERIFIER_nondet_uchar(); input_4 = __VERIFIER_nondet_uchar(); input_6 = __VERIFIER_nondet_ushort(); input_8 = __VERIFIER_nondet_uchar(); input_8 = input_8 & mask_SORT_7; input_9 = __VERIFIER_nondet_uchar(); input_10 = __VERIFIER_nondet_uchar(); input_11 = __VERIFIER_nondet_uchar(); input_93 = __VERIFIER_nondet_ushort(); input_95 = __VERIFIER_nondet_ushort(); input_97 = __VERIFIER_nondet_ushort(); input_99 = __VERIFIER_nondet_ushort(); input_101 = __VERIFIER_nondet_ushort(); input_103 = __VERIFIER_nondet_ushort(); input_105 = __VERIFIER_nondet_ushort(); input_107 = __VERIFIER_nondet_ushort(); input_109 = __VERIFIER_nondet_ushort(); // Assuming invariants ... // Asserting properties ... SORT_1 var_15_arg_0 = state_13; SORT_1 var_15_arg_1 = var_12; SORT_1 var_15 = var_15_arg_0 == var_15_arg_1; SORT_16 var_21_arg_0 = state_18; SORT_16 var_21_arg_1 = var_20; SORT_1 var_21 = var_21_arg_0 != var_21_arg_1; SORT_1 var_22_arg_0 = var_15; SORT_1 var_22_arg_1 = var_21; SORT_1 var_22 = var_22_arg_0 | var_22_arg_1; SORT_16 var_26_arg_0 = state_23; SORT_16 var_26_arg_1 = var_25; SORT_1 var_26 = var_26_arg_0 == var_26_arg_1; SORT_1 var_27_arg_0 = var_22; SORT_1 var_27_arg_1 = var_26; SORT_1 var_27 = var_27_arg_0 | var_27_arg_1; SORT_1 var_31_arg_0 = var_27; SORT_1 var_31 = ~var_31_arg_0; SORT_1 var_32_arg_0 = var_30; SORT_1 var_32_arg_1 = var_31; SORT_1 var_32 = var_32_arg_0 & var_32_arg_1; var_32 = var_32 & mask_SORT_1; SORT_1 bad_33_arg_0 = var_32; __VERIFIER_assert(!(bad_33_arg_0)); // Computing next states ... SORT_1 next_111_arg_1 = var_30; SORT_16 next_112_arg_1 = state_23; SORT_1 var_52_arg_0 = input_2; SORT_1 var_52 = ~var_52_arg_0; SORT_1 var_53_arg_0 = input_3; SORT_1 var_53_arg_1 = var_52; SORT_1 var_53 = var_53_arg_0 & var_53_arg_1; SORT_1 var_63_arg_0 = var_53; SORT_1 var_63 = ~var_63_arg_0; SORT_7 var_65_arg_0 = input_8; SORT_7 var_65_arg_1 = var_64; SORT_1 var_65 = var_65_arg_0 == var_65_arg_1; SORT_7 var_67_arg_0 = input_8; SORT_7 var_67_arg_1 = var_66; SORT_1 var_67 = var_67_arg_0 == var_67_arg_1; SORT_1 var_68_arg_0 = var_65; SORT_1 var_68_arg_1 = var_67; SORT_1 var_68 = var_68_arg_0 | var_68_arg_1; SORT_7 var_70_arg_0 = input_8; SORT_7 var_70_arg_1 = var_69; SORT_1 var_70 = var_70_arg_0 == var_70_arg_1; SORT_1 var_71_arg_0 = var_68; SORT_1 var_71_arg_1 = var_70; SORT_1 var_71 = var_71_arg_0 | var_71_arg_1; SORT_7 var_72_arg_0 = input_8; SORT_7 var_72_arg_1 = var_47; SORT_1 var_72 = var_72_arg_0 == var_72_arg_1; SORT_1 var_73_arg_0 = var_71; SORT_1 var_73_arg_1 = var_72; SORT_1 var_73 = var_73_arg_0 | var_73_arg_1; SORT_1 var_74_arg_0 = var_63; SORT_1 var_74_arg_1 = var_73; SORT_1 var_74 = var_74_arg_0 & var_74_arg_1; SORT_5 var_37_arg_0 = state_35; SORT_1 var_37 = var_37_arg_0 != 0; SORT_1 var_75_arg_0 = var_37; SORT_1 var_75 = ~var_75_arg_0; SORT_7 var_76_arg_0 = input_8; SORT_7 var_76_arg_1 = var_42; SORT_1 var_76 = var_76_arg_0 == var_76_arg_1; SORT_7 var_77_arg_0 = input_8; SORT_7 var_77_arg_1 = var_47; SORT_1 var_77 = var_77_arg_0 == var_77_arg_1; SORT_1 var_78_arg_0 = var_76; SORT_1 var_78_arg_1 = var_77; SORT_1 var_78 = var_78_arg_0 | var_78_arg_1; SORT_1 var_79_arg_0 = var_75; SORT_1 var_79_arg_1 = var_78; SORT_1 var_79 = var_79_arg_0 & var_79_arg_1; SORT_1 var_80_arg_0 = var_74; SORT_1 var_80_arg_1 = var_79; SORT_1 var_80 = var_80_arg_0 | var_80_arg_1; SORT_16 var_121_arg_0 = state_23; SORT_16 var_121_arg_1 = var_17; SORT_1 var_121 = var_121_arg_0 != var_121_arg_1; SORT_1 var_122_arg_0 = var_80; SORT_1 var_122_arg_1 = var_121; SORT_1 var_122 = var_122_arg_0 & var_122_arg_1; var_122 = var_122 & mask_SORT_1; SORT_16 var_120_arg_0 = state_23; SORT_16 var_120_arg_1 = var_114; SORT_16 var_120 = var_120_arg_0 - var_120_arg_1; SORT_1 var_83_arg_0 = var_53; SORT_1 var_83 = ~var_83_arg_0; SORT_7 var_85_arg_0 = input_8; SORT_7 var_85_arg_1 = var_84; SORT_1 var_85 = var_85_arg_0 == var_85_arg_1; SORT_1 var_86_arg_0 = var_83; SORT_1 var_86_arg_1 = var_85; SORT_1 var_86 = var_86_arg_0 & var_86_arg_1; SORT_7 var_87_arg_0 = input_8; SORT_7 var_87_arg_1 = var_58; SORT_1 var_87 = var_87_arg_0 == var_87_arg_1; SORT_1 var_88_arg_0 = var_86; SORT_1 var_88_arg_1 = var_87; SORT_1 var_88 = var_88_arg_0 | var_88_arg_1; SORT_7 var_90_arg_0 = input_8; SORT_7 var_90_arg_1 = var_89; SORT_1 var_90 = var_90_arg_0 == var_90_arg_1; SORT_1 var_91_arg_0 = var_88; SORT_1 var_91_arg_1 = var_90; SORT_1 var_91 = var_91_arg_0 | var_91_arg_1; SORT_16 var_117_arg_0 = state_23; SORT_16 var_117_arg_1 = var_116; SORT_1 var_117 = var_117_arg_0 != var_117_arg_1; SORT_1 var_118_arg_0 = var_91; SORT_1 var_118_arg_1 = var_117; SORT_1 var_118 = var_118_arg_0 & var_118_arg_1; var_118 = var_118 & mask_SORT_1; SORT_16 var_115_arg_0 = state_23; SORT_16 var_115_arg_1 = var_114; SORT_16 var_115 = var_115_arg_0 + var_115_arg_1; SORT_7 var_40_arg_0 = input_8; SORT_7 var_40_arg_1 = var_39; SORT_1 var_40 = var_40_arg_0 == var_40_arg_1; SORT_1 var_113_arg_0 = var_40; SORT_16 var_113_arg_1 = var_17; SORT_16 var_113_arg_2 = state_23; SORT_16 var_113 = var_113_arg_0 ? var_113_arg_1 : var_113_arg_2; SORT_1 var_119_arg_0 = var_118; SORT_16 var_119_arg_1 = var_115; SORT_16 var_119_arg_2 = var_113; SORT_16 var_119 = var_119_arg_0 ? var_119_arg_1 : var_119_arg_2; SORT_1 var_123_arg_0 = var_122; SORT_16 var_123_arg_1 = var_120; SORT_16 var_123_arg_2 = var_119; SORT_16 var_123 = var_123_arg_0 ? var_123_arg_1 : var_123_arg_2; var_123 = var_123 & mask_SORT_16; SORT_16 next_124_arg_1 = var_123; SORT_7 var_56_arg_0 = input_8; SORT_7 var_56_arg_1 = var_55; SORT_1 var_56 = var_56_arg_0 == var_56_arg_1; SORT_1 var_57_arg_0 = var_53; SORT_1 var_57 = ~var_57_arg_0; SORT_7 var_59_arg_0 = input_8; SORT_7 var_59_arg_1 = var_58; SORT_1 var_59 = var_59_arg_0 == var_59_arg_1; SORT_1 var_60_arg_0 = var_57; SORT_1 var_60_arg_1 = var_59; SORT_1 var_60 = var_60_arg_0 & var_60_arg_1; SORT_1 var_61_arg_0 = var_56; SORT_1 var_61_arg_1 = var_60; SORT_1 var_61 = var_61_arg_0 | var_61_arg_1; SORT_1 var_129_arg_0 = input_10; SORT_1 var_129 = ~var_129_arg_0; SORT_1 var_130_arg_0 = var_61; SORT_1 var_130_arg_1 = var_129; SORT_1 var_130 = var_130_arg_0 | var_130_arg_1; var_130 = var_130 & mask_SORT_1; SORT_7 var_43_arg_0 = input_8; SORT_7 var_43_arg_1 = var_42; SORT_1 var_43 = var_43_arg_0 == var_43_arg_1; SORT_7 var_45_arg_0 = input_8; SORT_7 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_43; SORT_1 var_46_arg_1 = var_45; SORT_1 var_46 = var_46_arg_0 | var_46_arg_1; SORT_7 var_48_arg_0 = input_8; SORT_7 var_48_arg_1 = var_47; SORT_1 var_48 = var_48_arg_0 == var_48_arg_1; SORT_1 var_49_arg_0 = var_46; SORT_1 var_49_arg_1 = var_48; SORT_1 var_49 = var_49_arg_0 | var_49_arg_1; SORT_1 var_50_arg_0 = var_37; SORT_1 var_50_arg_1 = var_49; SORT_1 var_50 = var_50_arg_0 & var_50_arg_1; SORT_1 var_127_arg_0 = var_50; SORT_1 var_127_arg_1 = input_10; SORT_1 var_127 = var_127_arg_0 & var_127_arg_1; var_127 = var_127 & mask_SORT_1; SORT_5 var_126_arg_0 = state_35; SORT_5 var_126_arg_1 = var_125; SORT_5 var_126 = var_126_arg_0 - var_126_arg_1; SORT_1 var_128_arg_0 = var_127; SORT_5 var_128_arg_1 = var_126; SORT_5 var_128_arg_2 = state_35; SORT_5 var_128 = var_128_arg_0 ? var_128_arg_1 : var_128_arg_2; SORT_1 var_131_arg_0 = var_130; SORT_5 var_131_arg_1 = input_6; SORT_5 var_131_arg_2 = var_128; SORT_5 var_131 = var_131_arg_0 ? var_131_arg_1 : var_131_arg_2; var_131 = var_131 & mask_SORT_5; SORT_5 next_132_arg_1 = var_131; // Assigning next states ... state_13 = next_111_arg_1; state_18 = next_112_arg_1; state_23 = next_124_arg_1; state_35 = next_132_arg_1; } return 0; }