run tabbing pass
authorBrian Demsky <bdemsky@uci.edu>
Wed, 19 Jun 2019 21:13:40 +0000 (14:13 -0700)
committerBrian Demsky <bdemsky@uci.edu>
Wed, 19 Jun 2019 21:13:40 +0000 (14:13 -0700)
action.cc
action.h
cmodelint.cc
cyclegraph.cc
execution.cc
hashtable.h
model.cc
sleeps.cc

index 6a09bec..9a816de 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -31,8 +31,8 @@
  * @param thread (optional) The Thread in which this action occurred. If NULL
  * (default), then a Thread is assigned according to the scheduler.
  */
-ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, 
-               uint64_t value, Thread *thread) :
+ModelAction::ModelAction(action_type_t type, memory_order order, void *loc,
+                                                                                                uint64_t value, Thread *thread) :
        location(loc),
        position(NULL),
        reads_from(NULL),
@@ -66,7 +66,7 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc,
  * (default), then a Thread is assigned according to the scheduler.
  */
 ModelAction::ModelAction(action_type_t type, memory_order order, void *loc,
-               uint64_t value, int size) :
+                                                                                                uint64_t value, int size) :
        location(loc),
        position(NULL),
        reads_from(NULL),
@@ -100,8 +100,8 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc,
  * @param thread (optional) The Thread in which this action occurred. If NULL
  * (default), then a Thread is assigned according to the scheduler.
  */
-ModelAction::ModelAction(action_type_t type, const char * position, memory_order order, 
-               void *loc, uint64_t value, Thread *thread) :
+ModelAction::ModelAction(action_type_t type, const char * position, memory_order order,
+                                                                                                void *loc, uint64_t value, Thread *thread) :
        location(loc),
        position(position),
        reads_from(NULL),
index 1797e61..5f7d25c 100644 (file)
--- a/action.h
+++ b/action.h
@@ -70,7 +70,7 @@ typedef enum action_type {
        ATOMIC_NOTIFY_ALL,      // < A notify all action
        ATOMIC_WAIT,    // < A wait action
        ATOMIC_ANNOTATION,      // < An annotation action to pass information to a trace analysis
-       NOOP            // no operation, which returns control to scheduler
+       NOOP    // no operation, which returns control to scheduler
 } action_type_t;
 
 
index 17bd003..9e4923b 100644 (file)
@@ -39,7 +39,7 @@ uint64_t model_rmwr_action(void *obj, memory_order ord) {
  * of the RMW action w/o a write.
  */
 uint64_t model_rmwrcas_action(void *obj, memory_order ord, uint64_t oldval, int size) {
-       return model->switch_to_master(new ModelAction(ATOMIC_RMWRCAS, ord, obj, oldval, size));
+       return model->switch_to_master(new ModelAction(ATOMIC_RMWRCAS, ord, obj, oldval, size));
 }
 
 
@@ -62,263 +62,263 @@ void model_fence_action(memory_order ord) {
 uint64_t model_rmwrcas_action_helper(void *obj, int atomic_index, const char *position) {
        return model->switch_to_master(
                new ModelAction(ATOMIC_RMWRCAS, position, orders[atomic_index], obj)
-       );
+               );
 }
 
 uint64_t model_rmwr_action_helper(void *obj, int atomic_index, const char *position) {
        return model->switch_to_master(
                new ModelAction(ATOMIC_RMWR, position, orders[atomic_index], obj)
-       );
+               );
 }
 
 void model_rmw_action_helper(void *obj, uint64_t val, int atomic_index, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_RMW, position, orders[atomic_index], obj, val)
-       );
+               );
 }
 
 void model_rmwc_action_helper(void *obj, int atomic_index, const char *position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_RMWC, position, orders[atomic_index], obj)
-       );
+               );
 }
 
 // cds atomic inits
 void cds_atomic_init8(void * obj, uint8_t val, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_INIT, position, memory_order_relaxed, obj, (uint64_t) val)
-       );
+               );
 }
 void cds_atomic_init16(void * obj, uint16_t val, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_INIT, position, memory_order_relaxed, obj, (uint64_t) val)
-       );
+               );
 }
 void cds_atomic_init32(void * obj, uint32_t val, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_INIT, position, memory_order_relaxed, obj, (uint64_t) val)
