The language is a very small subset of C, supporting the following constructions.

At the top level, we allow only declarations:

int x;
int y = 2 + 2;
int v,w,z;

We assume that variables without an explicit initializer are implicitly initialized to 0. Function declarations. Functions can return an integer (int) or no value (void). Functions also have a list of integer arguments:

int f(int x, int y)
{
  ...
}

void g()
{
  ...
}

Inside functions, we allow the following instructions:

For the division, our language follows the C standard: it performs rounding toward zero. For example: -10/3 = -3 (≈-3.333).

And the modulo is defined by $a % b := a - (a/b)$. For example: $(-10) % 3 = -1$ and $10 % (-3) = 1$ :::

Expressions can also call functions. For instance:

x = 2 + 5;
x = 2 * f(x, f(2 * x) - 1);

The syntax also supports the shortcuts x++, x--, x += ..., x *= ..., etc.

Note that supporting function calls (both returning a value and not) is not required as a core feature of your analyzer, but you can offer it as an extension.

if (x == 0) x++;
if (x > 0 && x < 100) { x = 2 * x; y--; } else { x = 0; y++; }

Note that the condition in the if must be a boolean expression. Boolean expressions are composed of

Note that, if (x), where x is an integer variable, is supported in C but not in our language. Similarly to Java, you must type if (x!=0).

while (a < 10) { a = a - 1; }
for (i = 0; i < 10; i++ ) x++;
for (;;);

The break instruction can be used to exit the innermost loop:

for (i = 0; i < 10; i++) {
  while (y < 10) {
    if (x > 10) break;
    x++; y++;
  }
  // the break jumps here
}
x = 0;
loop:
  x = x + 1;
  ...
  if (x > 10) goto exit;
  ...
  goto loop;
exit:
  x = 0;