-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
487 lines (456 loc) · 18.6 KB
/
index.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
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Learn Equivalences</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 60px;
}
</style>
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />
<link rel="stylesheet" type="text/css" media="print" href="assets/css/print.css" />
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- The templates -->
<script id="comboNodeTemplate" type="text/template">
<%
if (left != null) {
var leftNotHigher = left.get("precedence") <= precedence;
if (leftNotHigher) print("(");
print("<span class=\"left\"></span>");
if (leftNotHigher) print(")");
}
%>
<span class="symbol"><%= symbol %><% if (variable) { print(variable); } else if (terms) { print("("+terms + ")")} %></span>
<%
if (right != null) {
// If binary node then brackets when rightNotHigher, with unary node, it needs to be strictly less
brackets = (left != null ? right.get("precedence") <= precedence : right.get("precedence") < precedence);
if (brackets) print("(");
print("<span class=\"right\"></span>");
if (brackets) print(")");
}
%>
</script>
<script id="stepSetTemplate" type="text/template">
<ul class="stepSet"></ul>
</script>
<script id="answerStepTemplate" type="text/template">
<span class="stepNo"><%= no %>) </span>
<small><%= rule %><% if (from !== null) print("<span class=\"stepFrom\"> (" + from + ")</span>"); %></small>
</script>
<script id="equivalenceRuleTemplate" type="text/template">
<a href="#"><%= rule %></a>
</script>
<script id="newExerciseModalTemplate" type="text/template">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Enter a new exercise</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<label class="control-label" for="">Exercise Generator</label>
<div class="controls connective-toolbar btn-toolbar">
<div class="btn-group" data-toggle="buttons-radio">
<button type="button" class="btn active" value="Easy">Easy</button>
<button type="button" class="btn" value="Medium">Medium</button>
<button type="button" class="btn" value="Hard">Hard</button>
</div>
<div class="btn-group" data-toggle="buttons-radio">
<button type="button" class="btn active" value="Propositional">Propositional</button>
<button type="button" class="btn" value="Predicate">Predicate</button>
</div>
<p class="help-block">Choose a difficulty and exercise type and click the button below to automatically generate an exercise.</p>
<button type="button" class="btn btn-info">Generate Exercise</button>
</div>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-close" data-dismiss="modal">Close</button>
<button class="btn btn-success">Start</button>
</div>
</script>
<script id="newEqRuleModalTemplate" type="text/template">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Enter a new equivalence rule</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<label class="control-label" for="optionsCheckboxList">Options</label>
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="bidirectionalCheckbox" value="bidirectional" checked>
Bidirectional
</label>
<label class="checkbox">
<input type="checkbox" name="freeVarCheckbox" value="freeVarCheck">
Free Variable Check
</label>
</div>
</div>
<div class="control-group freeVarCheckInput hide">
<label class="control-label" for="freeVarCheckVars">Variables</label>
<div class="controls">
<input type="text" class="input-xlarge" id="freeVarCheckVars">
<p class="help-block">Enter a comma separated list of the quantifier variable(s) that cannot occur free and specify, in the same order below, the subformula(e) in which the corresponding variable cannot occur free.</p>
</div>
</div>
<div class="control-group freeVarCheckInput hide">
<label class="control-label" for="freeVarCheckSubFs">Subformulae</label>
<div class="controls">
<input type="text" class="input-xlarge" id="freeVarCheckSubFs">
</div>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-close" data-dismiss="modal">Close</button>
<button class="btn btn-success">Add</button>
</div>
</script>
<script id="eqRuleDirChooseModalTemplate" type="text/template">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Do you want to use the rule from ltr or from rtl?</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<label class="control-label" for="">Selected sub-formula</label>
<div class="controls">
<p class="rule text-block"><%= node %></p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="">Rule</label>
<div class="controls">
<p class="rule text-block"><%= rule %></p>
<% if (!fwdResult) { %>
<p class="help-block">The ltr application of this rule requires the introduction of <% if (!fwdMultipleSymbols) { print("a"); } %> formula<% if (fwdMultipleSymbols) { print("e"); } %> for the symbol<% if (fwdMultipleSymbols) { print("s"); } %>: <%= fwdIntroSymbolsCS %></p>
<% } %>
<% if (!bwdResult) { %>
<p class="help-block">The rtl application of this rule requires the introduction of <% if (!bwdMultipleSymbols) { print("a"); } %> formula<% if (bwdMultipleSymbols) { print("e"); } %> for the symbol<% if (bwdMultipleSymbols) { print("s"); } %>: <%= bwdIntroSymbolsCS %></p>
<% } %>
</div>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-close" data-dismiss="modal">Close</button>
<button class="btn btn-success" <% if(!fwdResult) print("disabled") %>>LTR</button>
<button class="btn btn-info" <% if(!bwdResult) print("disabled") %>>RTL</button>
</div>
</script>
<script id="wffIntroModalTemplate" type="text/template">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Please enter the wff<% if (multipleSymbols) { print("s"); } %> you would like to introduce.</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<label class="control-label" for="">Selected sub-formula</label>
<div class="controls">
<p class="rule text-block"><%= node %></p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="">Rule</label>
<div class="controls">
<p class="rule text-block"><%= rule %> <%= direction %></p>
<p class="help-block">The <%= direction %> application of this rule requires the introduction of <% if (!multipleSymbols) { print("a"); } %> formula<% if (multipleSymbols) { print("e"); } %> for the symbol<% if (multipleSymbols) { print("s"); } %>: <%= introSymbolsCS %></p>
</div>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-close" data-dismiss="modal">Close</button>
<button class="btn btn-success" disabled>OK</button>
</div>
</script>
<script id="subFIntroFormBlockTemplate" type="text/template">
<label class="control-label" for="new-wff-<%= i %>"><%= label %></label>
<div class="controls">
<div <% if (showIntroduce) { %> class="input-append" <% } %>>
<input type="text" class="input-xlarge" id="new-wff-<%= i %>" <% if (value) print("value=\"" + value + "\""); %>><% if (showIntroduce) { %><button class="btn introduce-wff" type="button">Introduce</button><% } %>
</div>
<p class="help-block"></p>
</div>
</script>
<script id="variableIntroFormBlockTemplate" type="text/template">
<label class="control-label" for="new-var-<%= i %>"><%= label %></label>
<div class="controls">
<div class="input-append">
<input type="text" class="input-xlarge" id="new-var-<%= i %>">
<p class="help-block"></p>
</div>
</div>
</script>
<script id="wffFormBlockTemplate" type="text/template">
<label class="control-label" for=""><%= label %></label>
<div class="controls">
<p class="rule text-block"><%= node %></p>
</div>
</script>
<script id="writeNextStepModalTemplate" type="text/template">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Please enter the next step you would like to add</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<label class="control-label" for="">From Step</label>
<div class="controls">
<p class="rule text-block"><%= lastStep %></p>
</div>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-close" data-dismiss="modal">Close</button>
<button class="btn btn-success" disabled>OK</button>
</div>
</script>
<script id="renameVariableModalTemplate" type="text/template">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Please enter the replacement for variable <%= variableToReplace %></h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<fieldset>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-close" data-dismiss="modal">Close</button>
<button class="btn btn-success">OK</button>
</div>
</script>
<script id="connectiveToolbarTemplate" type="text/template">
<label class="control-label" for="">Insert symbols</label>
<div class="controls connective-toolbar btn-toolbar">
<div class="btn-group">
<button class="btn not">¬</button>
<button class="btn and">∧</button>
<button class="btn or">∨</button>
<button class="btn imply">→</button>
<button class="btn dimply">↔</button>
</div>
<div class="btn-group">
<button class="btn contradiction">⊥</button>
<button class="btn tautology">⊤</button>
</div>
<div class="btn-group">
<button class="btn universal">∀</button>
<button class="btn existensial">∃</button>
</div>
<p class="help-block">Click on a connective to insert it into the active input area immediately after the cursor.</p>
</div>
</script>
<script id="alertTemplate" type="text/template">
<% if (closable) { %>
<a class="close" data-dismiss="alert" href="#">×</a>
<% } %>
<h4 class="alert-heading"><%= heading %></h4>
<%= body %>
</script>
<script id="exerciseTemplate" type="text/template">
<div class="exerciseHeader">
<div class="btn-group pull-right">
<button class="btn btn-inverse btn-hint"><i class="icon-question-sign icon-white"></i> Hint</button>
<button class="btn btn-inverse btn-unstack" <% if(!unstackAvailable) print("disabled"); %>><i class="icon-remove-sign icon-white"></i> Delete Step</button>
<button class="btn btn-inverse btn-undo" <% if(!undoAvailable) print("disabled"); %>><i class="icon-circle-arrow-left icon-white"></i> Undo Delete</button>
</div>
<h1>Exercise <small><%= exerciseString %></small></h1>
</div>
</script>
<script id="solutionTemplate" type="text/template">
<div class="exerciseHeader">
<h1>Solution <small><%= exerciseString %></small></h1>
</div>
</script>
<script id="exerciseListItemTemplate" type="text/template">
<a href="#"><%= exercise %></a>
</script>
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Learn Equivalences</a>
<div id="userManagerView" class="dropdown pull-right">
<a class="btn dropdown-toggle" href="#" data-toggle="dropdown"><i class="icon-user"></i> <span id="userManagerBtnText">Login</span> <span class="caret"></span></a>
<div class="dropdown-menu">
<div id="loginDropdown">
<h4>Sign In</h4>
<form accept-charset="UTF-8">
<div class="control-group">
<label for="loginUsername">Username</label>
<input id="loginUsername" type="text" name="user[username]" size="30" />
<p class="help-block hide"></p>
</div>
<div class="control-group">
<label for="loginPassword">Password</label>
<input id="loginPassword" type="password" name="user[password]" size="30" />
<p class="help-block hide"></p>
</div>
<p id="loginGeneralError"></p>
<input id="userManagerLoginBtn" class="btn btn-info pull-right" type="submit" name="submit" value="Login" />
</form>
<a id="userManagerRegisterBtn" class="pull-right" href="#">Register</a>
</div>
<ul id="logoutDropdown" class="hide">
<li><a id="userManagerLogoutBtn" href="#">Log Out</a></li>
</ul>
</div>
</div>
<div class="nav-collapse">
<ul class="nav">
<li><a href="#" id="newExerciseBtn"><i class="icon-plus-sign icon-white"></i> New Exercise</a></li>
<li><a href="#about">About</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container-fluid" id="mainAppContainer">
<div class="row-fluid" id="mainAppRow">
<div class="span3">
<div class="well sidebar-nav" id="eqRulesListContainer">
<ul id="eqRulesList" class="nav nav-list">
<li class="nav-header" id="newEqRuleBtn">Add New Rule</li>
</ul>
</div><!--/.well -->
</div><!--/span 1st col-->
<div class="span9">
<div class="row-fluid" id="mainContent">
<div class="span7" id="exercise-view"></div>
<div class="span5" id="treeVisView">
<ul class="nav nav-pills" id="exTreeTabs">
<li class="active"><a href="#treeVisSvgs" data-toggle="tab">Tree View</a></li>
<li><a href="#exercisesListView" data-toggle="tab">Exercises</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="treeVisSvgs">
<div id="inputSetTreeView"></div>
<div id="goalSetTreeView"></div>
</div>
<ul class="tab-pane" id="exercisesListView"></ul>
</div>
</div>
</div>
</div><!-- end big col -->
</div><!--/mainAppRow-->
<!-- would put footer with row-fluid class here -->
</div><!--/.fluid-container-->
<div id="newExerciseModal" class="modal hide fade"></div>
<div id="eqRuleDirChooseModal" class="modal hide fade"></div>
<div id="wffIntroModal" class="modal hide fade"></div>
<div id="writeNextStepModal" class="modal hide fade"></div>
<div id="renameVariableModal" class="modal hide fade"></div>
<div id="newEqRuleModal" class="modal hide fade"></div>
<div id="newUserModal" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Choose your username and password.</h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<fieldset>
<div class="control-group">
<label class="control-label" for="registerUsername">Username</label>
<div class="controls">
<div class="input-append">
<input type="text" class="input-xlarge" id="registerUsername"><button id="registerUserAvailBtn" class="btn" type="button">Check</button>
</div>
<p class="help-block"></p>
</div>
</div>
<div class="control-group">
<label class="control-label" for="registerPassword">Password</label>
<div class="controls">
<input type="password" class="input-xlarge" id="registerPassword">
<p class="help-block"></p>
</div>
</div>
<div class="control-group hide">
<label class="control-label" for="registerPasswordConf">Confirm Password</label>
<div class="controls">
<input type="password" class="input-xlarge" id="registerPasswordConf">
<p class="help-block"></p>
</div>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-close" data-dismiss="modal">Close</button>
<button class="btn btn-primary">Register</button>
</div>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="assets/js/lib/json2.js"></script>
<script src="assets/js/lib/jquery-1.7.2.js"></script>
<script src="assets/js/lib/jquery.cookie.js"></script>
<script src="assets/js/lib/d3.v2.js"></script>
<script src="assets/js/lib/SortedList/SortedList.js"></script>
<script src="assets/js/bootstrap-transition.js"></script>
<script src="assets/js/bootstrap-alert.js"></script>
<script src="assets/js/bootstrap-modal.js"></script>
<script src="assets/js/bootstrap-dropdown.js"></script>
<script src="assets/js/bootstrap-tab.js"></script>
<script src="assets/js/bootstrap-tooltip.js"></script>
<script src="assets/js/bootstrap-button.js"></script>
<script src="assets/js/bootstrap-collapse.js"></script>
<script src="assets/js/lib/underscore-1.3.3.js"></script>
<script src="assets/js/lib/backbone-0.9.2.js"></script>
<script src="assets/js/treeStructures.js"></script>
<script src="assets/js/treeStructuresNormalObj.js"></script>
<script src="assets/js/parser.js"></script>
<script src="assets/js/equivalenceRules.js"></script>
<script src="assets/js/modals.js"></script>
<script src="assets/js/exercises.js"></script>
<script src="assets/js/treeVisIntegrated.js"></script>
<script src="assets/js/users.js"></script>
<script src="assets/js/learnEquivalences.js"></script>
<script src="assets/js/proof.js"></script>
</body>
</html>