Open ChenfengWei0 opened 1 year ago
#include <stdio.h>
int x;
int y;
void moveLeftUp()
{
--x;
++y;
}
void moveLeftDown()
{
--x;
--y;
}
void moveRightUp()
{
++x;
++y;
}
void moveRightDown()
{
++x;
--y;
}
int main()
{
x = 0;
y = 0;
while (nondet_int())
{
if (nondet_int())
{
moveLeftUp();
}
if (nondet_int())
{
moveLeftDown();
}
if (nondet_int())
{
moveRightUp();
}
if (nondet_int())
{
moveRightDown();
}
}
assert((x + y) % 2 == 0);
assert(!(x == 2 && y == 4)); // if comment this one not ok, otherwise ok
}
ok