Beruflich Dokumente
Kultur Dokumente
Leslie Lamport
TRANSACTION COMMIT
[ slide 2 ]
WEDDINGS
[ slide 3 ]
An Old-Fashioned Wedding
Anne
Henry Anne
Minister
Henry Anne
Minister
Henry Anne
Minister
Henry Anne
Let’s make it more modern. A 21st century minister might say: Hank, are
you prepared to commit to this relationship?
To which Henry would reply:
I’m prepared.
The minister then asks:
Anne, are you prepared to commit to this relationship? And Anne replies:
[ slide 9 ]
A More Modern Wedding
Hank, are you prepared to commit
to this relationship?
Minister
Henry Anne
Let’s make it more modern. A 21st century minister might say: Hank, are
you prepared to commit to this relationship?
To which Henry would reply:
I’m prepared.
The minister then asks:
Anne, are you prepared to commit to this relationship? And Anne replies:
[ slide 10 ]
A More Modern Wedding
Minister
I’m prepared.
Henry Anne
Let’s make it more modern. A 21st century minister might say: Hank, are
you prepared to commit to this relationship?
To which Henry would reply:
I’m prepared.
The minister then asks:
Anne, are you prepared to commit to this relationship? And Anne replies:
[ slide 11 ]
A More Modern Wedding
Anne, are you prepared to commit
to this relationship?
Minister
Henry Anne
Let’s make it more modern. A 21st century minister might say: Hank, are
you prepared to commit to this relationship?
To which Henry would reply:
I’m prepared.
The minister then asks:
Anne, are you prepared to commit to this relationship? And Anne replies:
[ slide 12 ]
A More Modern Wedding
Minister
I’m prepared.
c
c
c
Henry Anne
I’m prepared.
The minister then says:
You’re now both in a committed relationship.
[ slide 13 ]
A More Modern Wedding
You’re now both in a
committed relationship.
Minister
Henry Anne
I’m prepared.
The minister then says:
You’re now both in a committed relationship.
[ slide 14 ]
What Can Go Wrong
Minister
Henry Anne
[ slide 15 ]
What Can Go Wrong
Anne, are you prepared to commit
to this relationship?
Minister
Henry Anne
[ slide 16 ]
What Can Go Wrong
Minister
No way!
c
c
c
Henry Anne
[ slide 17 ]
What Can Go Wrong
Minister
Henry Anne
[ slide 18 ]
What Can Go Wrong
Minister
Henry Anne
[ slide 19 ]
What Can Go Wrong
Minister
I’m prepared.
Henry Anne
[ slide 20 ]
What Can Go Wrong
Minister
I’m prepared.
c
c
c
Henry Anne
[ slide 21 ]
What Can Go Wrong
Henry Anne
[ slide 22 ]
What Can Go Wrong
Minister
Henry Anne
[ slide 23 ]
What a Wedding Accomplishes
Minister
Henry Anne
[ slide 24 ]
What a Wedding Accomplishes
Minister
ppp ppp
unsure unsure
ppp ppp
Henry Anne
[ slide 25 ]
What a Wedding Accomplishes
Minister
ppp
prepared
ppp
Henry Anne
[ slide 26 ]
What a Wedding Accomplishes
Minister
ppp
aborted
ppp
Henry Anne
[ slide 27 ]
What a Wedding Accomplishes
Minister
ppp ppp
committed committed
ppp ppp
Henry Anne
It should finish with them both believing they are in a committed relationship
Or both believing that the wedding was aborted.
It should be impossible for them to disagree about the outcome.
[ slide 28 ]
What a Wedding Accomplishes
Minister
ppp ppp
aborted aborted
ppp ppp
Henry Anne
It should finish with them both believing they are in a committed relationship
Or both believing that the wedding was aborted.
It should be impossible for them to disagree about the outcome.
[ slide 29 ]
What a Wedding Accomplishes
Minister
XX
XXX p committed p aborted
p p p
pp p p XXXX p
p
p
XXX
X
X
XXX
XXX
XXX
Henry Anne XXX
It should finish with them both believing they are in a committed relationship
Or both believing that the wedding was aborted.
It should be impossible for them to disagree about the outcome.
[ slide 30 ]
The Minister
He implements the wedding.
Henry Anne
He’s part of how the wedding works, not part of what the wedding is
supposed to accomplish.
[ slide 31 ]
The Minister
He implements the wedding.
Henry Anne
He’s part of how the wedding works, not part of what the wedding is
supposed to accomplish.
[ slide 32 ]
The Minister
He implements the wedding.
Henry Anne
He’s part of how the wedding works, not part of what the wedding is
supposed to accomplish.
[ slide 33 ]
The Minister
He implements the wedding.
Henry Anne
He’s part of how the wedding works, not part of what the wedding is
supposed to accomplish.
[ slide 34 ]
Specifying a Wedding
Henry Anne
Whatspecification
The a wedding accomplishes,
mentions only not
the how
brideit’s performed.
and groom,
not the minister.
Henry Anne
Whatspecification
The a wedding accomplishes,
mentions only not
the how
brideit’s performed.
and groom,
not the minister.
Henry Anne
Henry Anne
The specification mentions only the bride and groom, not the minister, who’s
part of how , not what .
[ slide 38 ]
Specifying a Wedding
Henry Anne
The specification mentions only the bride and groom, not the minister, who’s
part of how , not what .
[ slide 39 ]
The state/transition diagram of each participant:
unsure
?
prepared
@
R
@ ?
committed aborted
Here’s the state/transition diagram of each of the two participants: the bride
and the groom.
Each participant starts in the state of being unsure about what he or she
wants to do.
From that state, they can go into either the prepared or the aborted state.
[ slide 40 ]
The state/transition diagram of each participant:
unsure
?
prepared
@
R
@ ?
committed aborted
Here’s the state/transition diagram of each of the two participants: the bride
and the groom.
Each participant starts in the state of being unsure about what he or she
wants to do.
From that state, they can go into either the prepared or the aborted state.
[ slide 41 ]
The state/transition diagram of each participant:
unsure
?
prepared
@
R
@ ?
committed aborted
Here’s the state/transition diagram of each of the two participants: the bride
and the groom.
Each participant starts in the state of being unsure about what he or she
wants to do.
From that state, they can go into either the prepared or the aborted state.
[ slide 42 ]
The state/transition diagram of each participant:
unsure
?
prepared
@
R
@ ?
committed aborted
From the prepared state, they can go to either the committed or aborted
state.
[ slide 43 ]
The state/transition diagram of each participant:
unsure
?
prepared
@
R
@ ?
committed aborted
From the prepared state, they can go to either the committed or aborted
state.
[ slide 44 ]
The state/transition diagram of each participant:
unsure
?
prepared
@
R
@ ?
committed aborted
From the prepared state, they can go to either the committed or aborted
state.
[ slide 45 ]
The state/transition diagram of each participant:
unsure
?
prepared
@
R
@ ?
committed aborted
From the prepared state, they can go to either the committed or aborted
state.
[ slide 46 ]
A Really Modern Wedding
One that’s not limited to just one bride and one groom.
[ slide 47 ]
A Really Modern Wedding
One that’s not limited to just one bride and one groom.
[ slide 48 ]
A Really Modern Wedding
One that’s not limited to just one bride and one groom.
[ slide 49 ]
A Really Modern Wedding
Henry
One that’s not limited to just one bride and one groom.
[ slide 50 ]
A Really Modern Wedding
Henry Catherine A
One that’s not limited to just one bride and one groom.
[ slide 51 ]
A Really Modern Wedding
One that’s not limited to just one bride and one groom.
[ slide 52 ]
A Really Modern Wedding
One that’s not limited to just one bride and one groom.
[ slide 53 ]
A Really Modern Wedding
Anne C
One that’s not limited to just one bride and one groom.
[ slide 54 ]
A Really Modern Wedding
Anne C Catherine H
One that’s not limited to just one bride and one groom.
[ slide 55 ]
A Really Modern Wedding
One that’s not limited to just one bride and one groom.
[ slide 56 ]
Each participant has the same states as before.
unsure
?
prepared
@
R
@ ?
committed aborted
Each participant has the same permitted states and state transitions as
before.
[ slide 57 ]
Each participant has the same states as before.
Each participant has the same permitted states and state transitions as
before.
[ slide 58 ]
TRANSACTION COMMIT
In a transaction commit . . .
[ slide 59 ]
A Wedding
[ slide 60 ]
A Database Transaction
[ slide 61 ]
A Database Transaction
[ slide 62 ]
A Database Transaction
[ slide 63 ]
A Database Transaction
The transaction can commit only if all resource managers are prepared to
commit.
[ slide 64 ]
A Database Transaction
The transaction can commit only if all resource managers are prepared to
commit.
[ slide 65 ]
A Database Transaction
The transaction can commit only if all resource managers are prepared to
commit.
[ slide 66 ]
Transaction Commit ←→ Wedding
RM ←→ Participant
[ slide 67 ]
Transaction Commit ←→ Wedding
RM ←→ Participant
[ slide 68 ]
The state / transition diagram of each RM:
unsure
?
prepared
@
R
@ ?
committed aborted
The state / transition diagram of each resource manager is the same as that
of each participant in a wedding.
Except that the unsure state is traditionally called the working state of a
resource manager.
[ slide 69 ]
The state / transition diagram of each RM:
unsure
?
prepared
@
R
@ ?
committed aborted
The state / transition diagram of each resource manager is the same as that
of each participant in a wedding.
Except that the unsure state is traditionally called the working state of a
resource manager.
[ slide 70 ]
The state / transition diagram of each RM:
working
?
prepared
@
R
@ ?
committed aborted
The state / transition diagram of each resource manager is the same as that
of each participant in a wedding.
Except that the unsure state is traditionally called the working state of a
resource manager.
[ slide 71 ]
The state / transition diagram of each RM:
working
?
prepared
@
R
@ ?
committed aborted
The state / transition diagram of each resource manager is the same as that
of each participant in a wedding.
Except that the unsure state is traditionally called the working state of a
resource manager.
[ slide 72 ]
THE TLA+ SPEC
[ slide 73 ]
You will first:
– Open the Toolbox.
– Create a new module named TCommit .
– Copy the body of the spec from the web page
and paste it into the module.
So you can view the spec while watching the video, you will first
And copy the body of the spec from the web page and paste it into the
module.
[ slide 74 ]
You will first:
– Open the Toolbox.
– Create a new module named TCommit .
– Copy the body of the spec from the web page
and paste it into the module.
So you can view the spec while watching the video, you will first
And copy the body of the spec from the web page and paste it into the
module.
[ slide 75 ]
You will first:
– Open the Toolbox.
– Create a new module named TCommit .
– Copy the body of the spec from the web page
and paste it into the module.
So you can view the spec while watching the video, you will first
And copy the body of the spec from the web page and paste it into the
module.
[ slide 76 ]
You will first:
– Open the Toolbox.
– Create a new module named TCommit .
– Copy the body of the spec from the web page
and paste it into the module.
So you can view the spec while watching the video, you will first
And copy the body of the spec from the web page and paste it into the
module.
[ slide 77 ]
You will first:
– Open the Toolbox.
– Create a new module named TCommit .
– Copy the body of the spec from the web page
and paste it into the module.
[ slide 78 ]
The spec has comments.
[ slide 79 ]
The spec has comments.
[ slide 80 ]
The spec has comments.
[ slide 81 ]
The spec is in module TCommit .
[ slide 82 ]
The spec is in module TCommit .
[ slide 83 ]
The spec is in module TCommit .
[ slide 84 ]
The set of all RMs.
[ slide 85 ]
The set of all RMs.
Why is RM a set?
[ slide 86 ]
The set of all RMs.
Why is RM a set?
But the semantics of TLA+ don’t say what the elements of the sets 42 and
abc are.
So the TLC model checker will report an error if it tries to evaluate an
expression like 42 is an element of abc .
[ slide 87 ]
The set of all RMs.
Why is RM a set?
But the semantics of TLA+ don’t say what the elements of the sets 42 and
abc are.
So the TLC model checker will report an error if it tries to evaluate an
expression like 42 is an element of abc .
[ slide 88 ]
The set of all RMs.
Why is RM a set?
But the semantics of TLA+ don’t say what the elements of the sets 42 and
abc are.
So the TLC model checker will report an error if it tries to evaluate an
expression like 42 is an element of abc .
[ slide 89 ]
The set of all RMs.
Why is RM a set?
But the semantics of TLA+ don’t say what the elements of the sets 42 and
abc are.
So the TLC model checker will report an error if it tries to evaluate an
expression like 42 is an element of abc .
[ slide 90 ]
Next comes the declaration of the spec’s single variable rmState .
followed by the type invariant that describes what values we expect rmState
to be able to assume.
[ slide 91 ]
Next comes the declaration of the spec’s single variable rmState .
followed by the type invariant that describes what values we expect rmState
to be able to assume.
[ slide 92 ]
Next comes the declaration of the spec’s single variable rmState .
followed by the type invariant that describes what values we expect rmState
to be able to assume.
[ slide 93 ]
An array indexed by RMs.
rmState [r ] is the state of RM r.
followed by the type invariant that describes what values we expect rmState
to be able to assume.
[ slide 94 ]
···
[ slide 95 ]
···
[ slide 96 ]
···
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 97 ]
···
The set of all arrays indexed by elements of RM
with values in · · · .
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 98 ]
···
The set of all arrays indexed by elements of RM
with values in · · · .
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 99 ]
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 100 ]
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 101 ]
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 102 ]
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 103 ]
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 104 ]
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 105 ]
working
?
prepared
@
R
@ ?
committed aborted
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 106 ]
This is the TLA+ notation for the set of all arrays indexed by elements of RM
where dot dot dot is this set whose elements are the four strings working,
prepared, committed, and aborted. which represent the four possible states
of a resource manager.
[ slide 107 ]
->
[ slide 108 ]
The initial predicate TCInit asserts that rmState equals
The array with index set equal to the set of resource managers
such that the array applied to little rm equals the string “working”,
for every resource manager little rm .
[ slide 109 ]
The initial predicate TCInit asserts that rmState equals
The array with index set equal to the set of resource managers
such that the array applied to little rm equals the string “working”,
for every resource manager little rm .
[ slide 110 ]
The array with index set RM such that
for all rm in RM
The array with index set equal to the set of resource managers
such that the array applied to little rm equals the string “working”,
for every resource manager little rm .
[ slide 111 ]
The TLA+ syntax for an array expression:
Where this maps to symbol is typed bar dash greater -than in ASCII.
For example, inside square brackets
We put the variable i element of The set of integers from one through 42
maps to symbol the expression i squared.
[ slide 112 ]
The TLA+ syntax for an array expression:
Where this maps to symbol is typed bar dash greater -than in ASCII.
For example, inside square brackets
We put the variable i element of The set of integers from one through 42
maps to symbol the expression i squared.
[ slide 113 ]
The TLA+ syntax for an array expression:
Where this maps to symbol is typed bar dash greater -than in ASCII.
For example, inside square brackets
We put the variable i element of The set of integers from one through 42
maps to symbol the expression i squared.
[ slide 114 ]
The TLA+ syntax for an array expression:
Where this maps to symbol is typed bar dash greater -than in ASCII.
For example, inside square brackets
We put the variable i element of The set of integers from one through 42
maps to symbol the expression i squared.
[ slide 115 ]
The TLA+ syntax for an array expression:
Where this maps to symbol is typed bar dash greater -than in ASCII.
For example, inside square brackets
We put the variable i element of The set of integers from one through 42
maps to symbol the expression i squared.
[ slide 116 ]
The TLA+ syntax for an array expression:
Where this maps to symbol is typed bar dash greater -than in ASCII.
For example, inside square brackets
We put the variable i element of The set of integers from one through 42
maps to symbol the expression i squared.
[ slide 117 ]
The TLA+ syntax for an array expression:
Where this maps to symbol is typed bar dash greater -than in ASCII.
For example, inside square brackets
We put the variable i element of The set of integers from one through 42
maps to symbol the expression i squared.
[ slide 118 ]
The TLA+ syntax for an array expression:
Where this maps to symbol is typed bar dash greater -than in ASCII.
For example, inside square brackets
We put the variable i element of The set of integers from one through 42
maps to symbol the expression i squared.
[ slide 119 ]
The TLA+ syntax for an array expression:
So this definition defines s-q-r to be an array with index set the set of
integers from one through 42
such that s-q-r of i equals i squared for all i in that set.
[ slide 120 ]
The TLA+ syntax for an array expression:
So this definition defines s-q-r to be an array with index set the set of
integers from one through 42
such that s-q-r of i equals i squared for all i in that set.
[ slide 121 ]
The TLA+ syntax for an array expression:
So this definition defines s-q-r to be an array with index set the set of
integers from one through 42
such that s-q-r of i equals i squared for all i in that set.
[ slide 122 ]
The TLA+ syntax for an array expression:
So this definition defines s-q-r to be an array with index set the set of
integers from one through 42
such that s-q-r of i equals i squared for all i in that set.
[ slide 123 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
Let’s look at some different terminology used in programming and math for
the same things.
What programmers call the index set of an array mathematicians call the
domain of a function.
[ slide 124 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
Let’s look at some different terminology used in programming and math for
the same things.
What programmers call the index set of an array mathematicians call the
domain of a function.
[ slide 125 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
Let’s look at some different terminology used in programming and math for
the same things.
What programmers call the index set of an array mathematicians call the
domain of a function.
[ slide 126 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
Let’s look at some different terminology used in programming and math for
the same things.
What programmers call the index set of an array mathematicians call the
domain of a function.
[ slide 127 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
Let’s look at some different terminology used in programming and math for
the same things.
What programmers call the index set of an array mathematicians call the
domain of a function.
[ slide 128 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
Let’s look at some different terminology used in programming and math for
the same things.
What programmers call the index set of an array mathematicians call the
domain of a function.
[ slide 129 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
[ slide 130 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
[ slide 131 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
[ slide 132 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
[ slide 133 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
[ slide 134 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
[ slide 135 ]
Terminology
Programming Math
array function
index set domain
f [e ] f (e )
Has another use.
[ slide 136 ]
Many popular programming languages allow
only index sets 0 . . n .
Many popular programming languages allow arrays only whose index sets
consist of the set of integers from 0 to some n .
Math, and therefore TLA+ , allows a function to have any set as its domain.
[ slide 137 ]
Many popular programming languages allow
only index sets 0 . . n .
Many popular programming languages allow arrays only whose index sets
consist of the set of integers from 0 to some n .
Math, and therefore TLA+ , allows a function to have any set as its domain.
[ slide 138 ]
Many popular programming languages allow
only index sets 0 . . n .
Many popular programming languages allow arrays only whose index sets
consist of the set of integers from 0 to some n .
Math, and therefore TLA+ , allows a function to have any set as its domain.
[ slide 139 ]
Let’s return to the spec and jump down to the definition of the next-state
formula TCNext
there exists
[ slide 140 ]
q
q
q
Let’s return to the spec and jump down to the definition of the next-state
formula TCNext
there exists
[ slide 141 ]
Let’s return to the spec and jump down to the definition of the next-state
formula TCNext
there exists
[ slide 142 ]
Let’s return to the spec and jump down to the definition of the next-state
formula TCNext
there exists
[ slide 143 ]
Let’s return to the spec and jump down to the definition of the next-state
formula TCNext
there exists
[ slide 144 ]
There exists r in RM for which this subformula is true.
Let’s return to the spec and jump down to the definition of the next-state
formula TCNext
there exists
[ slide 145 ]
\E
There exists r in RM for which this subformula is true.
Let’s return to the spec and jump down to the definition of the next-state
formula TCNext
there exists
[ slide 146 ]
There exists r in RM for which this subformula is true.
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 147 ]
There exists r in RM for which this subformula is true.
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 148 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 149 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
then this formula equals
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 150 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
then this formula equals
∨
∨
∨
∨
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 151 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
then this formula equals
∨
∨
∨
∨
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 152 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
then this formula equals
∨ Prepare (“r 1”) ∨ Decide (“r 1”)
∨
∨
∨
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 153 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
then this formula equals
∨ Prepare (“r 1”) ∨ Decide (“r 1”)
∨ Prepare (“r 2”) ∨ Decide (“r 2”)
∨
∨
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 154 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
then this formula equals
∨ Prepare (“r 1”) ∨ Decide (“r 1”)
∨ Prepare (“r 2”) ∨ Decide (“r 2”)
∨ Prepare (“r 3”) ∨ Decide (“r 3”)
∨
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 155 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
then this formula equals
∨ Prepare (“r 1”) ∨ Decide (“r 1”)
∨ Prepare (“r 2”) ∨ Decide (“r 2”)
∨ Prepare (“r 3”) ∨ Decide (“r 3”)
∨ Prepare (“r 4”) ∨ Decide (“r 4”)
There exists some r in the set RM for which this subformula is true.
Then this formula equals the disjunction of the four formulas we get by
substituting in the subformula each of those four elements of RM
[ slide 156 ]
∃ r ∈ RM : Prepare (r ) ∨ Decide (r )
The exists declares the identifier r to be local to this formula. We can replace
r by any other identifier
For example xyz , without changing the meaning of the formula.
But xyz must not already be declared or defined at this point in the spec.
TLA+ does not allow defining or declaring a symbol that already has a
meaning.
[ slide 157 ]
∃ xyz ∈ RM : Prepare (xyz ) ∨ Decide (xyz )
The exists declares the identifier r to be local to this formula. We can replace
r by any other identifier
For example xyz , without changing the meaning of the formula.
But xyz must not already be declared or defined at this point in the spec.
TLA+ does not allow defining or declaring a symbol that already has a
meaning.
[ slide 158 ]
∃ xyz ∈ RM : Prepare (xyz ) ∨ Decide (xyz )
The exists declares the identifier r to be local to this formula. We can replace
r by any other identifier
For example xyz , without changing the meaning of the formula.
But xyz must not already be declared or defined at this point in the spec.
TLA+ does not allow defining or declaring a symbol that already has a
meaning.
[ slide 159 ]
Let’s now return to the spec and move back up to the definitions of Prepare
and Decide , starting with Prepare
?
prepared
@
R
@ ?
committed aborted
Let’s now return to the spec and move back up to the definitions of Prepare
and Decide , starting with Prepare
?
prepared
@
R
@ ?
committed aborted
Let’s now return to the spec and move back up to the definitions of Prepare
and Decide , starting with Prepare
?
prepared
@
R
@ ?
committed aborted
This step can be taken only when the current state of resource manager r is
working , so rmState of r equal to the string working must be true.
The step must change the value of rmState of r to the string prepared .
?
prepared
@
R
@ ?
committed aborted
This step can be taken only when the current state of resource manager r is
working , so rmState of r equal to the string working must be true.
The step must change the value of rmState of r to the string prepared .
?
prepared
@
R
@ ?
committed aborted
This step can be taken only when the current state of resource manager r is
working , so rmState of r equal to the string working must be true.
The step must change the value of rmState of r to the string prepared .
This step can be taken only when the current state of resource manager r is
working , so rmState of r equal to the string working must be true.
The step must change the value of rmState of r to the string prepared .
What does it say about the value of rmState [s ] in the new state
for an RM s with s 6= r ?
Nothing!
You have to learn to see what a formula says, not what you think it should
say.
It says that the value of rmState of r in the new state is the string “prepared ”.
[ slide 169 ]
rmState 0 [r ] = “prepared ”
What does this formula say?
What does it say about the value of rmState [s ] in the new state
for an RM s with s 6= r ?
Nothing!
You have to learn to see what a formula says, not what you think it should
say.
It says that the value of rmState of r in the new state is the string “prepared ”.
[ slide 170 ]
rmState 0 [r ] = “prepared ”
What does this formula say?
What does it say about the value of rmState [s ] in the new state
for an RM s with s 6= r ?
Nothing!
You have to learn to see what a formula says, not what you think it should
say.
It says that the value of rmState of r in the new state is the string “prepared ”.
[ slide 171 ]
rmState 0 [r ] = “prepared ”
What does this formula say?
What does it say about the value of rmState [s ] in the new state
for an RM s with s 6= r ?
Nothing!
What does it say about the value of rmState of s in the new state for a
resource manager s different from r ?
Absolutely nothing!
[ slide 172 ]
rmState 0 [r ] = “prepared ”
What does this formula say?
What does it say about the value of rmState [s ] in the new state
for an RM s with s 6= r ?
Nothing!
What does it say about the value of rmState of s in the new state for a
resource manager s different from r ?
Absolutely nothing!
[ slide 173 ]
rmState 0 [r ] = “prepared ”
You’ll get used to it.
The spec can’t just say what the new value of rmState of r is.
It must say what the new value of the entire function rmState is.
That value must be a function with domain RM .
And we know how to write such a function.
[ slide 174 ]
rmState 0 [r ] = “prepared ”
rmState 0 = [ s ∈ RM 7→
The spec can’t just say what the new value of rmState of r is.
It must say what the new value of the entire function rmState is.
That value must be a function with domain RM .
And we know how to write such a function.
[ slide 175 ]
rmState 0 [r ] = “prepared ”
rmState 0 = [ s ∈ RM 7→ · · · ]
↑
the new value of rmState [s ]
It looks like this, where we have to replace the dot dot dot
with an expression that specifies the new value of rmState of s for each
resource manager s .
[ slide 176 ]
rmState 0 [r ] = “prepared ”
rmState 0 = [ s ∈ RM 7→ · · · ]
↑
the new value of rmState [s ]
It looks like this, where we have to replace the dot dot dot
with an expression that specifies the new value of rmState of s for each
resource manager s .
[ slide 177 ]
rmState 0 [r ] = “prepared ”
rmState 0 = [ s ∈ RM 7→ IF s=r THEN “prepared ”
ELSE rmState [s ] ]
Any other resource manager s should have the same value of rmState in the
new state as in the old state.
[ slide 178 ]
rmState 0 [r ] = “prepared ”
rmState 0 = [ s ∈ RM 7→ IF s=r THEN “prepared ”
ELSE rmState [s ] ]
Any other resource manager s should have the same value of rmState in the
new state as in the old state.
[ slide 179 ]
rmState 0 [r ] = “prepared ”
rmState 0 = [ s ∈ RM 7→ IF s=r THEN “prepared ”
ELSE rmState [s ] ]
Any other resource manager s should have the same value of rmState in the
new state as in the old state.
[ slide 180 ]
[ s ∈ RM 7→ IF s=r THEN “prepared ”
ELSE rmState [s ] ]
Any other resource manager s should have the same value of rmState in the
new state as in the old state.
[ slide 181 ]
[ s ∈ RM 7→ IF s=r THEN “prepared ”
ELSE rmState [s ] ]
What does the exclamation point (usually read as bang) mean? It means
nothing.
[ slide 182 ]
[ s ∈ RM 7→ IF s=r THEN “prepared ”
ELSE rmState [s ] ]
What does the exclamation point (usually read as bang) mean? It means
nothing.
[ slide 183 ]
[ s ∈ RM 7→ IF s=r THEN “prepared ”
ELSE rmState [s ] ]
What does the exclamation point (usually read as bang) mean? It means
nothing.
[ slide 184 ]
[ s ∈ RM 7→ IF s=r THEN “prepared ”
ELSE rmState [s ] ]
What does the exclamation point (usually read as bang) mean? It means
nothing.
[ slide 185 ]
So, here’s the complete definition of Prepare .
[ slide 186 ]
Now for the definition of Decide . It describes possible steps in which resource
manager r reaches a committed or aborted state.
The first describes a step in which resource manager r goes from the
prepared state to the committed state.
[ slide 187 ]
Now for the definition of Decide . It describes possible steps in which resource
manager r reaches a committed or aborted state.
The first describes a step in which resource manager r goes from the
prepared state to the committed state.
[ slide 188 ]
Describes a prepared → committed step.
working
?
prepared
@
R
@ ?
committed aborted
Now for the definition of Decide . It describes possible steps in which resource
manager r reaches a committed or aborted state.
The first describes a step in which resource manager r goes from the
prepared state to the committed state.
[ slide 189 ]
working
?
prepared
@
R
@ ?
committed aborted
[ slide 190 ]
every RM is prepared or committed
working
?
prepared
@
R
@ ?
committed aborted
[ slide 191 ]
working
?
prepared
@
R
@ ?
committed aborted
[ slide 192 ]
working
?
prepared
@
R
@ ?
committed aborted
And in the new state, r is committed and the state of every other resource
manager remains the same.
[ slide 193 ]
working
?
prepared
@
R
@ ?
committed aborted
And in the new state, r is committed and the state of every other resource
manager remains the same.
[ slide 194 ]
Describes steps that abort.
working
?
prepared
@
R
@ ?
committed aborted
And in the new state, r is committed and the state of every other resource
manager remains the same.
[ slide 195 ]
working
?
prepared
@
R
@ ?
committed aborted
[ slide 196 ]
no RM is committed
working
?
prepared
@
R
@ ?
committed aborted
[ slide 197 ]
working
?
prepared
@
R
@ ?
committed aborted
[ slide 198 ]
working
?
prepared
@
R
@ ?
committed aborted
And the state of r changes to aborted , while the state of all other resource
managers remain the same.
[ slide 199 ]
working
?
prepared
@
R
@ ?
committed aborted
And the state of r changes to aborted , while the state of all other resource
managers remain the same.
[ slide 200 ]
Remember that this formula asserts:
there exists some r in the set RM for which this subformula is true.
If RM is this set of four elements, then the exists formula equals this
disjunction of four formulas.
There is a dual to this formula in which the exists symbol is replaced by this
forall symbol.
[ slide 201 ]
There exists r in RM for which this subformula is true.
If RM is this set of four elements, then the exists formula equals this
disjunction of four formulas.
There is a dual to this formula in which the exists symbol is replaced by this
forall symbol.
[ slide 202 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
If RM is this set of four elements, then the exists formula equals this
disjunction of four formulas.
There is a dual to this formula in which the exists symbol is replaced by this
forall symbol.
[ slide 203 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
then the formula equals
∨ Prepare (“r 1”) ∨ Decide (“r 1”)
∨ Prepare (“r 2”) ∨ Decide (“r 2”)
∨ Prepare (“r 3”) ∨ Decide (“r 3”)
∨ Prepare (“r 4”) ∨ Decide (“r 4”)
If RM is this set of four elements, then the exists formula equals this
disjunction of four formulas.
There is a dual to this formula in which the exists symbol is replaced by this
forall symbol.
[ slide 204 ]
Remember that this formula asserts:
there exists some r in the set RM for which this subformula is true.
If RM is this set of four elements, then the exists formula equals this
disjunction of four formulas.
There is a dual to this formula in which the exists symbol is replaced by this
forall symbol.
[ slide 205 ]
Remember that this formula asserts:
there exists some r in the set RM for which this subformula is true.
If RM is this set of four elements, then the exists formula equals this
disjunction of four formulas.
There is a dual to this formula in which the exists symbol is replaced by this
forall symbol.
[ slide 206 ]
\A
[ slide 207 ]
Typed backslash A in ASCII .
[ slide 208 ]
For all r in RM , this subformula is true.
[ slide 209 ]
If RM = { “r 1”, “r 2”, “r 3”, “r 4” }
then the formula equals
∧ Prepare (“r 1”) ∨ Decide (“r 1”)
∧ Prepare (“r 2”) ∨ Decide (“r 2”)
∧ Prepare (“r 3”) ∨ Decide (“r 3”)
∧ Prepare (“r 4”) ∨ Decide (“r 4”)
[ slide 210 ]
Remember that canCommit should assert that
every resource manager is in the prepared or committed state.
This formula asserts that for every resource manager r , the value of rmState
of r is either the string prepared or the string committed .
[ slide 211 ]
every RM is prepared or committed
This formula asserts that for every resource manager r , the value of rmState
of r is either the string prepared or the string committed .
[ slide 212 ]
Remember that canCommit should assert that
every resource manager is in the prepared or committed state.
This formula asserts that for every resource manager r , the value of rmState
of r is either the string prepared or the string committed .
[ slide 213 ]
no RM is committed
This formula asserts that, for every resource manager r , the value of
rmState [r ] doesn’t equal the string committed .
[ slide 214 ]
Remember that notCommitted should assert that no resource manager is
committed.
This formula asserts that, for every resource manager r , the value of
rmState [r ] doesn’t equal the string committed .
[ slide 215 ]
Let’s take another look at the definition of Decide .
[ slide 216 ]
Let’s take another look at the definition of Decide .
[ slide 217 ]
Let’s take another look at the definition of Decide .
[ slide 218 ]
Let’s take another look at the definition of Decide .
[ slide 219 ]
We have to change the bound variable r used in the definition of canCommit .
to some other variable like s to avoid a name conflict with this r
[ slide 220 ]
We have to change the bound variable r used in the definition of canCommit .
to some other variable like s to avoid a name conflict with this r
[ slide 221 ]
We have to change the bound variable r used in the definition of canCommit .
to some other variable like s to avoid a name conflict with this r
[ slide 222 ]
We have to change the bound variable r used in the definition of canCommit .
to some other variable like s to avoid a name conflict with this r
[ slide 223 ]
We have to change the bound variable r used in the definition of canCommit .
to some other variable like s to avoid a name conflict with this r
[ slide 224 ]
Definitions provide a simple and powerful way
of hierarchically decomposing formulas to make
them easier to read.
[ slide 225 ]
Decide (r ) depends on the states of all the resource managers.
We don’t care.
[ slide 226 ]
Decide (r ) depends on the states of all the resource managers.
We don’t care.
[ slide 227 ]
Decide (r ) depends on the states of all the resource managers.
How can this be implemented?
We don’t care.
[ slide 228 ]
Decide (r ) depends on the states of all the resource managers.
How can this be implemented?
We don’t care.
[ slide 229 ]
Decide (r ) depends on the states of all the resource managers.
We don’t care.
We don’t care.
[ slide 230 ]
Decide (r ) depends on the states of all the resource managers.
We don’t care.
We’re writing a spec of what transaction commit should accomplish, not how
it’s implemented.
[ slide 231 ]
Decide (r ) depends on the states of all the resource managers.
We don’t care.
We’re writing a spec of what transaction commit should accomplish, not how
it’s implemented.
[ slide 232 ]
Let’s take one more look at the original definition of Decide .
[ slide 233 ]
Let’s take one more look at the original definition of Decide .
[ slide 234 ]
Let’s take one more look at the original definition of Decide .
[ slide 235 ]
And in the definition of TCNext replace Decide of r by the disjunction of
DecideC of r and DecideA of r
There are lots of different ways to decompose a next-state formula into
subformulas.
[ slide 236 ]
And in the definition of TCNext replace Decide of r by the disjunction of
DecideC of r and DecideA of r
There are lots of different ways to decompose a next-state formula into
subformulas.
[ slide 237 ]
And in the definition of TCNext replace Decide of r by the disjunction of
DecideC of r and DecideA of r
There are lots of different ways to decompose a next-state formula into
subformulas.
[ slide 238 ]
There are many ways to decompose a
next-state formula into subformulas.
[ slide 239 ]
CHECKING THE SPEC
[ slide 240 ]
In the Toolbox, create a new model for the TCommit spec.
[ slide 241 ]
In the Toolbox, create a new model for the TCommit spec.
[ slide 242 ]
In the Toolbox, create a new model for the TCommit spec.
Click here
[ slide 243 ]
In the Toolbox, create a new model for the TCommit spec.
Click here
for a list of errors.
[ slide 244 ]
In the Toolbox, create a new model for the TCommit spec.
[ slide 245 ]
here.
Since we didn’t use the default names Init and Next for the initial-state and
next-state formulas, you have to enter those names .
[ slide 246 ]
here.
Since we didn’t use the default names Init and Next for the initial-state and
next-state formulas, you have to enter those names .
[ slide 247 ]
here.
Since we didn’t use the default names Init and Next for the initial-state and
next-state formulas, you have to enter those names .
[ slide 248 ]
TCInit
TCNext
here.
Since we didn’t use the default names Init and Next for the initial-state and
next-state formulas, you have to enter those names .
[ slide 249 ]
This error tells us that the model has to provide a value for the declared
constant RM .
[ slide 250 ]
This error tells us that the model has to provide a value for the declared
constant RM .
[ slide 251 ]
Go to the What is the model? area.
And double-click on RM .
[ slide 252 ]
Go to the What is the model? area.
And double-click on RM .
[ slide 253 ]
We now tell the Toolbox what value the model should assign to RM .
[ slide 254 ]
We now tell the Toolbox what value the model should assign to RM .
[ slide 255 ]
We now tell the Toolbox what value the model should assign to RM .
[ slide 256 ]
You should usually start with the smallest possible model, which in this case
means letting the set RM have only a single element.
But this spec is so simple, let’s make it a set of three elements. The actual
elements don’t matter.
[ slide 257 ]
{6, -42, 738}
You should usually start with the smallest possible model, which in this case
means letting the set RM have only a single element.
But this spec is so simple, let’s make it a set of three elements. The actual
elements don’t matter.
[ slide 258 ]
{"r1", "r2", "r3"}
[ slide 259 ]
{"r1", "r2", "r3"}
[ slide 260 ]
We first check that the spec is type correct
by checking that TCTypeOK is an invariant.
[ slide 261 ]
We first check that the spec is type correct
by checking that TCTypeOK is an invariant.
[ slide 262 ]
We first check that the spec is type correct
by checking that TCTypeOK is an invariant.
[ slide 263 ]
A behavior satisfying the spec should terminate
when all RMs have committed or aborted.
As we saw in the SimpleProgram spec of the third video, this means we have
to tell TLC not to check for deadlock.
[ slide 264 ]
A behavior satisfying the spec should terminate
when all RMs have committed or aborted.
As we saw in the SimpleProgram spec of the third video, this means we have
to tell TLC not to check for deadlock.
[ slide 265 ]
A behavior satisfying the spec should terminate
when all RMs have committed or aborted.
So, uncheck this box and click on the green arrow to run TLC.
[ slide 266 ]
A behavior satisfying the spec should terminate
when all RMs have committed or aborted.
So, uncheck this box and click on the green arrow to run TLC.
[ slide 267 ]
TLC should find no errors.
[ slide 268 ]
Be Suspicious of Success
The coverage section reports how many times different subactions of the
next-state formula were used to generate new states.
[ slide 269 ]
Be Suspicious of Success
The coverage section reports how many times different subactions of the
next-state formula were used to generate new states.
[ slide 270 ]
Be Suspicious of Success
The coverage section reports how many times different subactions of the
next-state formula were used to generate new states.
[ slide 271 ]
Be Suspicious of Success
The coverage section reports how many times different subactions of the
next-state formula were used to generate new states.
[ slide 272 ]
Be Suspicious of Success
You can double click on a line to see what subaction it refers to.
A count of zero means that the subaction wasn’t used, which usually means
there’s an error in the spec.
[ slide 273 ]
Be Suspicious of Success
You can double click on a line to see what subaction it refers to.
A count of zero means that the subaction wasn’t used, which usually means
there’s an error in the spec.
[ slide 274 ]
Check the invariance of conditions that should be invariant.
It’s impossible for one resource manager to have aborted and another
resource manager to have committed.
[ slide 275 ]
Check the invariance of conditions that should be invariant.
It’s impossible for one resource manager to have aborted and another
resource manager to have committed.
[ slide 276 ]
Check the invariance of conditions that should be invariant.
It’s impossible for one resource manager to have aborted and another
resource manager to have committed.
[ slide 277 ]
Check the invariance of conditions that should be invariant.
It’s impossible for one resource manager to have aborted and another
resource manager to have committed.
[ slide 278 ]
Add the invariant TCConsistent .
Run TLC on the model.
[ slide 279 ]
Add the invariant TCConsistent .
Run TLC on the model.
[ slide 280 ]
An abbreviation for ∀ r 1 ∈ RM : ∀ r 2 ∈ RM :
Add the invariant TCConsistent .
Run TLC on the model.
[ slide 281 ]
Add the invariant TCConsistent .
Run TLC on the model.
[ slide 282 ]
written ! in C
Add the invariant TCConsistent .
Run TLC on the model.
So, TCConsistent asserts that for all r 1 and r 2 in RM it’s not true that
So, TCConsistent asserts that for all r 1 and r 2 in RM it’s not true that
So, TCConsistent asserts that for all r 1 and r 2 in RM it’s not true that
So, TCConsistent asserts that for all r 1 and r 2 in RM it’s not true that
[ slide 287 ]
Add the invariant TCConsistent .
Run TLC on the model.
[ slide 288 ]
Add the invariant TCConsistent .
Run TLC on the model.
[ slide 289 ]
A PARSING NOTE
[ slide 290 ]
The scope of ∀ and ∃ extends as far as possible.
The expression
∀x ∈ S : ...
For example, this expression extends to the end of its enclosing expression
unless explicitly ended
by enclosing parentheses
[ slide 291 ]
The scope of ∀ and ∃ extends as far as possible.
The expression
∀x ∈ S : ...
For example, this expression extends to the end of its enclosing expression
unless explicitly ended
by enclosing parentheses
[ slide 292 ]
The scope of ∀ and ∃ extends as far as possible.
The expression
∀x ∈ S : ...
For example, this expression extends to the end of its enclosing expression
unless explicitly ended
by enclosing parentheses
[ slide 293 ]
The scope of ∀ and ∃ extends as far as possible.
The expression
(∀x ∈ S : ...)
For example, this expression extends to the end of its enclosing expression
unless explicitly ended
by enclosing parentheses
[ slide 294 ]
The scope of ∀ and ∃ extends as far as possible.
The expression
[r ∈ T 7→ ∀ x ∈ S : . . . ]
For example, this expression extends to the end of its enclosing expression
unless explicitly ended
by enclosing parentheses
[ slide 295 ]
The scope of ∀ and ∃ extends as far as possible.
The expression
∧
∧(∀ x ∈ S : . . .
∧
extends to the end of its enclosing expression
unless explicitly ended
– by parentheses
– or by the end of a list item (which adds implicit parentheses)
[ slide 296 ]
The scope of ∀ and ∃ extends as far as possible.
The expression
∧
∧(∀ x ∈ S : . . . )
∧
extends to the end of its enclosing expression
unless explicitly ended
– by parentheses
– or by the end of a list item (which adds implicit parentheses)
[ slide 297 ]
∀x ∈ S : ...
∧ ∀x ∈ T : ...
[ slide 298 ]
∀x ∈ S : (...
∧ ∀x ∈ T : ...)
[ slide 299 ]
∀x ∈ S : (...
∧ ∧ ∀x ∈ T : ...)
[ slide 300 ]
∀x ∈ S : (...
∧ ∧ ∀x ∈ T : ...)
[ slide 301 ]
∀x ∈ S : (...
∧ ∧ ∀x ∈ T : ...)
[ slide 302 ]
COMMENTS
[ slide 303 ]
TLA+ has two kinds of comments.
[ slide 304 ]
TLA+ has two kinds of comments.
[ slide 305 ]
TLA+ has two kinds of comments.
[ slide 306 ]
TLA+ has two kinds of comments.
[ slide 307 ]
TLA+ has two kinds of comments.
[ slide 308 ]
x’ = x + 1 (*****************************)
(* This is a boxed comment. *)
(* It looks very nice when *)
(* it’s pretty-printed. *)
(*****************************)
It’s easy to type boxed comments using the Toolbox’s editing commands.
[ slide 309 ]
x’ = x + 1 (*****************************)
(* This is a boxed comment. *)
(* It looks very nice when *)
(* it’s pretty-printed. *)
(*****************************)
It’s easy to type boxed comments using the Toolbox’s editing commands.
[ slide 310 ]
x’ = x + 1 (*****************************)
(* This is a boxed comment. *)
(* It looks very nice when *)
(* it’s pretty-printed. *)
(*****************************)
It’s easy to type boxed comments using the Toolbox’s editing commands.
[ slide 311 ]
Typing Boxed Comments
To find out how to type boxed comments, See the Toolbox’s Help pages.
[ slide 312 ]
Typing Boxed Comments
See the Toolbox’s Help.
To find out how to type boxed comments, See the Toolbox’s Help pages.
[ slide 313 ]
Typing Boxed Comments
To find out how to type boxed comments, See the Toolbox’s Help pages.
[ slide 314 ]
Typing Boxed Comments
To find out how to type boxed comments, See the Toolbox’s Help pages.
[ slide 315 ]
Typing Boxed Comments
To find out how to type boxed comments, See the Toolbox’s Help pages.
[ slide 316 ]
Typing Boxed Comments
To find out how to type boxed comments, See the Toolbox’s Help pages.
[ slide 317 ]
Typing Boxed Comments
Open the Toolbox User Guide and find the Editing Modules page.
The Editing Modules page also has lots of other useful information.
[ slide 318 ]
Typing Boxed Comments
Open the Toolbox User Guide and find the Editing Modules page.
The Editing Modules page also has lots of other useful information.
[ slide 319 ]
Typing Boxed Comments
Open the Toolbox User Guide and find the Editing Modules page.
The Editing Modules page also has lots of other useful information.
[ slide 320 ]
Typing Boxed Comments
Open the Toolbox User Guide and find the Editing Modules page.
The Editing Modules page also has lots of other useful information.
[ slide 321 ]
Typing Boxed Comments
Open the Toolbox User Guide and find the Editing Modules page.
The Editing Modules page also has lots of other useful information.
[ slide 322 ]
A separator line:
--------------------------------------
Purely decorative.
You can make a spec easier to read by adding horizontal separator lines like
this.
[ slide 323 ]
A separator line:
--------------------------------------
Purely decorative.
You can make a spec easier to read by adding horizontal separator lines like
this.
[ slide 324 ]
A separator line:
--------------------------------------
Purely decorative.
You can make a spec easier to read by adding horizontal separator lines like
this.
[ slide 325 ]
The specification of Transaction Commit, like the Die Hard specification, is
very simple. But it moved us a tiny bit closer to real computer systems. And
you’ve now learned a lot of the TLA+ you need to specify those systems.
[ slide 326 ]
TLA+ Video Course
End of Lecture 5
TRANSACTION COMMIT
[ slide 327 ]