  Storage systems based on Weak Consistency provide better availability and
lower latency than systems that use Strong Consistency, especially in
geo-replicated settings. However, under Weak Consistency, it is harder to
ensure the correctness of applications, as the execution of uncoordinated
operations may lead to invalid states.
  In this paper we show how to modify an application to make it run correctly
under Weak Consistency. We developed an analysis that detects which operations
need to be corrected, and proposes possible modifications to operations to
prevent inconsistencies. This analysis allows the programmer to choose the
preferred semantics for each problematic execution, while preserving the
original semantics of operations when no conflicts occur. The modified
application runs with small overhead when compared with its Weak Consistency
counterpart, which cannot preserve application correctness.
