Vote count:
0
Trying really hard to come-up with a better solution to state exactly once property in CBMC (C bounded model checkers).
For M = 4
for(i=0;i<M;i++){
__CPROVER_assume( (update[i][0]) ?
( !(update[i][1]) && !(update[i][2]) &&!(update[i][3]) ) :
((update[i][1]) ? (!(update[i][2]) && !(update[i][3]) ) :
((update[i][2]) ? !update[i][3] : update[i][3] )) ) ;
}`
For M bigger than that It's huge problem. Lets say M = 8 I have to do something like :
for(i=0;i<M;i++){
__CPROVER_assume( (update[i][0]) ? ( !(update[i][1]) && !(update[i][2]) && !(update[i][3]) && (update[i][4]) && !(update[i][5]) && !(update[i][6]) && !(update[i][7]) ) :
((update[i][1]) ? (!(update[i][2]) && !(update[i][3]) && !(update[i][4]) && !(update[i][5]) && !(update[i][6]) && !(update[i][7]) ) :
((update[i][2]) ? ((!update[i][3]) && !(update[i][4]) && !(update[i][5]) && !(update[i][6]) && !(update[i][7])) :
((update[i][3]) ? (!(update[i][4]) && !(update[i][5]) && !(update[i][6]) && !(update[i][7])) :
((update[i][4]) ? (!(update[i][5]) && !(update[i][6]) && !(update[i][7])) :
((update[i][5]) ? (!(update[i][6]) && !(update[i][7])) :
((update[i][6]) ? !(update[i][7]) : (update[i][7])))))))) ;
}
Checking the violation of exactly once is easy but stating the same looks hard. Have one more option to state the 2-Dimensional array problem into the 1 dimensional bitvector problem and then doing some smart Xor. But currently Not sure about that.
Can anybody have better solution for the problem Thanks in advance.
asked 28 secs ago
Better way to express exactly once in CBMC
Aucun commentaire:
Enregistrer un commentaire