// 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=false, 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_Rrobin.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 int SORT_8; // BV with 32 bits const SORT_8 mask_SORT_8 = (SORT_8)-1 >> (sizeof(SORT_8) * 8 - 32); const SORT_8 msb_SORT_8 = (SORT_8)1 << (32 - 1); // Initializing constants ... const SORT_1 var_5 = 0; const SORT_8 var_10 = 0; const SORT_1 var_19 = 1; // Collecting input declarations ... SORT_1 input_2; SORT_1 input_3; SORT_1 input_4; SORT_1 input_34; SORT_1 input_37; SORT_1 input_41; SORT_1 input_50; SORT_1 input_53; SORT_1 input_57; // Collecting state declarations ... SORT_1 state_6 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_12 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_24 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_25 = __VERIFIER_nondet_uchar() & mask_SORT_1; SORT_1 state_26 = __VERIFIER_nondet_uchar() & mask_SORT_1; // Initializing states ... SORT_1 init_7_arg_1 = var_5; state_6 = init_7_arg_1; SORT_1 init_13_arg_1 = var_5; state_12 = init_13_arg_1; SORT_1 init_27_arg_1 = var_5; state_26 = init_27_arg_1; for (;;) { // Getting external input values ... input_2 = __VERIFIER_nondet_uchar(); input_2 = input_2 & mask_SORT_1; input_3 = __VERIFIER_nondet_uchar(); input_3 = input_3 & mask_SORT_1; input_4 = __VERIFIER_nondet_uchar(); input_4 = input_4 & mask_SORT_1; input_34 = __VERIFIER_nondet_uchar(); input_34 = input_34 & mask_SORT_1; input_37 = __VERIFIER_nondet_uchar(); input_37 = input_37 & mask_SORT_1; input_41 = __VERIFIER_nondet_uchar(); input_41 = input_41 & mask_SORT_1; input_50 = __VERIFIER_nondet_uchar(); input_50 = input_50 & mask_SORT_1; input_53 = __VERIFIER_nondet_uchar(); input_53 = input_53 & mask_SORT_1; input_57 = __VERIFIER_nondet_uchar(); input_57 = input_57 & mask_SORT_1; // Assuming invariants ... // Asserting properties ... SORT_1 var_9_arg_0 = state_6; SORT_8 var_9 = var_9_arg_0; SORT_8 var_11_arg_0 = var_9; SORT_8 var_11_arg_1 = var_10; SORT_1 var_11 = var_11_arg_0 == var_11_arg_1; SORT_1 var_14_arg_0 = state_12; SORT_8 var_14 = var_14_arg_0; SORT_8 var_15_arg_0 = var_14; SORT_8 var_15_arg_1 = var_10; SORT_1 var_15 = var_15_arg_0 == var_15_arg_1; SORT_1 var_16_arg_0 = var_11; SORT_1 var_16_arg_1 = var_15; SORT_1 var_16 = var_16_arg_0 | var_16_arg_1; var_16 = var_16 & mask_SORT_1; SORT_1 var_20_arg_0 = var_16; SORT_1 var_20 = ~var_20_arg_0; var_20 = var_20 & mask_SORT_1; SORT_1 var_21_arg_0 = var_19; SORT_1 var_21_arg_1 = var_20; SORT_1 var_21 = var_21_arg_0 & var_21_arg_1; var_21 = var_21 & mask_SORT_1; SORT_1 bad_22_arg_0 = var_21; __VERIFIER_assert(!(bad_22_arg_0)); // Computing next states ... SORT_1 var_38_arg_0 = state_24; SORT_1 var_38 = ~var_38_arg_0; var_38 = var_38 & mask_SORT_1; SORT_1 var_35_arg_0 = state_25; SORT_1 var_35 = ~var_35_arg_0; var_35 = var_35 & mask_SORT_1; SORT_1 var_30_arg_0 = state_6; SORT_1 var_30 = ~var_30_arg_0; var_30 = var_30 & mask_SORT_1; SORT_1 var_31_arg_0 = state_12; SORT_1 var_31 = ~var_31_arg_0; var_31 = var_31 & mask_SORT_1; 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 var_29_arg_0 = state_26; SORT_1 var_29 = ~var_29_arg_0; var_29 = var_29 & mask_SORT_1; SORT_1 var_28_arg_0 = state_6; SORT_1 var_28 = ~var_28_arg_0; var_28 = var_28 & mask_SORT_1; SORT_1 var_33_arg_0 = var_32; SORT_1 var_33_arg_1 = var_29; SORT_1 var_33_arg_2 = var_28; SORT_1 var_33 = var_33_arg_0 ? var_33_arg_1 : var_33_arg_2; SORT_1 var_36_arg_0 = var_35; SORT_1 var_36_arg_1 = input_34; SORT_1 var_36_arg_2 = var_33; SORT_1 var_36 = var_36_arg_0 ? var_36_arg_1 : var_36_arg_2; SORT_1 var_39_arg_0 = var_38; SORT_1 var_39_arg_1 = input_37; SORT_1 var_39_arg_2 = var_36; SORT_1 var_39 = var_39_arg_0 ? var_39_arg_1 : var_39_arg_2; SORT_1 var_40_arg_0 = var_35; SORT_1 var_40_arg_1 = var_19; SORT_1 var_40_arg_2 = var_39; SORT_1 var_40 = var_40_arg_0 ? var_40_arg_1 : var_40_arg_2; SORT_1 var_42_arg_0 = var_38; SORT_1 var_42_arg_1 = input_41; SORT_1 var_42_arg_2 = var_40; SORT_1 var_42 = var_42_arg_0 ? var_42_arg_1 : var_42_arg_2; SORT_1 var_43_arg_0 = var_38; SORT_1 var_43_arg_1 = var_5; SORT_1 var_43_arg_2 = var_42; SORT_1 var_43 = var_43_arg_0 ? var_43_arg_1 : var_43_arg_2; SORT_1 next_44_arg_1 = var_43; SORT_1 var_54_arg_0 = state_25; SORT_1 var_54 = ~var_54_arg_0; var_54 = var_54 & mask_SORT_1; SORT_1 var_51_arg_0 = state_24; SORT_1 var_51 = ~var_51_arg_0; var_51 = var_51 & mask_SORT_1; SORT_1 var_46_arg_0 = state_6; SORT_1 var_46 = ~var_46_arg_0; var_46 = var_46 & mask_SORT_1; SORT_1 var_47_arg_0 = state_12; SORT_1 var_47 = ~var_47_arg_0; var_47 = var_47 & mask_SORT_1; SORT_1 var_48_arg_0 = var_46; SORT_1 var_48_arg_1 = var_47; SORT_1 var_48 = var_48_arg_0 & var_48_arg_1; var_48 = var_48 & mask_SORT_1; SORT_1 var_45_arg_0 = state_12; SORT_1 var_45 = ~var_45_arg_0; var_45 = var_45 & mask_SORT_1; SORT_1 var_49_arg_0 = var_48; SORT_1 var_49_arg_1 = state_26; SORT_1 var_49_arg_2 = var_45; SORT_1 var_49 = var_49_arg_0 ? var_49_arg_1 : var_49_arg_2; SORT_1 var_52_arg_0 = var_51; SORT_1 var_52_arg_1 = input_50; SORT_1 var_52_arg_2 = var_49; SORT_1 var_52 = var_52_arg_0 ? var_52_arg_1 : var_52_arg_2; SORT_1 var_55_arg_0 = var_54; SORT_1 var_55_arg_1 = input_53; SORT_1 var_55_arg_2 = var_52; SORT_1 var_55 = var_55_arg_0 ? var_55_arg_1 : var_55_arg_2; SORT_1 var_56_arg_0 = var_51; SORT_1 var_56_arg_1 = var_19; SORT_1 var_56_arg_2 = var_55; SORT_1 var_56 = var_56_arg_0 ? var_56_arg_1 : var_56_arg_2; SORT_1 var_58_arg_0 = var_54; SORT_1 var_58_arg_1 = input_57; SORT_1 var_58_arg_2 = var_56; SORT_1 var_58 = var_58_arg_0 ? var_58_arg_1 : var_58_arg_2; SORT_1 var_59_arg_0 = var_54; SORT_1 var_59_arg_1 = var_5; SORT_1 var_59_arg_2 = var_58; SORT_1 var_59 = var_59_arg_0 ? var_59_arg_1 : var_59_arg_2; SORT_1 next_60_arg_1 = var_59; SORT_1 next_61_arg_1 = input_3; SORT_1 next_62_arg_1 = input_4; SORT_1 var_64_arg_0 = state_24; SORT_1 var_64_arg_1 = state_25; SORT_1 var_64 = var_64_arg_0 & var_64_arg_1; var_64 = var_64 & mask_SORT_1; SORT_1 var_65_arg_0 = state_6; SORT_1 var_65 = ~var_65_arg_0; var_65 = var_65 & mask_SORT_1; SORT_1 var_66_arg_0 = var_64; SORT_1 var_66_arg_1 = var_65; SORT_1 var_66 = var_66_arg_0 & var_66_arg_1; var_66 = var_66 & mask_SORT_1; SORT_1 var_67_arg_0 = state_12; SORT_1 var_67 = ~var_67_arg_0; var_67 = var_67 & mask_SORT_1; SORT_1 var_68_arg_0 = var_66; SORT_1 var_68_arg_1 = var_67; SORT_1 var_68 = var_68_arg_0 & var_68_arg_1; var_68 = var_68 & mask_SORT_1; SORT_1 var_63_arg_0 = state_26; SORT_1 var_63 = ~var_63_arg_0; var_63 = var_63 & mask_SORT_1; SORT_1 var_69_arg_0 = var_68; SORT_1 var_69_arg_1 = var_63; SORT_1 var_69_arg_2 = state_26; SORT_1 var_69 = var_69_arg_0 ? var_69_arg_1 : var_69_arg_2; SORT_1 next_70_arg_1 = var_69; // Assigning next states ... state_6 = next_44_arg_1; state_12 = next_60_arg_1; state_24 = next_61_arg_1; state_25 = next_62_arg_1; state_26 = next_70_arg_1; } return 0; }