-       );
+               );
 }
 void cds_atomic_init64(void * obj, uint64_t val, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_INIT, position, memory_order_relaxed, obj, val)
-       );
+               );
 }
 
 
 // cds atomic loads
-uint8_t cds_atomic_load8(void * obj, int atomic_index, const char * position) {        
+uint8_t cds_atomic_load8(void * obj, int atomic_index, const char * position) {
        return (uint8_t) ( model->switch_to_master(
-               new ModelAction(ATOMIC_READ, position, orders[atomic_index], obj))
-       );
+                                                                                        new ModelAction(ATOMIC_READ, position, orders[atomic_index], obj))
+                                                                                );
 }
 uint16_t cds_atomic_load16(void * obj, int atomic_index, const char * position) {
        return (uint16_t) ( model->switch_to_master(
-               new ModelAction(ATOMIC_READ, position, orders[atomic_index], obj))
-       );
+                                                                                               new ModelAction(ATOMIC_READ, position, orders[atomic_index], obj))
+                                                                                       );
 }
 uint32_t cds_atomic_load32(void * obj, int atomic_index, const char * position) {
        return (uint32_t) ( model->switch_to_master(
-               new ModelAction(ATOMIC_READ, position, orders[atomic_index], obj))
-       );
+                                                                                               new ModelAction(ATOMIC_READ, position, orders[atomic_index], obj))
+                                                                                       );
 }
 uint64_t cds_atomic_load64(void * obj, int atomic_index, const char * position) {
        return model->switch_to_master(
                new ModelAction(ATOMIC_READ, position, orders[atomic_index], obj)
-       );
+               );
 }
 
 // cds atomic stores
 void cds_atomic_store8(void * obj, uint8_t val, int atomic_index, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_WRITE, position, orders[atomic_index], obj, (uint64_t) val)
-       );
+               );
 }
 void cds_atomic_store16(void * obj, uint16_t val, int atomic_index, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_WRITE, position, orders[atomic_index], obj, (uint64_t) val)
-       );
+               );
 }
 void cds_atomic_store32(void * obj, uint32_t val, int atomic_index, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_WRITE, position, orders[atomic_index], obj, (uint64_t) val)
-       );
+               );
 }
 void cds_atomic_store64(void * obj, uint64_t val, int atomic_index, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_WRITE, position, orders[atomic_index], obj, val)
-       );
+               );
 }
 
 #define _ATOMIC_RMW_(__op__, size, addr, val, atomic_index, position)            \
