Skip to content

Commit

Permalink
Remove unused (dead) "code".
Browse files Browse the repository at this point in the history
[Refactor]
  • Loading branch information
lemmy committed Mar 6, 2022
1 parent 0de0ba5 commit 2efc280
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 0 additions & 16 deletions general-model/cosmos_client.tla
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ Operations == [type: {"write"}, data: Nat, region: WriteRegions, client: Clients
SeqToSet(s) == {s[i] : i \in DOMAIN s}

Last(s) == s[Len(s)]

MaxLen(c) == LET region == CHOOSE i \in Regions : \A j \in Regions : Len(c[i]) >= Len(c[j])
IN Len(c[region])

MinLen(c) == LET region == CHOOSE i \in Regions : \A j \in Regions : Len(c[i]) <= Len(c[j])
IN Len(c[region])
}

(* -------------------------------------------------------------- *)
Expand Down Expand Up @@ -208,12 +202,6 @@ SeqToSet(s) == {s[i] : i \in DOMAIN s}

Last(s) == s[Len(s)]

MaxLen(c) == LET region == CHOOSE i \in Regions : \A j \in Regions : Len(c[i]) >= Len(c[j])
IN Len(c[region])

MinLen(c) == LET region == CHOOSE i \in Regions : \A j \in Regions : Len(c[i]) <= Len(c[j])
IN Len(c[region])

VARIABLES session_token, numOp

vars == << Bound, History, Data, Database, value, pc, session_token, numOp >>
Expand Down Expand Up @@ -343,10 +331,6 @@ ReadAfterWrite == \A i, j \in DOMAIN History : /\ i < j

Linearizability == \A i, j \in DOMAIN History : /\ i < j
=> History[j].data >= History[i].data

LastOperation(c) == LET i == SetMax({j \in DOMAIN History : History[j].client = c})
IN IF i > 0 THEN History[i] ELSE <<>>


BoundedStaleness == /\ \A i, j \in Regions : Data[i] - Data[j] <= K
/\ \A r \in Regions : MonotonicReadPerRegion(r)
Expand Down
2 changes: 1 addition & 1 deletion scenario1/swscop.tla
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-------------------------- MODULE swscop --------------------------
EXTENDS Naturals, Integers, Sequences, FiniteSets, TLC, Bags
EXTENDS Naturals, Integers, Sequences, FiniteSets
CONSTANT NumClients, MaxNumOp, Consistency, K
ASSUME Consistency \in {"Eventual", "Consistent_Prefix", "Session", "Bounded_Staleness", "Strong"}
ASSUME MaxNumOp<10 /\ NumClients=1
Expand Down

0 comments on commit 2efc280

Please sign in to comment.