Skip to content

Commit 1fd90bb

Browse files
committed
Experimenting with different adder implementations
The experiments were performed using the following example: ``` #ifndef SIZE #define SIZE 100 #endif #ifndef UNSAT int main() { int a[SIZE], b[SIZE]; for(int i=0; i < SIZE; ++i) __CPROVER_assert(a[i] + b[i] > a[i], ""); } #else #include <limits.h> int main() { int a[SIZE], b[SIZE]; for(int i=0; i < SIZE; ++i) { __CPROVER_assert( b[i] <= 0 || (a[i] >= (INT_MAX >> 28) || b[i] >= (INT_MAX >> 28)) || (a[i] <= (INT_MIN >> 1) || b[i] <= (INT_MIN >> 1)) || a[i] + b[i] > a[i], ""); } } #endif ``` See https://tinyurl.com/adder-comparison (https://docs.google.com/spreadsheets/d/1ckrIwxe5QVUu12rs3OaY3o7CQ-UqFnEWvcEOf8cw580/) for results.
1 parent 6df204e commit 1fd90bb

2 files changed

Lines changed: 524 additions & 2 deletions

File tree

0 commit comments

Comments
 (0)