@@ -353,70 +353,63 @@ public static void addObjectAttribute (Object o, int val) {}
353
353
* note that the JPF does not execute the following getBitFlip methods, but execute their native methods
354
354
*/
355
355
public static long getBitFlip (long v , int nBit , int len ) {
356
- assert (nBit <= len );
357
- int last = -1 ;
358
- for (int i = 0 ; i < nBit ; ++i ) {
359
- int p = getInt (last +1 , len -nBit +i );
360
- v ^= (1l << p );
361
- last = p ;
362
- }
363
- return v ;
356
+ return 0l ;
364
357
}
365
358
366
359
/**
367
360
* flip nBit bits of a long variable
368
361
*/
369
362
public static long getBitFlip (long v , int nBit ) {
370
- return getBitFlip ( v , nBit , 64 ) ;
363
+ return 0l ;
371
364
}
372
365
373
366
/**
374
367
* flip nBit bits of an int variable
375
368
*/
376
369
public static int getBitFlip (int v , int nBit ) {
377
- return ( int ) getBitFlip (( long ) v , nBit , 32 ) ;
370
+ return 0 ;
378
371
}
379
372
380
373
/**
381
374
* flip nBit bits of a short variable
382
375
*/
383
376
public static short getBitFlip (short v , int nBit ) {
384
- return (short ) getBitFlip (( long ) v , nBit , 16 ) ;
377
+ return (short ) 0 ;
385
378
}
386
379
387
380
/**
388
381
* flip nBit bits of a char variable
389
382
*/
390
383
public static char getBitFlip (char v , int nBit ) {
391
- return ( char ) getBitFlip (( long ) v , nBit , 16 ) ;
384
+ return 0 ;
392
385
}
393
386
394
387
/**
395
388
* flip nBit bits of a byte variable
396
389
*/
397
390
public static byte getBitFlip (byte v , int nBit ) {
398
- return ( byte ) getBitFlip (( long ) v , nBit , 8 ) ;
391
+ return 0 ;
399
392
}
400
393
401
394
/**
402
395
* flip nBit bits of a double variable
403
396
*/
404
397
public static double getBitFlip (double v , int nBit ) {
405
- return Double . longBitsToDouble ( getBitFlip ( Double . doubleToLongBits ( v ), nBit )) ;
398
+ return 0.0 ;
406
399
}
407
400
408
401
/**
409
402
* flip nBit bits of a float variable
410
403
*/
411
404
public static float getBitFlip (float v , int nBit ) {
412
- return Float . intBitsToFloat ( getBitFlip ( Float . floatToIntBits ( v ), nBit )) ;
405
+ return 0.0f ;
413
406
}
414
407
415
408
/**
416
409
* flip a boolean variable
417
410
*/
418
411
public static boolean getBitFlip (boolean v ) {
419
- return ! v ;
412
+ return true ;
420
413
}
421
414
422
415
/**
0 commit comments