// 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", "eq_sdp_v5.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 8 bits const SORT_1 mask_SORT_1 = (SORT_1)-1 >> (sizeof(SORT_1) * 8 - 8); const SORT_1 msb_SORT_1 = (SORT_1)1 << (8 - 1); typedef unsigned char SORT_5; // BV with 1 bits const SORT_5 mask_SORT_5 = (SORT_5)-1 >> (sizeof(SORT_5) * 8 - 1); const SORT_5 msb_SORT_5 = (SORT_5)1 << (1 - 1); // Initializing constants ... const SORT_1 var_9 = 0; const SORT_5 var_17 = 1; const SORT_5 var_29 = 0; const SORT_1 var_75 = 1; // Collecting input declarations ... SORT_1 input_2; SORT_1 input_3; SORT_1 input_4; SORT_5 input_6; SORT_5 input_7; SORT_5 input_8; SORT_5 input_27; // Collecting state declarations ... SORT_1 state_10 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_12 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_21 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_23 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_25 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_5 state_30 = __VERIFIER_nondet_uchar() & mask_SORT_5; SORT_1 state_32 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_5 state_34 = __VERIFIER_nondet_uchar() & mask_SORT_5; SORT_1 state_36 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_39 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_41 = __VERIFIER_nondet_uchar() & mask_SORT_1; // Initializing states ... SORT_1 init_11_arg_1 = var_9; state_10 = init_11_arg_1; SORT_1 init_13_arg_1 = var_9; state_12 = init_13_arg_1; SORT_1 init_22_arg_1 = var_9; state_21 = init_22_arg_1; SORT_1 init_24_arg_1 = var_9; state_23 = init_24_arg_1; SORT_1 init_26_arg_1 = var_9; state_25 = init_26_arg_1; SORT_5 init_31_arg_1 = var_29; state_30 = init_31_arg_1; SORT_1 init_33_arg_1 = var_9; state_32 = init_33_arg_1; SORT_5 init_35_arg_1 = var_29; state_34 = init_35_arg_1; SORT_1 init_37_arg_1 = var_9; state_36 = init_37_arg_1; SORT_1 init_40_arg_1 = var_9; state_39 = init_40_arg_1; SORT_1 init_42_arg_1 = var_9; state_41 = init_42_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_uchar(); input_7 = __VERIFIER_nondet_uchar(); input_7 = input_7 & mask_SORT_5; input_8 = __VERIFIER_nondet_uchar(); input_8 = input_8 & mask_SORT_5; input_27 = __VERIFIER_nondet_uchar(); // Assuming invariants ... // Asserting properties ... SORT_1 var_14_arg_0 = state_10; SORT_1 var_14_arg_1 = state_12; SORT_5 var_14 = var_14_arg_0 == var_14_arg_1; SORT_5 var_18_arg_0 = var_14; SORT_5 var_18 = ~var_18_arg_0; SORT_5 var_19_arg_0 = var_17; SORT_5 var_19_arg_1 = var_18; SORT_5 var_19 = var_19_arg_0 & var_19_arg_1; var_19 = var_19 & mask_SORT_5; SORT_5 bad_20_arg_0 = var_19; __VERIFIER_assert(!(bad_20_arg_0)); // Computing next states ... SORT_5 var_52_arg_0 = input_8; SORT_5 var_52_arg_1 = var_17; SORT_5 var_52 = var_52_arg_0 == var_52_arg_1; SORT_5 var_53_arg_0 = var_52; SORT_1 var_53_arg_1 = var_9; SORT_1 var_53_arg_2 = state_41; SORT_1 var_53 = var_53_arg_0 ? var_53_arg_1 : var_53_arg_2; var_53 = var_53 & mask_SORT_1; SORT_1 next_54_arg_1 = var_53; SORT_5 var_58_arg_0 = input_8; SORT_5 var_58_arg_1 = var_17; SORT_5 var_58 = var_58_arg_0 == var_58_arg_1; SORT_1 var_56_arg_0 = state_36; SORT_1 var_56_arg_1 = state_32; SORT_1 var_56 = var_56_arg_0 - var_56_arg_1; SORT_1 var_55_arg_0 = state_36; SORT_1 var_55_arg_1 = state_32; SORT_1 var_55 = var_55_arg_0 - var_55_arg_1; SORT_5 var_57_arg_0 = state_34; SORT_1 var_57_arg_1 = var_56; SORT_1 var_57_arg_2 = var_55; SORT_1 var_57 = var_57_arg_0 ? var_57_arg_1 : var_57_arg_2; SORT_5 var_59_arg_0 = var_58; SORT_1 var_59_arg_1 = var_9; SORT_1 var_59_arg_2 = var_57; SORT_1 var_59 = var_59_arg_0 ? var_59_arg_1 : var_59_arg_2; var_59 = var_59 & mask_SORT_1; SORT_1 next_60_arg_1 = var_59; SORT_5 var_61_arg_0 = var_58; SORT_1 var_61_arg_1 = var_9; SORT_1 var_61_arg_2 = input_2; SORT_1 var_61 = var_61_arg_0 ? var_61_arg_1 : var_61_arg_2; SORT_1 next_62_arg_1 = var_61; SORT_5 var_63_arg_0 = var_58; SORT_1 var_63_arg_1 = var_9; SORT_1 var_63_arg_2 = input_3; SORT_1 var_63 = var_63_arg_0 ? var_63_arg_1 : var_63_arg_2; SORT_1 next_64_arg_1 = var_63; SORT_5 var_65_arg_0 = var_58; SORT_1 var_65_arg_1 = var_9; SORT_1 var_65_arg_2 = input_4; SORT_1 var_65 = var_65_arg_0 ? var_65_arg_1 : var_65_arg_2; SORT_1 next_66_arg_1 = var_65; SORT_5 var_67_arg_0 = var_58; SORT_5 var_67_arg_1 = var_29; SORT_5 var_67_arg_2 = input_7; SORT_5 var_67 = var_67_arg_0 ? var_67_arg_1 : var_67_arg_2; SORT_5 next_68_arg_1 = var_67; SORT_5 var_69_arg_0 = var_58; SORT_1 var_69_arg_1 = var_9; SORT_1 var_69_arg_2 = state_25; SORT_1 var_69 = var_69_arg_0 ? var_69_arg_1 : var_69_arg_2; SORT_1 next_70_arg_1 = var_69; SORT_5 var_71_arg_0 = var_58; SORT_5 var_71_arg_1 = var_29; SORT_5 var_71_arg_2 = state_30; SORT_5 var_71 = var_71_arg_0 ? var_71_arg_1 : var_71_arg_2; var_71 = var_71 & mask_SORT_5; SORT_5 next_72_arg_1 = var_71; SORT_1 var_76_arg_0 = state_21; SORT_1 var_76_arg_1 = var_75; SORT_1 var_76 = var_76_arg_0 & var_76_arg_1; var_76 = var_76 & mask_SORT_1; SORT_1 var_77_arg_0 = var_76; SORT_1 var_77_arg_1 = var_75; SORT_5 var_77 = var_77_arg_0 == var_77_arg_1; SORT_1 var_74_arg_0 = state_21; SORT_1 var_74_arg_1 = state_23; SORT_1 var_74 = var_74_arg_0 + var_74_arg_1; SORT_1 var_73_arg_0 = state_21; SORT_1 var_73_arg_1 = state_23; SORT_1 var_73 = var_73_arg_0 - var_73_arg_1; SORT_5 var_78_arg_0 = var_77; SORT_1 var_78_arg_1 = var_74; SORT_1 var_78_arg_2 = var_73; SORT_1 var_78 = var_78_arg_0 ? var_78_arg_1 : var_78_arg_2; SORT_5 var_79_arg_0 = var_58; SORT_1 var_79_arg_1 = var_9; SORT_1 var_79_arg_2 = var_78; SORT_1 var_79 = var_79_arg_0 ? var_79_arg_1 : var_79_arg_2; SORT_1 next_80_arg_1 = var_79; SORT_1 var_45_arg_0 = input_2; SORT_5 var_45 = var_45_arg_0 >> 0; var_45 = var_45 & mask_SORT_5; SORT_1 var_44_arg_0 = input_2; SORT_1 var_44_arg_1 = input_3; SORT_1 var_44 = var_44_arg_0 + var_44_arg_1; SORT_1 var_43_arg_0 = input_2; SORT_1 var_43_arg_1 = input_3; SORT_1 var_43 = var_43_arg_0 - var_43_arg_1; SORT_5 var_46_arg_0 = var_45; SORT_1 var_46_arg_1 = var_44; SORT_1 var_46_arg_2 = var_43; SORT_1 var_46 = var_46_arg_0 ? var_46_arg_1 : var_46_arg_2; SORT_1 var_48_arg_0 = var_46; SORT_1 var_48_arg_1 = input_4; SORT_1 var_48 = var_48_arg_0 + var_48_arg_1; SORT_1 var_47_arg_0 = var_46; SORT_1 var_47_arg_1 = input_4; SORT_1 var_47 = var_47_arg_0 - var_47_arg_1; SORT_5 var_49_arg_0 = input_7; SORT_1 var_49_arg_1 = var_48; SORT_1 var_49_arg_2 = var_47; SORT_1 var_49 = var_49_arg_0 ? var_49_arg_1 : var_49_arg_2; SORT_5 var_81_arg_0 = var_52; SORT_1 var_81_arg_1 = var_9; SORT_1 var_81_arg_2 = var_49; SORT_1 var_81 = var_81_arg_0 ? var_81_arg_1 : var_81_arg_2; SORT_1 next_82_arg_1 = var_81; SORT_5 var_83_arg_0 = var_52; SORT_1 var_83_arg_1 = var_9; SORT_1 var_83_arg_2 = state_39; SORT_1 var_83 = var_83_arg_0 ? var_83_arg_1 : var_83_arg_2; SORT_1 next_84_arg_1 = var_83; // Assigning next states ... state_10 = next_54_arg_1; state_12 = next_60_arg_1; state_21 = next_62_arg_1; state_23 = next_64_arg_1; state_25 = next_66_arg_1; state_30 = next_68_arg_1; state_32 = next_70_arg_1; state_34 = next_72_arg_1; state_36 = next_80_arg_1; state_39 = next_82_arg_1; state_41 = next_84_arg_1; } return 0; }