slice - Pre-processing Source Code before slicing using Frama-c -


iam trying compare source code sliced code, frama-c normalizes code @ parsing time makes sliced code statements not identical source code statements.

is possible pre-processes code using frama-c when slice using criteria resulting sliced statements can compared pre-processed statements?

thanks.

is possible pre-processes code using frama-c …

yes!

use frama-c … -print -ocode prep.c pre-process. here example:

original:

static uint32_t func_1(void) {     int64_t l_9 = 0xa9d6923607a98815ll;     int32_t *l_10 = &g_11;     int32_t *l_12 = (void*)0;     int32_t **l_13 = (void*)0;     int32_t **l_14 = &l_12;     uint16_t l_15 = 0ul;     int16_t *l_16 = &g_17;     uint16_t l_25 = 0x7847l;     uint8_t *l_36 = &g_37;     uint32_t *l_335 = &g_92;     uint32_t *l_336[2];     uint8_t *l_522 = &g_523;     int i;     (i = 0; < 2; i++)         l_336[i] = (void*)0;     … 

normalized version obtained frama-c original.c -print -ocode prep.c:

static uint32_t func_1(void) {   uint32_t __retres;   int64_t l_9;   int32_t *l_10;   int32_t *l_12;   int32_t **l_13;   int32_t **l_14;   uint16_t l_15;   int16_t *l_16;   uint16_t l_25;   uint8_t *l_36;   uint32_t *l_335;   uint32_t *l_336[2];   uint8_t *l_522;   int i;   int32_t *tmp_11;   int16_t tmp_1;   int32_t *tmp_0;   int16_t tmp;   uint8_t tmp_10;   uint8_t tmp_9;   int tmp_8;   uint8_t tmp_7;   int32_t *tmp_6;   int64_t tmp_5;   int tmp_4;   uint32_t tmp_3;   uint32_t tmp_2;   l_9 = (long long)0xa9d6923607a98815ll;   l_10 = & g_11;   l_12 = (int32_t *)((void *)0);   l_13 = (int32_t **)((void *)0);   l_14 = & l_12;   l_15 = (unsigned short)0ul;   l_16 = & g_17;   l_25 = (unsigned short)0x7847l;   l_36 = & g_37;   l_335 = & g_92;   l_522 = & g_523;   = 0;   while (i < 2) {     l_336[i] = (uint32_t *)((void *)0);     ++;   }   … 

the differences caused frama-c transformation applied program easier read comparing result prep.c.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -