The expression 'not (8 > 0 or 42 > 0)' is compiled incorrectly by the GDSL compiler. Consider the following GDSL program:
export test_right : (int) -> |1|
export test_wrong : (int) -> |1|
val test_right x = not (8 > 0)
val test_wrong x = not (8 > 0 or 42 > 0)
The code is compiled into the C code shown below:
...
/* test_right */
static int_t test_right(state_t s,int_t x) {
return vec_not(s,gen_vec(1, 0<8)).data;
}
/* test_wrong */
static int_t test_wrong(state_t s,int_t x) {
return vec_not(s,gen_vec(0, (0<8) | (0<42))).data;
}
...
Here, the size of the vector is 1 in case of the test_right function, but 0 in case of test_wrong function. The size of the vector should be 1 in both cases.