bU4      !"#$%&'()*+,-./0123456789:; < = > ? @ 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 [ \ ] ^ _ ` 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 { | } ~  Safej N Grow-only setupdateinitialization lookup querySafejConstruct new valueSafej*.If no key in the map then the result is empty.    SafejA 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 == xJust (), specialized to .6Safej  XXX Internal  Safej%Grow-only counter.'Increment counter( Initial state)Get value from the state*See CvRDT' replica id%&'()%&()'%&Safe$j.nPositive-negative counter. Allows incrementing and decrementing. Nice example of combining of existing CvRDT (%' in this case) to create another CvRDT.2Get value from the state3Decrement counter4Increment counter5 Initial state6See CvRDT3 replica id4 replica id./012345./015234./01Safe+j m: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 .::Safej ; None$3Kj&w>Get sequential timestamps.ILaws: 1. t1 <- getTimes n t2 <- getTime t2 >= t1 + n getTimes 0 == getTimes 1BUnique process identifierFDUnix time in 10^{-7} seconds (100 ns), as in RFC 4122 and Swarm RON.>number of needed timestamps.Starting value of the range. So return value t means range [t .. t + n - 1].;<=>?@ABCDEFGHIBC=>?DEHF@A<IG;<=>?@ABCDE None $;=>?K]j*a[+ProcessSim inside Lamport clock simulation.^!Lamport clock simulation. Key is B3. Non-present value is equivalent to (0, initial).)Increase time by pid and return new value Z[\]^_`abc ]^_Z[\`abc[\^_ NoneH]j/qCompact version of s . For each 5, the corresponding sequence of vetices has the same Pid and sequentially growing  LocalTime", starting with the specified one.s%TODO(cblp, 2018-02-06) Vector.UnboxedyMReplace content with specified, applying changed found by the diff algorithm qrstuvwxyz{ stwuyrxvqz{st Nonej0( None 7<FTVhjD: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 .  op1 op2 ==>  op1 .  op2 ==  op2 .  op1 !Idempotency doesn't need to hold.4Generate an update to the local and remote replicas.Returns - if the intended operation is not applicable.PApply 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.lPartial order for causal semantics. Values of some type may be ordered and causally-ordered different ways.x  y means that x must go before y and y can not go before x.*Not comparable, i. e. (a "d b) "' (b "d a).KMake op and apply it to the payload -- a common routine at the source node. None$FT]jLBLast 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.Initialize statedChange state as CvRDT operation. Current value is ignored, because new timestamp is always greater. Query stateSee CvRDT(Merge by choosing more recent timestamp.None;=jMNoneFT]jN3None$<FHTjQid of previous vertex,  means the beginningatomid of this vertex means the beginning indices in  vectorUsing D as an identifier for verticesIs added and is not removed.None$FTjR NoneFTjSNone ;=>?FT]jU *Empty order, allowing arbitrary reordering ! "##$%&'()!*+,-./011 23*4567899: ";<=>??@A"B: CDEFGH I J K L M N O O P P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f e g h g i j k l m n o p q r s t u v w x y z { | | } ~     3 !     " " 3!178|~" I !crdt-9.3-Jbp4RwHBfmt9r5K3IIpw07 CRDT.Cv.Max CRDT.Cv.GSet Data.MultiMapData.SemilatticeCRDT.Cv.TwoPSetCRDT.Cv.GCounterCRDT.Cv.PNCounterCRDT.CvCRDT.LamportClockCRDT.LamportClock.Simulation CRDT.Cv.RGA CRDT.Cv.ORSetCRDT.CmCRDT.LWWCRDT.Cv.LwwElementSetCRDT.Cm.TwoPSet CRDT.Cm.RGA CRDT.Cm.ORSet CRDT.Cm.GSetCRDT.Cm.Counter Semigroup<> MacAddress CRDT.Cm.LWWLWWbaseData.SemigroupgetMaxMaxGSetaddinitiallookupqueryMultiMapassocsdelete deleteManyemptyinsertkeysSet singleton $fEqMultiMap$fShowMultiMap Semilatticemerge$fSemilatticeSet$fSemilatticeMaxTwoPSetmemberremoveisKnown$fSemilatticeTwoPSet$fSemigroupTwoPSet $fEqTwoPSet $fShowTwoPSetGCounter increment$fSemilatticeGCounter$fSemigroupGCounter $fEqGCounter$fShowGCounter PNCounterpositivenegative decrement$fSemilatticePNCounter$fSemigroupPNCounter $fEqPNCounter$fShowPNCounterCvRDT getMacAddress LamportClockClockgetTimesadvanceProcessgetPidPid LamportTime LocalTimegetRealLocalTimegetTimerunLamportClock$fShowLamportTime$fProcessStateT$fProcessReaderT $fClockStateT$fClockReaderT$fClockLamportClock$fProcessLamportClock$fEqPid$fOrdPid $fShowPid$fEqLamportTime$fOrdLamportTime$fApplicativeLamportClock$fFunctorLamportClock$fMonadLamportClock$fMonadIOLamportClock ProcessSim ProcessSimTLamportClockSimLamportClockSimTrunLamportClockSimrunLamportClockSimT runProcessSimrunProcessSimT$fMonadFailLamportClockSimT$fMonadTransLamportClockSimT$fClockProcessSimT$fProcessProcessSimT$fMonadTransProcessSimT$fApplicativeLamportClockSimT$fFunctorLamportClockSimT$fMonadLamportClockSimT$fMonadErrorLamportClockSimT$fApplicativeProcessSimT$fFunctorProcessSimT$fMonadProcessSimT$fMonadFailProcessSimT RgaPacked RgaStringRGAtoListtoStringfromList fromStringeditpackunpack $fMonoidRGA$fSemilatticeRGA$fSemigroupRGA$fEqRGA $fShowRGAORSet$fSemilatticeORSet$fSemigroupORSet $fEqORSet $fShowORSetCmRDTIntentPayloadmakeOpapply CausalOrdprecedes concurrentmakeAndApplyOpmakeAndApplyOpsvaluetime initializeassignadvanceFromLWW $fCmRDTLWW$fCausalOrdLWW$fSemilatticeLWW$fSemigroupLWW$fEqLWW $fShowLWW LwwElementSetLES$fSemilatticeLwwElementSet$fSemigroupLwwElementSet$fEqLwwElementSet$fShowLwwElementSetAddRemove$fCausalOrdTwoPSet$fCmRDTTwoPSet OpAddAfterOpRemove RgaIntentAddAfter RgaPayloadvertices vertexIxstoVectorload $fCmRDTRGA$fCausalOrdRGA$fEqRgaPayload$fShowRgaPayload$fShowRgaIntentTagelementsversionOpAdd $fShowTag$fCausalOrdORSet $fCmRDTORSet $fShowIntent$fEqTag$fOrdTag $fEqPayload $fShowPayload$fCausalOrdGSet $fCmRDTGSet$fEqGSet $fShowGSetCounter Increment Decrement$fCausalOrdCounter$fCmRDTCounter$fBoundedCounter $fEnumCounter $fEqCounter $fShowCounterGHC.BaseidgetMac decodeMacpreIncreaseTimeVertexIdNothing