Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finite Monotonic #153

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Do not switch between GarbageCollect and no GarbageCollect conjoi…
…ned to `Next.` Instead, toggle between `GarbageCollect` conjoined to `Next` and `GarbageCollect` as a separate VIEW.

Signed-off-by: Markus Alexander Kuppe <github.com@lemmster.de>
  • Loading branch information
lemmy committed Oct 18, 2024
commit f3763ac2152487c5d008c70f65ddd065295e75ac
1 change: 1 addition & 0 deletions specifications/FiniteMonotonic/MCCRDT.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ PROPERTIES

CONSTRAINTS StateConstraint
CONSTANTS Increment <- MCIncrement
VIEW View
14 changes: 13 additions & 1 deletion specifications/FiniteMonotonic/MCCRDT.tla
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ ASSUME F \in 0..7

------

SetMin(s) == CHOOSE e \in s : \A o \in s : e <= o

GarbageCollect ==
LET SetMin(s) == CHOOSE e \in s : \A o \in s : e <= o IN
LET Transpose == SetMin({counter[n][o] : n, o \in Node}) IN
counter' = [
n \in Node |-> [
Expand All @@ -31,6 +32,17 @@ GarbageCollect ==

------

View ==
IF GB THEN vars ELSE
LET Transpose == SetMin({counter[n][o] : n, o \in Node}) IN
[
n \in Node |-> [
o \in Node |-> counter[n][o] - Transpose
]
]

------

S == INSTANCE CRDT

MCIncrement(n) ==
Expand Down