E[<      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  Safe Grow-only setupdateinitialization lookup querySafe ,Construct new valueNoneK ,ProcessSim inside Lamport clock simpulation."Lamport clock simpulation. Key is (. Non-present value is equivalent to 0.Unique process identifier      None7<FT,:Operation-based, or commutative (Cm) replicated data type.Implementation;In Haskell, a CmRDT implementation consists of 3 types  a payload, an  operation (op ) and an intent. PayloadInternal state of a replica.IntentUser's request to update.Operation (Op)*Operation to be applied to other replicas.For many types  operation and intent may be the same. But for i, for instance, this rule doesn't hold: user can request only value, and type attaches a timestamp to it.)Additional constraint  commutativity law(Concurrent updates are observed equally.  " op1 op2 . 3 op1 op2 ==> 0 op1 . 0 op2 == 0 op2 . 0 op1 !Idempotency doesn't need to hold./4Generate an update to the local and remote replicas.Returns - if the intended operation is not applicable.0PApply an update to the payload (downstream). An invalid update must be ignored.hTODO(Syrovetsky, 2017-12-05) There is no downstream precondition yet. We must make a test for it first.1lPartial order for causal semantics. Values of some type may be ordered and causally-ordered different ways.2x 2 y means that x must go before y and y can not go before x.3*Not comparable, i. e. (a "d b) "' (b "d a).,.-0/123 12,-.//03,-.//012NoneFT] 456456456NoneFT ;<;<;<None ;=>?FT]"FD*Empty order, allowing arbitrary reorderingABCABCABCSafe&JA semilattice.EIt may be a join-semilattice, or meet-semilattice, it doesn't matter.#If it matters for you, use package lattices.In addition to  , Semilattice defines this laws:  commutativity x  y == y  x idempotency x  x == xKJust (), specialized to J.JKJKK6 None$FT.NBLast write wins. Assuming timestamp is unique. This type is both , and CvRDT.Timestamps are assumed unique, totally ordered, and consistent with causal order; i.e., if assignment 1 happened-before assignment 2, the former s timestamp is less than the latter s.RInitialize stateSdChange state as CvRDT operation. Current value is ignored, because new timestamp is always greater.T Query stateXSee CvRDTY(Merge by choosing more recent timestamp.NOQPRSTUNOPQRSTUNOPQ Safe/vcXXX Internal TODO remove\]^_`abc\]^_`abc\] None/hijklmhikjlmhi None;=0xrstuvwrsutwvrs Safe2|Grow-only counter.~Increment counter Initial stateGet value from the stateSee CvRDT~ replica id|}~|}~|}Safe$7FnPositive-negative counter. Allows incrementing and decrementing. Nice example of combining of existing CvRDT (|' in this case) to create another CvRDT.Get value from the stateDecrement counterIncrement counter Initial stateSee CvRDT replica id replica idSafe+<$5State-based, or convergent (Cv) replicated data type.!Update is any function modifying state.GQuery function is not needed. State itself is exposed. In other words, query = 7. Some types may offer more convenient query functions.$Actually, a CvRDT is nothing more a J.Safe?@ABCDEFGHIJKFLMNOPQRSTUVWXYZ[\   ] ^  _  ` a b c d e f E E    g h i j k J K l l   g  m n o p q r   g  s t u v w w x   y z { |}}~xcrdt-5.0-Kk9EeYHMJT08pU8UWQDAz4 CRDT.Cv.Max CRDT.Cv.GSetCRDT.LamportClockCRDT.CmCRDT.Cm.TwoPSet CRDT.Cm.GSetCRDT.Cm.CounterData.SemilatticeCRDT.LWWCRDT.Cv.TwoPSet CRDT.Cv.ORSetCRDT.Cv.LwwElementSetCRDT.Cv.GCounterCRDT.Cv.PNCounterCRDT.Cv CRDT.Cm.LWWLWW Semigroup<> Paths_crdtbaseData.SemigroupgetMaxMaxGSetaddinitiallookupqueryClockgetTimeadvanceProcessgetPid ProcessSimLamportClockSimPid LamportTimerunLamportClockSim runProcessSim$fShowLamportTime$fProcessProcessSim$fClockProcessSim$fClockLamportClock$fProcessLamportClock$fEqPid$fOrdPid $fShowPid$fEqLamportTime$fOrdLamportTime$fApplicativeLamportClockSim$fFunctorLamportClockSim$fMonadLamportClockSim$fApplicativeProcessSim$fFunctorProcessSim$fMonadProcessSim$fApplicativeLamportClock$fFunctorLamportClock$fMonadLamportClock$fMonadIOLamportClockCmRDTIntentPayloadmakeOpapply CausalOrdprecedes concurrentTwoPSetAddRemove$fCausalOrdTwoPSet$fCmRDTTwoPSet $fEqTwoPSet $fShowTwoPSet$fCausalOrdGSet $fCmRDTGSet$fEqGSet $fShowGSetCounter Increment Decrement$fCausalOrdCounter$fCmRDTCounter$fBoundedCounter $fEnumCounter $fEqCounter $fShowCounter Semilatticemerge$fSemilatticeSet$fSemilatticeMaxvaluetimeassignadvanceFromLWW $fCmRDTLWW$fCausalOrdLWW$fSemilatticeLWW$fSemigroupLWW$fEqLWW $fShowLWWremove singletonisKnown$fSemilatticeTwoPSet$fSemigroupTwoPSetORSet$fSemilatticeORSet$fSemigroupORSet $fEqORSet $fShowORSet LwwElementSetLES$fSemilatticeLwwElementSet$fSemigroupLwwElementSet$fEqLwwElementSet$fShowLwwElementSetGCounter increment$fSemilatticeGCounter$fSemigroupGCounter $fEqGCounter$fShowGCounter PNCounterpositivenegative decrement$fSemilatticePNCounter$fSemigroupPNCounter $fEqPNCounter$fShowPNCounterCvRDT LamportClockGHC.BaseNothingidversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName