// This file is part of the SV-Benchmarks collection of verification tasks: // https://gitlab.com/sosy-lab/benchmarking/sv-benchmarks // // SPDX-FileCopyrightText: 2013 Carnegie Mellon University // SPDX-FileCopyrightText: 2014-2021 The SV-Benchmarks Community // SPDX-FileCopyrightText: 2018 Marie-Christine Jakobs, LMU Munich // // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Attribution-CMU-LMU int __return_main; void abort(void); extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); void reach_error() { __assert_fail("0", "pals_lcr-var-start-time.3.ufo.UNBOUNDED.pals.c.v+nlh-reducer.c", 4, "reach_error"); } _Bool __VERIFIER_nondet_bool(); char __VERIFIER_nondet_char(); unsigned char __VERIFIER_nondet_uchar(); void assert(_Bool arg); void abort(void); void assume_abort_if_not(int cond) { if(!cond) {abort();} } typedef char msg_t; typedef int port_t; void read(port_t p, msg_t m); void write(port_t p, msg_t m); msg_t nomsg = (msg_t )-1; unsigned char r1 = '\x0'; port_t p1 = 0; char p1_old = '\x0'; char p1_new = '\x0'; char id1 = '\x0'; char st1 = '\x0'; msg_t send1 = '\x0'; _Bool mode1 = 0; _Bool alive1 = 0; port_t p2 = 0; char p2_old = '\x0'; char p2_new = '\x0'; char id2 = '\x0'; char st2 = '\x0'; msg_t send2 = '\x0'; _Bool mode2 = 0; _Bool alive2 = 0; port_t p3 = 0; char p3_old = '\x0'; char p3_new = '\x0'; char id3 = '\x0'; char st3 = '\x0'; msg_t send3 = '\x0'; _Bool mode3 = 0; _Bool alive3 = 0; void node1(); void node2(); void node3(); void (*nodes[3])() = { &node1, &node2, &node3 }; int init(); int check(); int main(); int __return_6326; int __return_6404; int __return_6465; int __return_6532; int __return_6719; int main() { int main__c1; int main__i2; main__c1 = 0; r1 = __VERIFIER_nondet_uchar(); id1 = __VERIFIER_nondet_char(); st1 = __VERIFIER_nondet_char(); send1 = __VERIFIER_nondet_char(); mode1 = __VERIFIER_nondet_bool(); alive1 = __VERIFIER_nondet_bool(); id2 = __VERIFIER_nondet_char(); st2 = __VERIFIER_nondet_char(); send2 = __VERIFIER_nondet_char(); mode2 = __VERIFIER_nondet_bool(); alive2 = __VERIFIER_nondet_bool(); id3 = __VERIFIER_nondet_char(); st3 = __VERIFIER_nondet_char(); send3 = __VERIFIER_nondet_char(); mode3 = __VERIFIER_nondet_bool(); alive3 = __VERIFIER_nondet_bool(); { int init__tmp; if (((int)r1) == 0) { if (((((int)alive1) + ((int)alive2)) + ((int)alive3)) >= 1) { if (((int)id1) >= 0) { if (((int)st1) == 0) { if (((int)send1) == ((int)id1)) { if (((int)mode1) == 0) { if (((int)id2) >= 0) { if (((int)st2) == 0) { if (((int)send2) == ((int)id2)) { if (((int)mode2) == 0) { if (((int)id3) >= 0) { if (((int)st3) == 0) { if (((int)send3) == ((int)id3)) { if (((int)mode3) == 0) { if (((int)id1) != ((int)id2)) { if (((int)id1) != ((int)id3)) { if (((int)id2) != ((int)id3)) { init__tmp = 1; __return_6326 = init__tmp; main__i2 = __return_6326; if (main__i2 != 0) { p1_old = nomsg; p1_new = nomsg; p2_old = nomsg; p2_new = nomsg; p3_old = nomsg; p3_new = nomsg; main__i2 = 0; { msg_t node1__m1; node1__m1 = nomsg; if (!(mode1 == 0)) { return __return_main; } else { if (!(alive1 == 0)) { int node1____CPAchecker_TMP_0; if (send1 != nomsg) { if (p1_new == nomsg) { node1____CPAchecker_TMP_0 = send1; label_6349:; p1_new = node1____CPAchecker_TMP_0; label_6351:; mode1 = 1; { msg_t node2__m2; node2__m2 = nomsg; if (!(mode2 == 0)) { return __return_main; } else { if (!(alive2 == 0)) { int node2____CPAchecker_TMP_0; if (send2 != nomsg) { if (p2_new == nomsg) { node2____CPAchecker_TMP_0 = send2; label_6366:; p2_new = node2____CPAchecker_TMP_0; label_6368:; mode2 = 1; { msg_t node3__m3; node3__m3 = nomsg; if (!(mode3 == 0)) { return __return_main; } else { if (!(alive3 == 0)) { int node3____CPAchecker_TMP_0; if (send3 != nomsg) { if (p3_new == nomsg) { node3____CPAchecker_TMP_0 = send3; label_6383:; p3_new = node3____CPAchecker_TMP_0; label_6385:; mode3 = 1; p1_old = p1_new; p1_new = nomsg; p2_old = p2_new; p2_new = nomsg; p3_old = p3_new; p3_new = nomsg; { int check__tmp; if (((((int)st1) + ((int)st2)) + ((int)st3)) <= 1) { if (((int)r1) < 3) { check__tmp = 1; __return_6404 = check__tmp; main__c1 = __return_6404; { _Bool __tmp_1; __tmp_1 = main__c1; _Bool assert__arg; assert__arg = __tmp_1; if (assert__arg == 0) { return __return_main; } else { { msg_t node1__m1; node1__m1 = nomsg; if (!(mode1 == 0)) { if (r1 == 255) { return __return_main; } else { r1 = r1 + 1; node1__m1 = p3_old; p3_old = nomsg; if (((int)node1__m1) != ((int)nomsg)) { if (!(alive1 == 0)) { if (((int)node1__m1) > ((int)id1)) { send1 = node1__m1; label_6670:; label_6422:; mode1 = 0; { msg_t node2__m2; node2__m2 = nomsg; if (!(mode2 == 0)) { node2__m2 = p1_old; p1_old = nomsg; if (((int)node2__m2) != ((int)nomsg)) { if (!(alive2 == 0)) { if (((int)node2__m2) > ((int)id2)) { send2 = node2__m2; label_6742:; label_6434:; mode2 = 0; { msg_t node3__m3; node3__m3 = nomsg; if (!(mode3 == 0)) { node3__m3 = p2_old; p2_old = nomsg; if (((int)node3__m3) != ((int)nomsg)) { if (!(alive3 == 0)) { if (((int)node3__m3) > ((int)id3)) { send3 = node3__m3; label_6712:; label_6446:; mode3 = 0; p1_old = p1_new; p1_new = nomsg; p2_old = p2_new; p2_new = nomsg; p3_old = p3_new; p3_new = nomsg; { int check__tmp; if (((((int)st1) + ((int)st2)) + ((int)st3)) <= 1) { if (((int)r1) < 3) { check__tmp = 1; __return_6465 = check__tmp; main__c1 = __return_6465; { _Bool __tmp_2; __tmp_2 = main__c1; _Bool assert__arg; assert__arg = __tmp_2; if (assert__arg == 0) { return __return_main; } else { { msg_t node1__m1; node1__m1 = nomsg; if (!(mode1 == 0)) { if (r1 == 255) { r1 = 2; label_6674:; r1 = r1 + 1; node1__m1 = p3_old; p3_old = nomsg; if (((int)node1__m1) != ((int)nomsg)) { if (!(alive1 == 0)) { if (((int)node1__m1) > ((int)id1)) { send1 = node1__m1; label_6689:; label_6679:; mode1 = 0; label_6681:; label_6490:; { msg_t node2__m2; node2__m2 = nomsg; if (!(mode2 == 0)) { node2__m2 = p1_old; p1_old = nomsg; if (((int)node2__m2) != ((int)nomsg)) { if (!(alive2 == 0)) { if (((int)node2__m2) > ((int)id2)) { send2 = node2__m2; label_6631:; label_6500:; mode2 = 0; label_6502:; { msg_t node3__m3; node3__m3 = nomsg; if (!(mode3 == 0)) { node3__m3 = p2_old; p2_old = nomsg; if (((int)node3__m3) != ((int)nomsg)) { if (!(alive3 == 0)) { if (((int)node3__m3) > ((int)id3)) { send3 = node3__m3; label_6603:; label_6514:; mode3 = 0; label_6516:; p1_old = p1_new; p1_new = nomsg; p2_old = p2_new; p2_new = nomsg; p3_old = p3_new; p3_new = nomsg; { int check__tmp; if (((((int)st1) + ((int)st2)) + ((int)st3)) <= 1) { if (((int)r1) < 3) { check__tmp = 1; label_6594:; label_6531:; __return_6532 = check__tmp; main__c1 = __return_6532; label_6533:; { _Bool __tmp_3; __tmp_3 = main__c1; _Bool assert__arg; assert__arg = __tmp_3; if (assert__arg == 0) { {reach_error();} return __return_main; } else { { msg_t node1__m1; node1__m1 = nomsg; if (!(mode1 == 0)) { if (r1 == 255) { r1 = 2; label_6549:; r1 = r1 + 1; node1__m1 = p3_old; p3_old = nomsg; if (((int)node1__m1) != ((int)nomsg)) { if (!(alive1 == 0)) { if (((int)node1__m1) > ((int)id1)) { send1 = node1__m1; label_6564:; label_6554:; mode1 = 0; label_6556:; goto label_6490; } else { if (((int)node1__m1) == ((int)id1)) { st1 = 1; goto label_6564; } else { goto label_6564; } } } else { send1 = node1__m1; goto label_6554; } } else { goto label_6554; } } else { goto label_6549; } } else { if (!(alive1 == 0)) { int node1____CPAchecker_TMP_0; if (send1 != nomsg) { if (p1_new == nomsg) { node1____CPAchecker_TMP_0 = send1; label_6574:; p1_new = node1____CPAchecker_TMP_0; label_6576:; mode1 = 1; goto label_6556; } else { label_6573:; node1____CPAchecker_TMP_0 = p1_new; goto label_6574; } } else { goto label_6573; } } else { if (((int)send1) != ((int)id1)) { int node1____CPAchecker_TMP_1; if (send1 != nomsg) { if (p1_new == nomsg) { node1____CPAchecker_TMP_1 = send1; label_6584:; p1_new = node1____CPAchecker_TMP_1; goto label_6576; } else { label_6583:; node1____CPAchecker_TMP_1 = p1_new; goto label_6584; } } else { goto label_6583; } } else { goto label_6576; } } } } } } } else { if (((((int)st1) + ((int)st2)) + ((int)st3)) == 1) { check__tmp = 1; goto label_6594; } else { check__tmp = 0; goto label_6594; } } } else { check__tmp = 0; goto label_6531; } } } else { if (((int)node3__m3) == ((int)id3)) { st3 = 1; goto label_6603; } else { goto label_6603; } } } else { send3 = node3__m3; goto label_6514; } } else { goto label_6514; } } else { if (!(alive3 == 0)) { int node3____CPAchecker_TMP_0; if (send3 != nomsg) { if (p3_new == nomsg) { node3____CPAchecker_TMP_0 = send3; label_6612:; p3_new = node3____CPAchecker_TMP_0; label_6614:; mode3 = 1; goto label_6516; } else { label_6611:; node3____CPAchecker_TMP_0 = p3_new; goto label_6612; } } else { goto label_6611; } } else { if (((int)send3) != ((int)id3)) { int node3____CPAchecker_TMP_1; if (send3 != nomsg) { if (p3_new == nomsg) { node3____CPAchecker_TMP_1 = send3; label_6622:; p3_new = node3____CPAchecker_TMP_1; goto label_6614; } else { label_6621:; node3____CPAchecker_TMP_1 = p3_new; goto label_6622; } } else { goto label_6621; } } else { goto label_6614; } } } } } else { if (((int)node2__m2) == ((int)id2)) { st2 = 1; goto label_6631; } else { goto label_6631; } } } else { send2 = node2__m2; goto label_6500; } } else { goto label_6500; } } else { if (!(alive2 == 0)) { int node2____CPAchecker_TMP_0; if (send2 != nomsg) { if (p2_new == nomsg) { node2____CPAchecker_TMP_0 = send2; label_6640:; p2_new = node2____CPAchecker_TMP_0; label_6642:; mode2 = 1; goto label_6502; } else { label_6639:; node2____CPAchecker_TMP_0 = p2_new; goto label_6640; } } else { goto label_6639; } } else { if (((int)send2) != ((int)id2)) { int node2____CPAchecker_TMP_1; if (send2 != nomsg) { if (p2_new == nomsg) { node2____CPAchecker_TMP_1 = send2; label_6650:; p2_new = node2____CPAchecker_TMP_1; goto label_6642; } else { label_6649:; node2____CPAchecker_TMP_1 = p2_new; goto label_6650; } } else { goto label_6649; } } else { goto label_6642; } } } } } else { if (((int)node1__m1) == ((int)id1)) { st1 = 1; goto label_6689; } else { goto label_6689; } } } else { send1 = node1__m1; goto label_6679; } } else { goto label_6679; } } else { goto label_6674; } } else { if (!(alive1 == 0)) { int node1____CPAchecker_TMP_0; if (send1 != nomsg) { if (p1_new == nomsg) { node1____CPAchecker_TMP_0 = send1; label_6484:; p1_new = node1____CPAchecker_TMP_0; label_6486:; mode1 = 1; goto label_6681; } else { label_6483:; node1____CPAchecker_TMP_0 = p1_new; goto label_6484; } } else { goto label_6483; } } else { if (((int)send1) != ((int)id1)) { int node1____CPAchecker_TMP_1; if (send1 != nomsg) { if (p1_new == nomsg) { node1____CPAchecker_TMP_1 = send1; label_6659:; p1_new = node1____CPAchecker_TMP_1; goto label_6486; } else { label_6658:; node1____CPAchecker_TMP_1 = p1_new; goto label_6659; } } else { goto label_6658; } } else { goto label_6486; } } } } } } } else { return __return_main; } } else { check__tmp = 0; __return_6719 = check__tmp; main__c1 = __return_6719; goto label_6533; } } } else { if (((int)node3__m3) == ((int)id3)) { st3 = 1; goto label_6712; } else { goto label_6712; } } } else { send3 = node3__m3; goto label_6446; } } else { goto label_6446; } } else { return __return_main; } } } else { if (((int)node2__m2) == ((int)id2)) { st2 = 1; goto label_6742; } else { goto label_6742; } } } else { send2 = node2__m2; goto label_6434; } } else { goto label_6434; } } else { return __return_main; } } } else { if (((int)node1__m1) == ((int)id1)) { st1 = 1; goto label_6670; } else { goto label_6670; } } } else { send1 = node1__m1; goto label_6422; } } else { goto label_6422; } } } else { return __return_main; } } } } } else { return __return_main; } } else { return __return_main; } } } else { return __return_main; } } else { node3____CPAchecker_TMP_0 = p3_new; goto label_6383; } } else { if (((int)send3) != ((int)id3)) { int node3____CPAchecker_TMP_1; if (send3 != nomsg) { if (p3_new == nomsg) { node3____CPAchecker_TMP_1 = send3; label_6701:; p3_new = node3____CPAchecker_TMP_1; goto label_6385; } else { return __return_main; } } else { node3____CPAchecker_TMP_1 = p3_new; goto label_6701; } } else { goto label_6385; } } } } } else { return __return_main; } } else { node2____CPAchecker_TMP_0 = p2_new; goto label_6366; } } else { if (((int)send2) != ((int)id2)) { int node2____CPAchecker_TMP_1; if (send2 != nomsg) { if (p2_new == nomsg) { node2____CPAchecker_TMP_1 = send2; label_6731:; p2_new = node2____CPAchecker_TMP_1; goto label_6368; } else { return __return_main; } } else { node2____CPAchecker_TMP_1 = p2_new; goto label_6731; } } else { goto label_6368; } } } } } else { return __return_main; } } else { node1____CPAchecker_TMP_0 = p1_new; goto label_6349; } } else { if (((int)send1) != ((int)id1)) { int node1____CPAchecker_TMP_1; if (send1 != nomsg) { if (p1_new == nomsg) { node1____CPAchecker_TMP_1 = send1; label_6751:; p1_new = node1____CPAchecker_TMP_1; goto label_6351; } else { return __return_main; } } else { node1____CPAchecker_TMP_1 = p1_new; goto label_6751; } } else { goto label_6351; } } } } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } else { return __return_main; } } }