34 for (
unsigned char i = 0; i < size; ++i)
36#define opcode program[i].opcode
38 const unsigned int op0_id=program[i].
op0;
39 const unsigned int op1_id=program[i].
op1;
40 const unsigned int op2_id=program[i].
op2;
42 __CPROVER_assume(op0_id < max_op_index && op1_id < max_op_index && op2_id < max_op_index
44 && (
opcode > 5u || op0_id <= op1_id) && (
opcode < 21u || !op1_id)
45 && (
opcode == 9u || !op2_id)
46 && (
opcode != 9u || op0_id != op2_id || op1_id <= op2_id));
51 const unsigned int op0=*op0_ptr;
52 const unsigned int op1=*op1_ptr;
54 const unsigned int op2=*op2_ptr;
55#define sop0 ((int) op0)
56#define sop1 ((int) op1)
57#define sop2 ((int) op2)
64 __CPROVER_cegis_opcode_0: result=op0 + op1;
66 __CPROVER_cegis_opcode_1: result=op0 * op1;
68 __CPROVER_cegis_opcode_2: result=op0 &op1;
72 __CPROVER_cegis_opcode_3: result=op0 | op1;
74 __CPROVER_cegis_opcode_4: result=op0 ^ op1;
76 __CPROVER_cegis_opcode_5: result=op0 != op1;
78 __CPROVER_cegis_opcode_6: result=!op0 || op1;
84 __CPROVER_cegis_opcode_first_7: result=op0 < op1;
85 if (result) result=op0;
86 else __CPROVER_cegis_opcode_last_7: result=op1;
90 __CPROVER_cegis_opcode_first_8: result=op0 > op1;
91 if (result) result=op0;
92 else __CPROVER_cegis_opcode_last_8: result=op1;
96 __CPROVER_cegis_opcode_first_9:
if (op0) result=op1;
97 else __CPROVER_cegis_opcode_last_9: result=op2;
100 __CPROVER_cegis_opcode_10: result=op0 - op1;
105 __CPROVER_cegis_opcode_first_11: result=op1;
108 __CPROVER_cegis_opcode_last_11: result=op0 << result;
112 __CPROVER_cegis_opcode_first_12: result=op1;
115 __CPROVER_cegis_opcode_last_12: result=op0 >> result;
119 __CPROVER_cegis_opcode_first_13: result=op1;
122 __CPROVER_cegis_opcode_last_13: result=op0 >> result;
126 __CPROVER_cegis_opcode_first_14: result=op1;
129 __CPROVER_cegis_opcode_last_14: result=
sop0 >> result;
134 __CPROVER_cegis_opcode_15: result=op0 <= op1;
136 __CPROVER_cegis_opcode_16: result=op0 < op1;
138 __CPROVER_cegis_opcode_17: result=
sop0 <=
sop1;
140 __CPROVER_cegis_opcode_18: result=
sop0 <
sop1;
144 __CPROVER_cegis_opcode_19: result=op0 / op1;
146 __CPROVER_cegis_opcode_20: result=op0 % op1;
148 __CPROVER_cegis_opcode_21: result=-op0;
150 __CPROVER_cegis_opcode_22: result=~op0;
153 __CPROVER_cegis_opcode_23: result=
sop0 == -1;
155 __CPROVER_cegis_opcode_24: result=op0;