protocol stringclasses 18
values | prompt stringclasses 18
values | label stringclasses 18
values |
|---|---|---|
KVStoreSnapshotIsolation | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
--------------------------- MODULE KVStoreSnapshotIsolation ---------------------------
(*********... | Add(t, k, v) == \* Using transaction t, add value v to the store under key k.
/\ t \in tx
/\ snapshotStore[t][k] = NoVal
/\ snapshotStore' = [snapshotStore EXCEPT ![t][k] = v]
/\ written' = [written EXCEPT ![t] = @ \cup {k}]
/\ UNCHANGED <<tx, missed, store>>
|
Echo | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
-------------------------------- MODULE Echo --------------------------------
(*******************... | initiator, \* single initiator, will be the root of the tree
R \* neighborhood relation, represented as a Boolean function over nodes
|
CoffeeCan | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
---------------------------- MODULE CoffeeCan -------------------------------
(*******************... | EventuallyTerminates == <>(ENABLED Termination)
|
SimpleAllocator | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
------------------------ MODULE SimpleAllocator -------------------------
(***********************... | Next ==
\E c \in Clients, S \in SUBSET Resources :
Request(c,S) \/ Allocate(c,S) \/ Return(c,S)
|
ReadersWriters | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
-------------------------- MODULE ReadersWriters --------------------------
(*********************... | TryWrite(actor) ==
/\ actor \notin WaitingToWrite
/\ waiting' = Append(waiting, <<"write", actor>>)
/\ UNCHANGED <<readers, writers>>
|
Majority | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
-------------------------------- MODULE Majority -----------------------------
(******************... | vars == <<seq, i, cand, cnt>>
|
SlidingPuzzles | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
--------------------------- MODULE SlidingPuzzles ---------------------------
EXTENDS Integers
VA... | Next == LET empty == Pos \ UNION board
IN \E e \in empty : board' \in update(e, empty)
|
SchedulingAllocator | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
------------------------ MODULE SchedulingAllocator ---------------------
(***********************... | InfOftenSatisfied ==
\A c \in Clients : []<>(unsat[c] = {})
|
FastPaxos | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
--------------------------- MODULE FastPaxos -----------------------------
(*
This is a simpli... | ClassicAccepted ==
/\ UNCHANGED<<cValue>>
/\ PaxosAccepted
|
DiningPhilosophers | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
---- MODULE DiningPhilosophers ----
(*
TLA+ / PlusCal implementation of the Dining Philosophers p... | IsHoldingBothForks(p) ==
forks[LeftFork(p)].holder = p /\ forks[RightFork(p)].holder = p
BothForksAreClean(p) ==
forks[LeftFork(p)].clean /\ forks[RightFork(p)].clean
|
FindHighest | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
---------------------------- MODULE FindHighest -----------------------------
(*******************... | Termination == <>(pc = "Done")
|
Prisoners | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
------------------------------ MODULE Prisoners -----------------------------
(******************... | Spec == Init /\ [][Next]_vars /\ Fairness
-----------------------------------------------------------------------------
Safety ==
(*************************************************************************)
(* This formula asserts that safety condition: that Done true implies *)
(* that every prisoner other th... |
RingLeader | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
---------------------------- MODULE ring_leader ----------------------------
(********************... | Correctness ==
\A n \in Node : state[n] = "won" =>
/\ initiator[n]
/\ \A m \in Node \ {n} :
/\ state[m] = "lost"
/\ initiator[m] => Id[m] > Id[n]
|
SingleLaneBridge | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
-------------------------- MODULE SingleLaneBridge --------------------------
\* A bridge over a ... | StartPos == CHOOSE min \in Positions : \A p \in Positions : min <= p
EndPos == CHOOSE max \in Positions : \A p \in Positions : max >= p
|
Paxos | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
-------------------------------- MODULE Paxos -------------------------------
(*******************... | Phase2b(a) == \E m \in msgs : /\ m.type = "2a"
/\ m.bal \geq maxBal[a]
/\ maxBal' = [maxBal EXCEPT ![a] = m.bal]
/\ maxVBal' = [maxVBal EXCEPT ![a] = m.bal]
/\ maxVal' = [maxVal EXCEPT ![a] = m.val]... |
CheckpointCoordination | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
----------------------- MODULE CheckpointCoordination -----------------------
EXTENDS
Naturals,
... | CheckpointLease == [
node : Node, \* The node to which the checkpoint lease applies
counter : LogIndex \* The log index at which the lease was issued
]
|
LeastCircularSubstring | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
---------------------- MODULE LeastCircularSubstring ------------------------
(*******************... | L9 == /\ pc = "L9"
/\ i' = f[i]
/\ pc' = "L6"
/\ UNCHANGED << b, n, f, j, k >>
|
DieHard | ### Human: generate the TLA+ code that is missing from the section labeled `(* MASKED CODE *)`. Do not include explanation; only TLA+ code. Provide only the code that should replace `(* MASKED CODE *)`, and no other code.
------------------------------ MODULE DieHard -------------------------------
(******************... | NotSolved == big # 4
|
- Downloads last month
- 15