-
Notifications
You must be signed in to change notification settings - Fork 2
/
smintla.html
379 lines (327 loc) · 17.6 KB
/
smintla.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
<!-- THIS FILE BEGAN AS A COPY OF mooc/prop-logic/intro.html .
It will be transformed little by little into the true html file
for the smintla video.
-->
<!DOCTYPE html>
<html>
<head>
<!--************************************************************************
* The following imported JavaScript code is involved in copying text into *
* the copy buffer and was obtained from *
* *
* https://clipboardjs.com/ *
* *
* Note that the directory /dist that contains the clipboard.min.js file *
* must be moved to the right place and the src address corrected. *
*************************************************************************-->
<script src="dist/clipboard.min.js">
</script>
<script>
/***************************************************************************
* DATA FOR THE LECTURE *
* *
* The following data customizes the page for a particular video. *
***************************************************************************/
/***************************************************************************
* The name of the lecture. *
***************************************************************************/
var HEADING = "State Machines in TLA+" ;
/***************************************************************************
* Table of Contents *
* *
* Specified by an array, each element of which is a two-element array A *
* with A[0] the name of a section and A[1] the time in seconds at which *
* the section of the video begins. *
***************************************************************************/
var tocData =
[["Prologue", 4.5],
["What Language Should We Use?", 26],
["Describing a State Machine with Math", 152],
["A Nicer Way to Write the Next-State Formula", 530],
["The Complete TLA+ Spec", 761],
["Decomposing Large Specs", 839],
["Epilogue", 908.5]
] ;
/***************************************************************************
* Items Displayed at Specified Times *
* *
* An array that specifies when items are to be displayed in the Bottom *
* Section of the page. Each element of the array is 3-element array A *
* where A[0] is the id of the item, which is to be displayed from time *
* A[1] through A[2] (in seconds) of the video. *
* *
* The the same id should not appear twice in the ids the elements of *
* timingData, and each of those ids should be the same as the id of one *
* of the <div> elements in in the Bottom Section of the page, which are *
* children the <div> element with id "afterVideo". *
* *
* Note: Putting something at the very end isn't a great idea because on *
* IE, if the user seeks to the end of the video, IE acts as if it's at *
* the beginning and doesn't display something that comes at the end. *
***************************************************************************/
var timingData =
[["begin-title", 0, 4],
["end-title", 937, 2000]
] ;
</script>
<script src=tlavideo.js> </script>
<title id="titleId"></title> <!-- title set by createHeading() -->
<!-- The following loads the style sheet for the html files of the videos -->
<link rel="stylesheet" type="text/css" href="tlastyles.css">
</head>
<body onresize="getVideoMag()">
<!--************************************************************************
* The body consists of the following sections: *
* - The heading section. *
* - The video section. *
* - The bottom section. *
*************************************************************************-->
<!--************************************************************************
* The Heading Section *
* *
* It consists of a single <div> element with id "headingId". It contains *
* the name of the lecture. This section is made invisible when the *
* video is in normal playing mode - that is, with videoState = "playing" *
* and timedItemDue = "false". *
*************************************************************************-->
<div id="headingId" style="display:block">
<!-- The lecture name. -->
<div style="float:left;width:335px">
<H1 id="h1Id" style="margin-top:0em;margin-bottom:.5em">
</H1>
</div>
<script> createHeading() </script>
</div>
<!--************************************************************************
* The Video Section *
* *
* This is a <div> item containing two subitems: a <video> item that *
* displays the video and a <div> item that contains the following items: *
* *
* - The controls for the video's playing size. *
* - Controls for skipping backwards and forwards in the video. *
*************************************************************************-->
<div style="display:block;clear:left">
<!--*********************************************************************
* The <video> element. *
**********************************************************************-->
<video onpause="pauseEvent()"
onplay="playEvent()"
onfocus="videoGetsFocus()"
width=450
height=256
controls
preload = "auto"
id="videoId">
<!--********************************************************************
* The src field of the following <source> tag is the URL of the video. *
*********************************************************************-->
<!-- Here is the local copy of the original
<source src= "smintla.mp4">
-->
<!-- Here is the Channel 9 streaming copy of the original
<source src= "smintla.mp4">
-->
<!-- Here is new Channel 9 copy provided by Golnaz Alibeigi -->
<source
src="smintla.mp4">
<!-- Here is the medium resolution version at Channel 9
<source src= "smintla.mp4">
-->
Your browser cannot display this lecture because it does not
support the video HTML tag.
</video>
<!--*********************************************************************
* A <div> containing items displayed on a line below the video. *
* *
* One possibility is to remove the controls from the video itself and *
* replace them with the items displayed here plus some other controls. *
* The controls could also be moved to be on top of the video, and to *
* be made visible for a few seconds when the mouse is moved over (and *
* perhaps out of) the video. This would make it possible to prevent *
* the user from putting the video into full-screen mode. *
**********************************************************************-->
<div id="below-video">
<!--*******************************************************************
* A span for showing the controls for skipping forward and back in *
* the video and the "Speed", "Contents" and "How to View" buttons. *
* It is created by a tlavideo.jss function. *
********************************************************************-->
</div>
</div>
<!--************************************************************************
* The Bottom Section *
* *
* A <div> HTML element with id "afterVideo". It normally contains the *
* table of contents when the video is not in normal playing mode. *
* However, at certain parts of the video, it will be replaced by material *
* relevant to that part. That material will consist of a sequence of *
* <div> elements, identified by their ids. *
* *
* The sequence of <div> elements consists of one with id "tocId" followed *
* by a sequence of elements whose ids are in 1-1 correspondence with the *
* ids in timingData. *
*************************************************************************-->
<div id="afterVideo" style="display:block">
<!--*********************************************************************
* A <div> element containing the table of contents, which is created *
* dynamically by the createContents JavaScript function *
**********************************************************************-->
<div id="tocId" style="float:left"></div>
<script> createContents("tocId", tocData) ; </script>
</div>
<div id="rightBottom" style="display:block" >
<!--********************************************************************
* Next comes the sequence of items that are to appear, with the video *
* minimized, at certain points in the video. The timingData variable *
* specifies at what point in the video they appear. *
*********************************************************************-->
<!--*********************************************************************
* This is the call-out to appear at the beginning of the video. *
**********************************************************************-->
<div id = "begin-title" style="float:left">
<div style =
"float:left;margin-left:-20px;font-size:20px;font-family:Calibri">
<h3 class="contents">Lecture 2</h3>
<p style="margin-left:2em;margin-top:-1em;width:15em">
Web page:
25 November 2017<BR>
Video:
30 August 2021
</p>
</div>
<div id = "item0a" style = "float:left;margin-left:-4em">
<script> createContents("item0a", tocData) ;
</script>
</div>
</div>
<!--********************************************************************
* The "Who am I?" call-out. *
<div id = "who-am-i" style="float:left">
<div style =
"float:left;margin-left:10px;font-size:20px;font-family:Calibri">
<h3 style="margin-bottom:30px">Find Leslie Lamport on the Web</h3>
<p style="margin-left:2em;margin-top:-1em;width:15em">
<p>
<pre> <a href="https://www.google.com/?gfe_rd=cr&ei=1qcVWJ7VOqqG8QeLnrbADQ&gws_rd=ssl#q=leslie+lamport"
target="_blank">On Google</a> <a href="http://www.bing.com/search?q=leslie+lamport&qs=n&form=QBLH&pq=leslie+lamport&sc=0-0&sp=-1&sk=&cvid=3F8AB05C0F734A209F95F97B8FD197F2"
target="_blank">On Bing</a>
</pre>
</div>
</div>
*********************************************************************-->
<!--********************************************************************
* The "Time Clocks" call-out. *
<div id = "time-clocks" style="float:left">
<div style =
"float:left;margin-left:10px;font-size:20px;font-family:Calibri">
<h4 style="margin-bottom:-15px">Time, Clocks, and the Ordering of Events in a
Distributed System</h4>
<p style="margin-left:0px;margin-top:0x;line-height:140%">
Leslie Lamport<br>
<i>Communications of the ACM</i><br>
July 1978, Volume 21, Number 7, pages 558-565<br>
<A href="https://www.microsoft.com/en-us/research/publication/time-clocks-ordering-events-distributed-system/?from=https%3A%2F%2Fresearch.microsoft.com%2Fen-us%2Fum%2Fpeople%2Flamport%2Fpubs%2Ftime-clocks.pdf"
target="_blank">Download</a>
</p>
</div>
</div>
*********************************************************************-->
<!--********************************************************************
* The "Amazon Paper" call-out. *
<div id = "amazon-paper" style="float:left">
<div style =
"float:left;margin-left:10px;font-size:20px;font-family:Calibri">
<h4 style="margin-bottom:-15px">How Amazon Web
Services Uses Formal Methods</h4>
<p style="margin-left:0px;margin-top:0x;line-height:140%">
Chris Newcombe et al.<br>
<i>Communications of the ACM</i><br>
April 2015, Volume 58, Number 4, pages 66-73<br>
<A href="http://cacm.acm.org/magazines/2015/4/184701-how-amazon-web-services-uses-formal-methods/abstract"
target="_blank">Available from the ACM</a>
</p>
</div>
</div>
*********************************************************************-->
<!--*********************************************************************
* The display at the end of the video. *
**********************************************************************-->
<div id = "end-title" style="float:left">
<div id = "item0b" style = "float:left">
<script> createContents("item0b", tocData) ; </script>
</div>
<div style =
"float:left;margin-left:10px;font-size:20px;font-family:Calibri">
<h3 class="contents"> The Next Video</h3>
<p style="margin-left:2em;margin-top:-1em;width:15em">
<!-- The following href must be changed for the local copy -->
<A href="video3.html">Resources and Tools</a>
</p>
</div>
</div>
<!-- HERE IS AN EXAMPLE OF DISPLAYING TEXXT TO BE COPIED
<div id="item3" style="position:relative;top:2em;left:6em;width:60em">
<font style="font-size:17px;font-family:sans-serif">
<div style="width:15em;float:left;">
A tutorial might ask you to copy and paste a specification
like this one:
<div style="padding-left:3em;padding-top:.5em">
<pre class="copyText" id="bar">
MODULE DieHard
(***************************************************************************)
(* In the movie Die Hard J1, the heros must obtain exactly 4 gallons of *)
(* water using a J2 gallon jug, a J1 gallon jug, and a water faucet. Our *)
(* goal: to get TLC to solve the problem for us. *)
(* *)
(* First, we write a spec that describes all allowable behaviors of our *)
(* heros. *)
(***************************************************************************)
EXTENDS Integers
(*************************************************************************)
(* This statement imports the definitions of the ordinary operators on *)
(* integers, such as +. *)
(*************************************************************************)
CONSTANTS J1, J2, G
=============================================================================
</pre>
<button class="btn" data-clipboard-target="#bar">
Copy Text
</button>
</div>
</div>
<div style="float:left;width:20em;padding-left:3em">
Stop the video and copy this specification, either by
clicking on the button or by the usual way of copying
text. If you
paste it into a model editor in the Toolbox, it will appear
in a normal size. If you paste it into another text editor,
you may have to
increase the text's font size to make it readable.
</div>
</font>
</div>
-->
<!-- HERE IS AN EXAMPLE OF OPENING A VIDEO IN A NEW WINDOW
<div id="item2" style="position:relative; top:1em;left:4em">
<div style="text-align:left;width:30em">
<font style="font-size:19px;font-family:sans-serif">
<A href="summary-standalone.pdf" target=_blank>
<b>The TLA+ "Cheat Sheet"</b></font>
</A>
<p style="font-size:18px;font-family:sans-serif">
Left-click to open it in a new window,
or right-click <br> and select
<i>Save as ...</i>
to download it.
</p>
</div>
</div>
-->
<!--**********************************************************************
* This is the end of the sequence of <div> items that are to be *
* displayed at specified points in the video. *
***********************************************************************-->
</div>
</body>
</html>