-({                                                                      \
-  uint##size##_t _old = model_rmwr_action_helper(addr, atomic_index, position);   \
-  uint##size##_t _copy = _old;                                          \
-  uint##size##_t _val = val;                                            \
-  _copy __op__ _val;                                                    \
-  model_rmw_action_helper(addr, (uint64_t) _copy, atomic_index, position);        \
-  return _old;                                                          \
-})
+       ({                                                                      \
+               uint ## size ## _t _old = model_rmwr_action_helper(addr, atomic_index, position);   \
+               uint ## size ## _t _copy = _old;                                          \
+               uint ## size ## _t _val = val;                                            \
+               _copy __op__ _val;                                                    \
+               model_rmw_action_helper(addr, (uint64_t) _copy, atomic_index, position);        \
+               return _old;                                                          \
+       })
 
 // cds atomic exchange
 uint8_t cds_atomic_exchange8(void* addr, uint8_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( = , 8, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( =, 8, addr, val, atomic_index, position);
 }
 uint16_t cds_atomic_exchange16(void* addr, uint16_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( = , 16, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( =, 16, addr, val, atomic_index, position);
 }
 uint32_t cds_atomic_exchange32(void* addr, uint32_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( = , 32, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( =, 32, addr, val, atomic_index, position);
 }
 uint64_t cds_atomic_exchange64(void* addr, uint64_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( = , 64, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( =, 64, addr, val, atomic_index, position);
 }
 
 // cds atomic fetch add
 uint8_t cds_atomic_fetch_add8(void* addr, uint8_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( += , 8, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( +=, 8, addr, val, atomic_index, position);
 }
 uint16_t cds_atomic_fetch_add16(void* addr, uint16_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( += , 16, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( +=, 16, addr, val, atomic_index, position);
 }
 uint32_t cds_atomic_fetch_add32(void* addr, uint32_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( += , 32, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( +=, 32, addr, val, atomic_index, position);
 }
 uint64_t cds_atomic_fetch_add64(void* addr, uint64_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( += , 64, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( +=, 64, addr, val, atomic_index, position);
 }
 
 // cds atomic fetch sub
 uint8_t cds_atomic_fetch_sub8(void* addr, uint8_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( -= , 8, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( -=, 8, addr, val, atomic_index, position);
 }
 uint16_t cds_atomic_fetch_sub16(void* addr, uint16_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( -= , 16, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( -=, 16, addr, val, atomic_index, position);
 }
 uint32_t cds_atomic_fetch_sub32(void* addr, uint32_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( -= , 32, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( -=, 32, addr, val, atomic_index, position);
 }
 uint64_t cds_atomic_fetch_sub64(void* addr, uint64_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( -= , 64, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( -=, 64, addr, val, atomic_index, position);
 }
 
 // cds atomic fetch and
 uint8_t cds_atomic_fetch_and8(void* addr, uint8_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( &= , 8, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( &=, 8, addr, val, atomic_index, position);
 }
 uint16_t cds_atomic_fetch_and16(void* addr, uint16_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( &= , 16, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( &=, 16, addr, val, atomic_index, position);
 }
 uint32_t cds_atomic_fetch_and32(void* addr, uint32_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( &= , 32, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( &=, 32, addr, val, atomic_index, position);
 }
 uint64_t cds_atomic_fetch_and64(void* addr, uint64_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( &= , 64, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( &=, 64, addr, val, atomic_index, position);
 }
 
 // cds atomic fetch or
 uint8_t cds_atomic_fetch_or8(void* addr, uint8_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( |= , 8, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( |=, 8, addr, val, atomic_index, position);
 }
 uint16_t cds_atomic_fetch_or16(void* addr, uint16_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( |= , 16, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( |=, 16, addr, val, atomic_index, position);
 }
 uint32_t cds_atomic_fetch_or32(void* addr, uint32_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( |= , 32, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( |=, 32, addr, val, atomic_index, position);
 }
 uint64_t cds_atomic_fetch_or64(void* addr, uint64_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( |= , 64, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( |=, 64, addr, val, atomic_index, position);
 }
 
 // cds atomic fetch xor
 uint8_t cds_atomic_fetch_xor8(void* addr, uint8_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( ^= , 8, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( ^=, 8, addr, val, atomic_index, position);
 }
 uint16_t cds_atomic_fetch_xor16(void* addr, uint16_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( ^= , 16, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( ^=, 16, addr, val, atomic_index, position);
 }
 uint32_t cds_atomic_fetch_xor32(void* addr, uint32_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( ^= , 32, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( ^=, 32, addr, val, atomic_index, position);
 }
 uint64_t cds_atomic_fetch_xor64(void* addr, uint64_t val, int atomic_index, const char * position) {
-       _ATOMIC_RMW_( ^= , 64, addr, val, atomic_index, position);
+       _ATOMIC_RMW_( ^=, 64, addr, val, atomic_index, position);
 }
 
 // cds atomic compare and exchange
-// In order to accomodate the LLVM PASS, the return values are not true or false. 
+// In order to accomodate the LLVM PASS, the return values are not true or false.
 
 #define _ATOMIC_CMPSWP_WEAK_ _ATOMIC_CMPSWP_
 #define _ATOMIC_CMPSWP_(size, addr, expected, desired, atomic_index, position)                            \
-({                                                                                              \
-  uint##size##_t _desired = desired;                                                            \
-  uint##size##_t _expected = expected;                                                          \
-  uint##size##_t _old = model_rmwrcas_action_helper(addr, atomic_index, position);                           \
-  if (_old == _expected) {                                                                    \
-    model_rmw_action_helper(addr, (uint64_t) _desired, atomic_index, position); return _expected; }      \
-  else {                                                                                        \
-    model_rmwc_action_helper(addr, atomic_index, position); _expected = _old; return _old; }              \
-})
+       ({                                                                                              \
+               uint ## size ## _t _desired = desired;                                                            \
+               uint ## size ## _t _expected = expected;                                                          \
+               uint ## size ## _t _old = model_rmwrcas_action_helper(addr, atomic_index, position);                           \
+               if (_old == _expected) {                                                                    \
+                       model_rmw_action_helper(addr, (uint64_t) _desired, atomic_index, position); return _expected; }      \
+               else {                                                                                        \
+                       model_rmwc_action_helper(addr, atomic_index, position); _expected = _old; return _old; }              \
+       })
 
 // atomic_compare_exchange version 1: the CmpOperand (corresponds to expected)
-// extracted from LLVM IR is an integer type. 
+// extracted from LLVM IR is an integer type.
 
-uint8_t cds_atomic_compare_exchange8_v1(void* addr, uint8_t expected, uint8_t desired, 
-                       int atomic_index_succ, int atomic_index_fail, const char *position )
+uint8_t cds_atomic_compare_exchange8_v1(void* addr, uint8_t expected, uint8_t desired,
+                                                                                                                                                               int atomic_index_succ, int atomic_index_fail, const char *position )
 {
-       _ATOMIC_CMPSWP_(8, addr, expected, desired, 
-                               atomic_index_succ, position);
+       _ATOMIC_CMPSWP_(8, addr, expected, desired,
+                                                                       atomic_index_succ, position);
 }
-uint16_t cds_atomic_compare_exchange16_v1(void* addr, uint16_t expected, uint16_t desired, 
-                       int atomic_index_succ, int atomic_index_fail, const char *position)
+uint16_t cds_atomic_compare_exchange16_v1(void* addr, uint16_t expected, uint16_t desired,
+                                                                                                                                                                       int atomic_index_succ, int atomic_index_fail, const char *position)
 {
-       _ATOMIC_CMPSWP_(16, addr, expected, desired, 
-                               atomic_index_succ, position);
+       _ATOMIC_CMPSWP_(16, addr, expected, desired,
+                                                                       atomic_index_succ, position);
 }
-uint32_t cds_atomic_compare_exchange32_v1(void* addr, uint32_t expected, uint32_t desired, 
-                       int atomic_index_succ, int atomic_index_fail, const char *position)
+uint32_t cds_atomic_compare_exchange32_v1(void* addr, uint32_t expected, uint32_t desired,
+                                                                                                                                                                       int atomic_index_succ, int atomic_index_fail, const char *position)
 {
-       _ATOMIC_CMPSWP_(32, addr, expected, desired, 
-                               atomic_index_succ, position);
+       _ATOMIC_CMPSWP_(32, addr, expected, desired,
+                                                                       atomic_index_succ, position);
 }
-uint64_t cds_atomic_compare_exchange64_v1(void* addr, uint64_t expected, uint64_t desired, 
-                       int atomic_index_succ, int atomic_index_fail, const char *position)
+uint64_t cds_atomic_compare_exchange64_v1(void* addr, uint64_t expected, uint64_t desired,
+                                                                                                                                                                       int atomic_index_succ, int atomic_index_fail, const char *position)
 {
-       _ATOMIC_CMPSWP_(64, addr, expected, desired, 
-                               atomic_index_succ, position);
+       _ATOMIC_CMPSWP_(64, addr, expected, desired,
+                                                                       atomic_index_succ, position);
 }
 
 // atomic_compare_exchange version 2
-bool cds_atomic_compare_exchange8_v2(void* addr, uint8_t* expected, uint8_t desired, 
-               int atomic_index_succ, int atomic_index_fail, const char *position )
+bool cds_atomic_compare_exchange8_v2(void* addr, uint8_t* expected, uint8_t desired,
+                                                                                                                                                int atomic_index_succ, int atomic_index_fail, const char *position )
 {
        uint8_t ret = cds_atomic_compare_exchange8_v1(addr, *expected,
-                       desired, atomic_index_succ, atomic_index_fail, position);
+                                                                                                                                                                                               desired, atomic_index_succ, atomic_index_fail, position);
        if (ret == *expected) return true;
-       else return false; 
+       else return false;
 }
-bool cds_atomic_compare_exchange16_v2(void* addr, uint16_t* expected, uint16_t desired, 
-               int atomic_index_succ, int atomic_index_fail, const char *position)
+bool cds_atomic_compare_exchange16_v2(void* addr, uint16_t* expected, uint16_t desired,
+                                                                                                                                                       int atomic_index_succ, int atomic_index_fail, const char *position)
 {
        uint16_t ret = cds_atomic_compare_exchange16_v1(addr, *expected,
-                       desired, atomic_index_succ, atomic_index_fail, position);
+                                                                                                                                                                                                       desired, atomic_index_succ, atomic_index_fail, position);
        if (ret == *expected) return true;
-       else return false; 
+       else return false;
 }
-bool cds_atomic_compare_exchange32_v2(void* addr, uint32_t* expected, uint32_t desired, 
-               int atomic_index_succ, int atomic_index_fail, const char *position)
+bool cds_atomic_compare_exchange32_v2(void* addr, uint32_t* expected, uint32_t desired,
+                                                                                                                                                       int atomic_index_succ, int atomic_index_fail, const char *position)
 {
        uint32_t ret = cds_atomic_compare_exchange32_v1(addr, *expected,
-                       desired, atomic_index_succ, atomic_index_fail, position);
+                                                                                                                                                                                                       desired, atomic_index_succ, atomic_index_fail, position);
        if (ret == *expected) return true;
-       else return false; 
+       else return false;
 }
-bool cds_atomic_compare_exchange64_v2(void* addr, uint64_t* expected, uint64_t desired, 
-               int atomic_index_succ, int atomic_index_fail, const char *position)
+bool cds_atomic_compare_exchange64_v2(void* addr, uint64_t* expected, uint64_t desired,
+                                                                                                                                                       int atomic_index_succ, int atomic_index_fail, const char *position)
 {
        uint64_t ret = cds_atomic_compare_exchange64_v1(addr, *expected,
-                       desired, atomic_index_succ, atomic_index_fail, position);
+                                                                                                                                                                                                       desired, atomic_index_succ, atomic_index_fail, position);
        if (ret == *expected) return true;
-       else return false; 
+       else return false;
 }
 
 
@@ -327,11 +327,11 @@ bool cds_atomic_compare_exchange64_v2(void* addr, uint64_t* expected, uint64_t d
 void cds_atomic_thread_fence(int atomic_index, const char * position) {
        model->switch_to_master(
                new ModelAction(ATOMIC_FENCE, position, orders[atomic_index], FENCE_LOCATION)
-       );
+               );
 }
 
 /*
-#define _ATOMIC_CMPSWP_( __a__, __e__, __m__, __x__ )                         \
+ #define _ATOMIC_CMPSWP_( __a__, __e__, __m__, __x__ )                         \
         ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__);   \
                 __typeof__(__e__) __q__ = (__e__);                            \
                 __typeof__(__m__) __v__ = (__m__);                            \
@@ -342,13 +342,13 @@ void cds_atomic_thread_fence(int atomic_index, const char * position) {
                 else {  model_rmwc_action((void *)__p__, __x__); *__q__ = __t__;  __r__ = false;} \
                 __r__; })
 
-#define _ATOMIC_FENCE_( __x__ ) \
+ #define _ATOMIC_FENCE_( __x__ ) \
         ({ model_fence_action(__x__);})
-*/
+ */
 
 /*
 
-#define _ATOMIC_MODIFY_( __a__, __o__, __m__, __x__ )                         \
+ #define _ATOMIC_MODIFY_( __a__, __o__, __m__, __x__ )                         \
         ({ volatile __typeof__((__a__)->__f__)* __p__ = & ((__a__)->__f__);   \
         __typeof__((__a__)->__f__) __old__=(__typeof__((__a__)->__f__)) model_rmwr_action((void *)__p__, __x__); \
         __typeof__(__m__) __v__ = (__m__);                                    \
@@ -356,5 +356,5 @@ void cds_atomic_thread_fence(int atomic_index, const char * position) {
         __copy__ __o__ __v__;                                                 \
         model_rmw_action((void *)__p__, __x__, (uint64_t) __copy__);          \
         __old__ = __old__;  Silence clang (-Wunused-value)                    \
-         })                           
-*/
+         })
+ */
index 5d894f8..47951d4 100644 (file)
@@ -133,7 +133,7 @@ void CycleGraph::addRMWEdge(const ModelAction *from, const ModelAction *rmw)
                }
        }
        fromnode->edges.clear();
-       
+
        addNodeEdge(fromnode, rmwnode, true);
 }
 
index 4a351a9..99f8619 100644 (file)
@@ -64,7 +64,7 @@ ModelExecution::ModelExecution(ModelChecker *m, Scheduler *scheduler, NodeStack
        thrd_last_fence_release(),
        node_stack(node_stack),
        priv(new struct model_snapshot_members ()),
-                        mo_graph(new CycleGraph()),
+       mo_graph(new CycleGraph()),
        fuzzer(new Fuzzer())
 {
        /* Initialize a model-checker thread, for special ModelActions */
@@ -1106,7 +1106,7 @@ bool ModelExecution::release_seq_heads(const ModelAction *rf, rel_heads_list_t *
  * @see ModelExecution::release_seq_heads
  */
 void ModelExecution::get_release_seq_heads(ModelAction *acquire,
-                ModelAction *read, rel_heads_list_t *release_heads)
+                                                                                                                                                                        ModelAction *read, rel_heads_list_t *release_heads)
 {
        const ModelAction *rf = read->get_reads_from();
 
index 019bee7..a16a24c 100644 (file)
@@ -43,7 +43,7 @@ struct hashlistnode {
  * @tparam _free   Provide your own 'free' for the table, or default to
  *                 snapshotting.
  */
-template<typename _Key, typename _Val, typename _KeyInt, int _Shift = 0, void * (* _malloc)(size_t) = snapshot_malloc, void * (* _calloc)(size_t, size_t) = snapshot_calloc, void (*_free)(void *) = snapshot_free>
+template<typename _Key, typename _Val, typename _KeyInt, int _Shift = 0, void * (*_malloc)(size_t) = snapshot_malloc, void * (*_calloc)(size_t, size_t) = snapshot_calloc, void (*_free)(void *) = snapshot_free>
 class HashTable {
 public:
        /**
index 84a60a5..6dce368 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -151,7 +151,7 @@ void ModelChecker::print_bugs() const
                                                        bugs->size(),
                                                        bugs->size() > 1 ? "s" : "");
        for (unsigned int i = 0;i < bugs->size();i++)
-               (*bugs)[i]->print();
+               (*bugs)[i] -> print();
 }
 
 /**
@@ -162,15 +162,15 @@ void ModelChecker::print_bugs() const
  */
 void ModelChecker::record_stats()
 {
-       stats.num_total++;
+       stats.num_total ++;
        if (!execution->isfeasibleprefix())
-               stats.num_infeasible++;
+               stats.num_infeasible ++;
        else if (execution->have_bug_reports())
-               stats.num_buggy_executions++;
+               stats.num_buggy_executions ++;
        else if (execution->is_complete_execution())
-               stats.num_complete++;
+               stats.num_complete ++;
        else {
-               stats.num_redundant++;
+               stats.num_redundant ++;
 
                /**
                 * @todo We can violate this ASSERT() when fairness/sleep sets
@@ -251,7 +251,7 @@ bool ModelChecker::next_execution()
                return true;
        }
 // test code
-       execution_number++;
+       execution_number ++;
        reset_to_initial_state();
        node_stack->full_reset();
        return false;
@@ -259,8 +259,8 @@ bool ModelChecker::next_execution()
 
 /** @brief Run trace analyses on complete trace */
 void ModelChecker::run_trace_analyses() {
-       for (unsigned int i = 0;i < trace_analyses.size();i++)
-               trace_analyses[i]->analyze(execution->get_action_trace());
+       for (unsigned int i = 0;i < trace_analyses.size();i ++)
+               trace_analyses[i] -> analyze(execution->get_action_trace());
 }
 
 /**
@@ -366,7 +366,7 @@ void ModelChecker::run()
        char random_state[256];
        initstate(423121, random_state, sizeof(random_state));
 
-       for(int exec = 0;exec < params.maxexecutions;exec++) {
+       for(int exec = 0;exec < params.maxexecutions;exec ++) {
                thrd_t user_thread;
                Thread *t = new Thread(execution->get_next_id(), &user_thread, &user_main_wrapper, NULL, NULL); // L: user_main_wrapper passes the user program
                execution->add_thread(t);
index 0528374..24e0eea 100644 (file)
--- a/sleeps.cc
+++ b/sleeps.cc
@@ -8,7 +8,7 @@ unsigned int __sleep (unsigned int seconds)
 {
        model->switch_to_master(
                new ModelAction(NOOP, std::memory_order_seq_cst, NULL)
-       );
+               );
        return 0;
 }
 
@@ -21,6 +21,6 @@ int usleep (useconds_t useconds)
 {
        model->switch_to_master(
                new ModelAction(NOOP, std::memory_order_seq_cst, NULL)
-       );
+               );
        return 0;
 }