forked from thetrime/proscript
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
498 lines (488 loc) · 35.7 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
488
489
490
491
492
493
494
495
496
497
<html lang="en">
<head>
<title>
ProscriptLS
</title>
<link rel="stylesheet" href="docs/index.css"/>
<script type="text/javascript" src="dist/proscriptls.js"></script>
<!-- proscriptls interpreter
<script src="terminal/jquery-3.3.1.js"></script>
<script src="terminal/jquery_terminal.js"></script>
<link href="terminal/jquery_terminal.css" rel="stylesheet"/>
-->
</head>
<body onload="proscriptls_init ();">
<!-- Side navigation -->
<ul class="sidenav">
<li><span class="caret"></span>
<a class="active index" id="home_index" href="#home"> Home </a>
<ul class='nested'>
<li><a class="index" id="prolog-for-the-web_index" href="#prolog-for-the-web"> Prolog for the Web </a></li>
<li><a class="index" id="running-proscriptls_index" href="#running-proscriptls"> Running ProscriptLS </a></li>
<li><a class="index" id="compiling-proscriptls_index" href="#compiling-proscriptls"> Compiling ProscriptLS </a></li>
<li><a class="index" id="basic-example_index" href="#basic-example"> Basic Example </a></li>
</ul>
</li>
<li><span class="caret"></span><a id="doc_index" href="docs/index_doc.html#doc"> Documentation </a>
<ul class='nested'>
<li><span class="caret"></span><a id="reference_index" href="docs/index_doc.html#reference"> Reference </a>
<ul class='nested'>
<li><a id="using_proscriptls_index" href="docs/index_doc.html#using_proscriptls"> Using ProscriptLS </a></li>
<li><a id="debugger_index" href="docs/index_doc.html#debugger"> Debugger </a></li>
<li><span class="caret"></span><a id="objects_index" href="docs/index_doc.html#objects"> Javascript objects </a>
<ul class='nested'>
<li><span class="caret"></span><a id="web_api_index" href="docs/index_doc.html#web_api"> Web API </a>
<ul class='nested'>
<li><a id="api_barprop_index" href="docs/index_doc.html#api_barprop"> BarProp </a></li>
<li><a id="api_blob_index" href="docs/index_doc.html#api_blob"> Blob </a></li>
<li><a id="api_canvasgradient_index" href="docs/index_doc.html#api_canvasgradient"> CanvasGradient </a></li>
<li><a id="api_canvaspattern_index" href="docs/index_doc.html#api_canvaspattern"> CanvasPattern </a></li>
<li><a id="api_canvasrenderingcontext2d_index" href="docs/index_doc.html#api_canvasrenderingcontext2d"> CanvasRenderingContext2D </a></li>
<li><a id="api_cssrule_index" href="docs/index_doc.html#api_cssrule"> CSSRule </a></li>
<li><a id="api_cssstyledeclaration_index" href="docs/index_doc.html#api_cssstyledeclaration"> CSSStyleDeclaration </a></li>
<li><a id="api_customelementregistry_index" href="docs/index_doc.html#api_customelementregistry"> CustomElementRegistry </a></li>
<li><a id="api_document_index" href="docs/index_doc.html#api_document"> Document </a></li>
<li><a id="api_documentfragment_index" href="docs/index_doc.html#api_documentfragment"> DocumentFragment </a></li>
<li><a id="api_element_index" href="docs/index_doc.html#api_element"> Element </a></li>
<li><a id="api_elementcreationoptions_index" href="docs/index_doc.html#api_elementcreationoptions"> ElementCreationOptions </a></li>
<li><a id="api_event_index" href="docs/index_doc.html#api_event"> Event </a></li>
<li><a id="api_eventtarget_index" href="docs/index_doc.html#api_eventtarget"> EventTarget </a></li>
<li><a id="api_file_index" href="docs/index_doc.html#api_file"> File </a></li>
<li><a id="api_history_index" href="docs/index_doc.html#api_history"> History </a></li>
<li><a id="api_htmlcanvaselement_index" href="docs/index_doc.html#api_htmlcanvaselement"> HTMLCanvasElement </a></li>
<li><a id="api_htmlelement_index" href="docs/index_doc.html#api_htmlelement"> HTMLElement </a></li>
<li><a id="api_htmlformelement_index" href="docs/index_doc.html#api_htmlformelement"> HTMLFormElement </a></li>
<li><a id="api_htmlimageelement_index" href="docs/index_doc.html#api_htmlimageelement"> HTMLImageElement </a></li>
<li><a id="api_htmlinputelement_index" href="docs/index_doc.html#api_htmlinputelement"> HTMLInputElement </a></li>
<li><a id="api_htmloptionelement_index" href="docs/index_doc.html#api_htmloptionelement"> HTMLOptionElement </a></li>
<li><a id="api_htmlselectelement_index" href="docs/index_doc.html#api_htmlselectelement"> HTMLSelectElement </a></li>
<li><a id="api_htmltextareaelement_index" href="docs/index_doc.html#api_htmltextareaelement"> HTMLTextAreaElement </a></li>
<li><a id="api_htmlunknownelement_index" href="docs/index_doc.html#api_htmlunknownelement"> HTMLUnknownElement </a></li>
<li><a id="api_imagedata_index" href="docs/index_doc.html#api_imagedata"> ImageData </a></li>
<li><a id="api_location_index" href="docs/index_doc.html#api_location"> Location </a></li>
<li><a id="api_mouseevent_index" href="docs/index_doc.html#api_mouseevent"> MouseEvent </a></li>
<li><a id="api_navigator_index" href="docs/index_doc.html#api_navigator"> Navigator </a></li>
<li><a id="api_navigatorcontentutils_index" href="docs/index_doc.html#api_navigatorcontentutils"> NavigatorContentUtils </a></li>
<li><a id="api_navigatorcookies_index" href="docs/index_doc.html#api_navigatorcookies"> NavigatorCookies </a></li>
<li><a id="api_navigatorid_index" href="docs/index_doc.html#api_navigatorid"> NavigatorID </a></li>
<li><a id="api_navigatorlanguage_index" href="docs/index_doc.html#api_navigatorlanguage"> NavigatorLanguage </a></li>
<li><a id="api_navigatoronline_index" href="docs/index_doc.html#api_navigatoronline"> NavigatorOnLine </a></li>
<li><a id="api_node_index" href="docs/index_doc.html#api_node"> Node </a></li>
<li><a id="api_parentnode_index" href="docs/index_doc.html#api_parentnode"> ParentNode </a></li>
<li><a id="api_path2d_index" href="docs/index_doc.html#api_path2d"> Path2D </a></li>
<li><a id="api_storage_index" href="docs/index_doc.html#api_storage"> Storage </a></li>
<li><a id="api_textmetrics_index" href="docs/index_doc.html#api_textmetrics"> TextMetrics </a></li>
<li><a id="api_uievent_index" href="docs/index_doc.html#api_uievent"> UIEvent </a></li>
<li><a id="api_uint8clampedarray_index" href="docs/index_doc.html#api_uint8clampedarray"> Uint8ClampedArray </a></li>
<li><a id="api_validitystate_index" href="docs/index_doc.html#api_validitystate"> ValidityState </a></li>
<li><a id="api_window_index" href="docs/index_doc.html#api_window"> Window </a></li>
<li><a id="api_windowlocalstorage_index" href="docs/index_doc.html#api_windowlocalstorage"> WindowLocalStorage </a></li>
<li><a id="api_windoworworkerglobalscope_index" href="docs/index_doc.html#api_windoworworkerglobalscope"> windowOrWorkerGlobalScope </a></li>
<li><a id="api_windowsessionstorage_index" href="docs/index_doc.html#api_windowsessionstorage"> WindowSessionStorage </a></li>
</ul>
</li>
<li><a id="object_language_index" href="docs/index_doc.html#object_language"> Object Language </a></li>
</ul>
</li>
<li><a id="library_index" href="docs/index_doc.html#library"> Library </a></li>
<li><a id="compilation_index" href="docs/index_doc.html#compilation"> Compilation </a></li>
<li><a id="syntax_index" href="docs/index_doc.html#syntax"> Syntax </a></li>
<li><span class="caret"></span><a id="predicates_index" href="docs/index_doc.html#predicates"> Predicates </a>
<ul class='nested'>
<li><span class="caret"></span><a id="pred_cat_arithmetic_index" href="docs/index_doc.html#pred_cat_arithmetic"> arithmetic </a>
<ul class='nested'>
<li><a id="pred_<_2_index" href="docs/index_doc.html#pred_<_2"> (<)/2 </a></li>
<li><a id="pred_=:=_2_index" href="docs/index_doc.html#pred_=:=_2"> (=:=)/2 </a></li>
<li><a id="pred_=<_2_index" href="docs/index_doc.html#pred_=<_2"> (=<)/2 </a></li>
<li><a id="pred_=\=_2_index" href="docs/index_doc.html#pred_=\=_2"> (=\=)/2 </a></li>
<li><a id="pred_>_2_index" href="docs/index_doc.html#pred_>_2"> (>)/2 </a></li>
<li><a id="pred_>=_2_index" href="docs/index_doc.html#pred_>=_2"> (>=)/2 </a></li>
<li><a id="pred_is_2_index" href="docs/index_doc.html#pred_is_2"> (is)/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_atomic_term_processing_index" href="docs/index_doc.html#pred_cat_atomic_term_processing"> atomic term processing </a>
<ul class='nested'>
<li><a id="pred_atom_chars_2_index" href="docs/index_doc.html#pred_atom_chars_2"> atom_chars/2 </a></li>
<li><a id="pred_atom_codes_2_index" href="docs/index_doc.html#pred_atom_codes_2"> atom_codes/2 </a></li>
<li><a id="pred_atom_concat_3_index" href="docs/index_doc.html#pred_atom_concat_3"> atom_concat/3 </a></li>
<li><a id="pred_atom_length_2_index" href="docs/index_doc.html#pred_atom_length_2"> atom_length/2 </a></li>
<li><a id="pred_char_code_2_index" href="docs/index_doc.html#pred_char_code_2"> char_code/2 </a></li>
<li><a id="pred_gensym_2_index" href="docs/index_doc.html#pred_gensym_2"> gensym/2 </a></li>
<li><a id="pred_number_chars_2_index" href="docs/index_doc.html#pred_number_chars_2"> number_chars/2 </a></li>
<li><a id="pred_number_codes_2_index" href="docs/index_doc.html#pred_number_codes_2"> number_codes/2 </a></li>
<li><a id="pred_sub_atom_5_index" href="docs/index_doc.html#pred_sub_atom_5"> sub_atom/5 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_byte_io_index" href="docs/index_doc.html#pred_cat_byte_io"> byte io </a>
<ul class='nested'>
<li><a id="pred_get_byte_2_index" href="docs/index_doc.html#pred_get_byte_2"> get_byte/2 </a></li>
<li><a id="pred_peek_byte_2_index" href="docs/index_doc.html#pred_peek_byte_2"> peek_byte/2 </a></li>
<li><a id="pred_put_byte_2_index" href="docs/index_doc.html#pred_put_byte_2"> put_byte/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_character_io_index" href="docs/index_doc.html#pred_cat_character_io"> character io </a>
<ul class='nested'>
<li><a id="pred_get_char_1_index" href="docs/index_doc.html#pred_get_char_1"> get_char/1 </a></li>
<li><a id="pred_get_char_2_index" href="docs/index_doc.html#pred_get_char_2"> get_char/2 </a></li>
<li><a id="pred_get_code_1_index" href="docs/index_doc.html#pred_get_code_1"> get_code/1 </a></li>
<li><a id="pred_get_code_2_index" href="docs/index_doc.html#pred_get_code_2"> get_code/2 </a></li>
<li><a id="pred_peek_char_1_index" href="docs/index_doc.html#pred_peek_char_1"> peek_char/1 </a></li>
<li><a id="pred_peek_char_2_index" href="docs/index_doc.html#pred_peek_char_2"> peek_char/2 </a></li>
<li><a id="pred_peek_code_1_index" href="docs/index_doc.html#pred_peek_code_1"> peek_code/1 </a></li>
<li><a id="pred_peek_code_2_index" href="docs/index_doc.html#pred_peek_code_2"> peek_code/2 </a></li>
<li><a id="pred_put_char_1_index" href="docs/index_doc.html#pred_put_char_1"> put_char/1 </a></li>
<li><a id="pred_put_char_2_index" href="docs/index_doc.html#pred_put_char_2"> put_char/2 </a></li>
<li><a id="pred_put_code_1_index" href="docs/index_doc.html#pred_put_code_1"> put_code/1 </a></li>
<li><a id="pred_put_code_2_index" href="docs/index_doc.html#pred_put_code_2"> put_code/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_clause_creation_and_destruction_index" href="docs/index_doc.html#pred_cat_clause_creation_and_destruction"> clause creation and destruction </a>
<ul class='nested'>
<li><a id="pred_abolish_1_index" href="docs/index_doc.html#pred_abolish_1"> abolish/1 </a></li>
<li><a id="pred_retract_1_index" href="docs/index_doc.html#pred_retract_1"> retract/1 </a></li>
<li><a id="pred_retract_clause_2_index" href="docs/index_doc.html#pred_retract_clause_2"> retract_clause/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_clause_retrieval_and_information_index" href="docs/index_doc.html#pred_cat_clause_retrieval_and_information"> clause retrieval and information </a>
<ul class='nested'>
<li><a id="pred_clause_2_index" href="docs/index_doc.html#pred_clause_2"> clause/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_dom_index" href="docs/index_doc.html#pred_cat_dom"> dom </a>
<ul class='nested'>
<li><a id="pred_alert_1_index" href="docs/index_doc.html#pred_alert_1"> alert/1 </a></li>
<li><a id="pred_append_dom_node_child_2_index" href="docs/index_doc.html#pred_append_dom_node_child_2"> append_dom_node_child/2 </a></li>
<li><a id="pred_create_dom_element_2_index" href="docs/index_doc.html#pred_create_dom_element_2"> create_dom_element/2 </a></li>
<li><a id="pred_create_dom_text_node_2_index" href="docs/index_doc.html#pred_create_dom_text_node_2"> create_dom_text_node/2 </a></li>
<li><a id="pred_dom_create_object_2_index" href="docs/index_doc.html#pred_dom_create_object_2"> dom_create_object/2 </a></li>
<li><a id="pred_dom_create_object_3_index" href="docs/index_doc.html#pred_dom_create_object_3"> dom_create_object/3 </a></li>
<li><a id="pred_dom_element_attribute_value_3_index" href="docs/index_doc.html#pred_dom_element_attribute_value_3"> dom_element_attribute_value/3 </a></li>
<li><a id="pred_dom_object_method_2_index" href="docs/index_doc.html#pred_dom_object_method_2"> dom_object_method/2 </a></li>
<li><a id="pred_dom_object_method_3_index" href="docs/index_doc.html#pred_dom_object_method_3"> dom_object_method/3 </a></li>
<li><a id="pred_dom_object_property_4_index" href="docs/index_doc.html#pred_dom_object_property_4"> dom_object_property/4 </a></li>
<li><a id="pred_dom_object_type_2_index" href="docs/index_doc.html#pred_dom_object_type_2"> dom_object_type/2 </a></li>
<li><a id="pred_dom_release_object_1_index" href="docs/index_doc.html#pred_dom_release_object_1"> dom_release_object/1 </a></li>
<li><a id="pred_dom_select_all_elements_2_index" href="docs/index_doc.html#pred_dom_select_all_elements_2"> dom_select_all_elements/2 </a></li>
<li><a id="pred_dom_select_element_2_index" href="docs/index_doc.html#pred_dom_select_element_2"> dom_select_element/2 </a></li>
<li><a id="pred_dom_type_method_5_index" href="docs/index_doc.html#pred_dom_type_method_5"> dom_type_method/5 </a></li>
<li><a id="pred_dom_type_parent_2_index" href="docs/index_doc.html#pred_dom_type_parent_2"> dom_type_parent/2 </a></li>
<li><a id="pred_dom_type_property_4_index" href="docs/index_doc.html#pred_dom_type_property_4"> dom_type_property/4 </a></li>
<li><a id="pred_dom_type_reference_4_index" href="docs/index_doc.html#pred_dom_type_reference_4"> dom_type_reference/4 </a></li>
<li><a id="pred_dom_window_1_index" href="docs/index_doc.html#pred_dom_window_1"> dom_window/1 </a></li>
<li><a id="pred_insert_before_dom_node_3_index" href="docs/index_doc.html#pred_insert_before_dom_node_3"> insert_before_dom_node/3 </a></li>
<li><a id="pred_remove_dom_element_class_2_index" href="docs/index_doc.html#pred_remove_dom_element_class_2"> remove_dom_element_class/2 </a></li>
<li><a id="pred_replace_dom_element_class_2_index" href="docs/index_doc.html#pred_replace_dom_element_class_2"> replace_dom_element_class/2 </a></li>
<li><a id="pred_set_dom_element_attribute_value_3_index" href="docs/index_doc.html#pred_set_dom_element_attribute_value_3"> set_dom_element_attribute_value/3 </a></li>
<li><a id="pred_set_dom_object_property_3_index" href="docs/index_doc.html#pred_set_dom_object_property_3"> set_dom_object_property/3 </a></li>
<li><a id="pred_toggle_dom_element_class_3_index" href="docs/index_doc.html#pred_toggle_dom_element_class_3"> toggle_dom_element_class/3 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_flag_updates_index" href="docs/index_doc.html#pred_cat_flag_updates"> flag updates </a>
<ul class='nested'>
<li><a id="pred_current_prolog_flag_2_index" href="docs/index_doc.html#pred_current_prolog_flag_2"> current_prolog_flag/2 </a></li>
<li><a id="pred_set_prolog_flag_2_index" href="docs/index_doc.html#pred_set_prolog_flag_2"> set_prolog_flag/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_logic_and_control_index" href="docs/index_doc.html#pred_cat_logic_and_control"> logic and control </a>
<ul class='nested'>
<li><a id="pred_fail_0_index" href="docs/index_doc.html#pred_fail_0"> fail/0 </a></li>
<li><a id="pred_halt_0_index" href="docs/index_doc.html#pred_halt_0"> halt/0 </a></li>
<li><a id="pred_repeat_0_index" href="docs/index_doc.html#pred_repeat_0"> repeat/0 </a></li>
<li><a id="pred_true_0_index" href="docs/index_doc.html#pred_true_0"> true/0 </a></li>
<li><a id="pred_yield_0_index" href="docs/index_doc.html#pred_yield_0"> yield/0 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_memory_file_index" href="docs/index_doc.html#pred_cat_memory_file"> memory file </a>
<ul class='nested'>
<li><a id="pred_copy_local_storage_to_memory_file_2_index" href="docs/index_doc.html#pred_copy_local_storage_to_memory_file_2"> copy_local_storage_to_memory_file/2 </a></li>
<li><a id="pred_copy_memory_file_to_local_storage_2_index" href="docs/index_doc.html#pred_copy_memory_file_to_local_storage_2"> copy_memory_file_to_local_storage/2 </a></li>
<li><a id="pred_free_memory_file_1_index" href="docs/index_doc.html#pred_free_memory_file_1"> free_memory_file/1 </a></li>
<li><a id="pred_new_memory_file_1_index" href="docs/index_doc.html#pred_new_memory_file_1"> new_memory_file/1 </a></li>
<li><a id="pred_open_memory_file_3_index" href="docs/index_doc.html#pred_open_memory_file_3"> open_memory_file/3 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_runtime_index" href="docs/index_doc.html#pred_cat_runtime"> runtime </a>
<ul class='nested'>
<li><a id="pred_statistics_0_index" href="docs/index_doc.html#pred_statistics_0"> statistics/0 </a></li>
<li><a id="pred_statistics_max_heap_1_index" href="docs/index_doc.html#pred_statistics_max_heap_1"> statistics_max_heap/1 </a></li>
<li><a id="pred_statistics_max_stack_1_index" href="docs/index_doc.html#pred_statistics_max_stack_1"> statistics_max_stack/1 </a></li>
<li><a id="pred_wam_duration_1_index" href="docs/index_doc.html#pred_wam_duration_1"> wam_duration/1 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_stream_selection_and_control_index" href="docs/index_doc.html#pred_cat_stream_selection_and_control"> stream selection and control </a>
<ul class='nested'>
<li><a id="pred_at_end_of_stream_1_index" href="docs/index_doc.html#pred_at_end_of_stream_1"> at_end_of_stream/1 </a></li>
<li><a id="pred_close_1_index" href="docs/index_doc.html#pred_close_1"> close/1 </a></li>
<li><a id="pred_current_input_1_index" href="docs/index_doc.html#pred_current_input_1"> current_input/1 </a></li>
<li><a id="pred_current_output_1_index" href="docs/index_doc.html#pred_current_output_1"> current_output/1 </a></li>
<li><a id="pred_flush_output_1_index" href="docs/index_doc.html#pred_flush_output_1"> flush_output/1 </a></li>
<li><a id="pred_open_3_index" href="docs/index_doc.html#pred_open_3"> open/3 </a></li>
<li><a id="pred_open_4_index" href="docs/index_doc.html#pred_open_4"> open/4 </a></li>
<li><a id="pred_set_input_1_index" href="docs/index_doc.html#pred_set_input_1"> set_input/1 </a></li>
<li><a id="pred_set_output_1_index" href="docs/index_doc.html#pred_set_output_1"> set_output/1 </a></li>
<li><a id="pred_set_stream_position_2_index" href="docs/index_doc.html#pred_set_stream_position_2"> set_stream_position/2 </a></li>
<li><a id="pred_stream_property_2_index" href="docs/index_doc.html#pred_stream_property_2"> stream_property/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_term_comparison_index" href="docs/index_doc.html#pred_cat_term_comparison"> term comparison </a>
<ul class='nested'>
<li><a id="pred_==_2_index" href="docs/index_doc.html#pred_==_2"> (==)/2 </a></li>
<li><a id="pred_@<_2_index" href="docs/index_doc.html#pred_@<_2"> (@<)/2 </a></li>
<li><a id="pred_@=<_2_index" href="docs/index_doc.html#pred_@=<_2"> (@=<)/2 </a></li>
<li><a id="pred_@>_2_index" href="docs/index_doc.html#pred_@>_2"> (@>)/2 </a></li>
<li><a id="pred_@>=_2_index" href="docs/index_doc.html#pred_@>=_2"> (@>=)/2 </a></li>
<li><a id="pred_compare_3_index" href="docs/index_doc.html#pred_compare_3"> compare/3 </a></li>
<li><a id="pred_subsumes_term_2_index" href="docs/index_doc.html#pred_subsumes_term_2"> subsumes_term/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_term_creation_and_decomposition_index" href="docs/index_doc.html#pred_cat_term_creation_and_decomposition"> term creation and decomposition </a>
<ul class='nested'>
<li><a id="pred_=.._2_index" href="docs/index_doc.html#pred_=.._2"> (=..)/2 </a></li>
<li><a id="pred_arg_3_index" href="docs/index_doc.html#pred_arg_3"> arg/3 </a></li>
<li><a id="pred_atom_to_term_3_index" href="docs/index_doc.html#pred_atom_to_term_3"> atom_to_term/3 </a></li>
<li><a id="pred_copy_term_2_index" href="docs/index_doc.html#pred_copy_term_2"> copy_term/2 </a></li>
<li><a id="pred_functor_3_index" href="docs/index_doc.html#pred_functor_3"> functor/3 </a></li>
<li><a id="pred_term_variables_2_index" href="docs/index_doc.html#pred_term_variables_2"> term_variables/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_term_io_index" href="docs/index_doc.html#pred_cat_term_io"> term io </a>
<ul class='nested'>
<li><a id="pred_char_conversion_2_index" href="docs/index_doc.html#pred_char_conversion_2"> char_conversion/2 </a></li>
<li><a id="pred_current_char_conversion_2_index" href="docs/index_doc.html#pred_current_char_conversion_2"> current_char_conversion/2 </a></li>
<li><a id="pred_current_op_3_index" href="docs/index_doc.html#pred_current_op_3"> current_op/3 </a></li>
<li><a id="pred_op_3_index" href="docs/index_doc.html#pred_op_3"> op/3 </a></li>
<li><a id="pred_read_term_2_index" href="docs/index_doc.html#pred_read_term_2"> read_term/2 </a></li>
<li><a id="pred_read_term_3_index" href="docs/index_doc.html#pred_read_term_3"> read_term/3 </a></li>
<li><a id="pred_write_term_3_index" href="docs/index_doc.html#pred_write_term_3"> write_term/3 </a></li>
<li><a id="pred_writeln_1_index" href="docs/index_doc.html#pred_writeln_1"> writeln/1 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_term_unification_index" href="docs/index_doc.html#pred_cat_term_unification"> term unification </a>
<ul class='nested'>
<li><a id="pred_=_2_index" href="docs/index_doc.html#pred_=_2"> (=)/2 </a></li>
<li><a id="pred_\=_2_index" href="docs/index_doc.html#pred_\=_2"> (\=)/2 </a></li>
</ul></li>
<li><span class="caret"></span><a id="pred_cat_type_testing_index" href="docs/index_doc.html#pred_cat_type_testing"> type testing </a>
<ul class='nested'>
<li><a id="pred_acyclic_term_1_index" href="docs/index_doc.html#pred_acyclic_term_1"> acyclic_term/1 </a></li>
<li><a id="pred_atom_1_index" href="docs/index_doc.html#pred_atom_1"> atom/1 </a></li>
<li><a id="pred_compound_1_index" href="docs/index_doc.html#pred_compound_1"> compound/1 </a></li>
<li><a id="pred_float_1_index" href="docs/index_doc.html#pred_float_1"> float/1 </a></li>
<li><a id="pred_ground_1_index" href="docs/index_doc.html#pred_ground_1"> ground/1 </a></li>
<li><a id="pred_integer_1_index" href="docs/index_doc.html#pred_integer_1"> integer/1 </a></li>
<li><a id="pred_var_1_index" href="docs/index_doc.html#pred_var_1"> var/1 </a></li>
</ul></li>
</ul>
</li>
</ul>
</li>
<li><span class="caret"></span><a id="examples_index" href="docs/index_doc.html#examples"> Examples </a>
<ul class="nested">
<li><span class="caret"></span><a id="calculator_example_index" href="docs/index_doc.html#calculator_example"> Calculator </a>
<ul class="nested">
<li><a id="calculator_example_source_index" href="docs/calculator_source.html#calculator_example_source"> Calculator Example Source </a></li>
</ul>
</li>
<li><span class="caret"></span><a id="console_example_index" href="docs/index_doc.html#console_example"> Console Button </a>
<ul class="nested">
<li><a id="console_example_source_index" href="docs/console_source.html#console_example_source"> Console Example Source </a></li>
</ul>
</li>
<li><span class="caret"></span><a id="simple_example_index" href="docs/index_doc.html#simple_example"> Simple </a>
<ul class="nested">
<li><a id="simple_example_source_index" href="docs/simple_source.html#simple_example_source"> Simple Example Source </a></li>
</ul>
</li>
<li><span class="caret"></span><a id="likes_example_index" href="docs/index_doc.html#likes_example"> Likes </a>
<ul class="nested">
<li><a id="likes_example_source_index" href="docs/likes_source.html#likes_example_source"> Likes Example Source </a></li>
</ul>
</li>
<li><span class="caret"></span><a id="consult_console_example_index" href="docs/index_doc.html#consult_console_example"> Consult console </a>
<ul class="nested">
<li><a id="consult_console_example_source_index" href="docs/consult_console_source.html#consult_console_example_source"> Consult Console Example Source </a></li>
</ul>
</li>
<li><span class="caret"></span><a id="tiles_example_index" href="docs/index_doc.html#tiles_example"> Tiles </a>
<ul class="nested">
<li><a id="tiles_example_source_index" href="docs/tiles_source.html#tiles_example_source"> Tiles Example Source </a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a id="download_index" href="docs/index_download.html#download"> Download </a></li>
<li><span class="caret"></span><a id="status_index" href="docs/index_status.html#status"> Status </a>
<ul class='nested'>
<li><a id="additional-requirements_index" href="docs/index_status.html#additional-requirements"> Additional requirements </a></li>
<li><span class="caret"></span><a id="core-standard_index" href="docs/index_status.html#core-standard"> Core standard </a>
<ul class='nested'>
<li><a id="directives_index" href="docs/index_status.html#directives"> 7.4.2 Directives </a></li>
<li><a id="control-constructs_index" href="docs/index_status.html#control-constructs"> 7.8 Control constructs </a></li>
<li><a id="stream-properties_index" href="docs/index_status.html#stream-properties"> 7.10.2.13 Stream properties </a></li>
<li><a id="read-options_index" href="docs/index_status.html#read-options"> 7.10.3 Read-options list </a></li>
<li><a id="write-options_index" href="docs/index_status.html#write-options"> 7.10.4 Write-options list </a></li>
<li><a id="flags-integer_index" href="docs/index_status.html#flags-integer"> 7.11.1 Flags defining integer type I </a></li>
<li><a id="other-flags_index" href="docs/index_status.html#other-flags"> 7.11.2 Other flags </a></li>
<li><a id="errors_index" href="docs/index_status.html#errors"> 7.12.2 Error classification </a></li>
<li><a id="term-unification_index" href="docs/index_status.html#term-unification"> 8.2 Term unification </a></li>
<li><a id="type-testing_index" href="docs/index_status.html#type-testing"> 8.3 Type testing </a></li>
<li><a id="term-comparison_index" href="docs/index_status.html#term-comparison"> 8.4 Term comparison </a></li>
<li><a id="term-creation_index" href="docs/index_status.html#term-creation"> 8.5 Term creation and decomposition </a></li>
<li><a id="arithmetic-evaluation_index" href="docs/index_status.html#arithmetic-evaluation"> 8.6 Arithmetic evaluation </a></li>
<li><a id="arithmetic-comparison_index" href="docs/index_status.html#arithmetic-comparison"> 8.7 Arithmetic comparison </a></li>
<li><a id="clause-retrieval_index" href="docs/index_status.html#clause-retrieval"> 8.8 Clause retrieval and information </a></li>
<li><a id="clause-creation_index" href="docs/index_status.html#clause-creation"> 8.9 Clause creation and destruction </a></li>
<li><a id="all-solutions_index" href="docs/index_status.html#all-solutions"> 8.10 All solutions </a></li>
<li><a id="stream-selection_index" href="docs/index_status.html#stream-selection"> 8.11 Stream selection and control </a></li>
<li><a id="character-io_index" href="docs/index_status.html#character-io"> 8.12 Character input/output </a></li>
<li><a id="byte-io_index" href="docs/index_status.html#byte-io"> 8.13 Byte input/output </a></li>
<li><a id="term-io_index" href="docs/index_status.html#term-io"> 8.14 Term input/output </a></li>
<li><a id="logic-and-control_index" href="docs/index_status.html#logic-and-control"> 8.15 Logic and control </a></li>
<li><a id="atomic-term_index" href="docs/index_status.html#atomic-term"> 8.16 Atomic term processing </a></li>
<li><a id="hooks_index" href="docs/index_status.html#hooks"> 8.17 Implementation defined hooks </a></li>
<li><a id="arithmetic-functors_index" href="docs/index_status.html#arithmetic-functors"> 9.1 The simple arithmetic functors </a></li>
<li><a id="other-arithmetic-functors_index" href="docs/index_status.html#other-arithmetic-functors"> 9.3 Other arithmetic functors </a></li>
<li><a id="bitwise-functors_index" href="docs/index_status.html#bitwise-functors"> 9.4 Bitwise functors </a></li>
</ul></li>
<li><span class="caret"></span><a id="modules_index" href="docs/index_status.html#modules"> Part 2: Modules </a>
<ul class='nested'>
<li><a id="module-predicates_index" href="docs/index_status.html#module-predicates"> 7.2 Module predicates </a></li>
<li><a id="module-predicates_index" href="docs/index_status.html#module-predicates"> 7.2 Module predicates </a></li>
</ul></li>
<li><a id="prologue_index" href="docs/index_status.html#prologue"> Proposed for Prolog prologue </a></li>
<li><a id="further_index" href="docs/index_status.html#further"> Further propositions </a></li>
<li><span class="caret"></span><a id="needed_index" href="docs/index_status.html#needed"> Summary of items needing to be implemented </a>
<ul class='nested'>
<li><a id="needed-standard_index" href="docs/index_status.html#needed-standard"> Standard items </a></li>
<li><a id="needed-other_index" href="docs/index_status.html#needed-other"> Other items </a></li>
</ul></li>
</ul>
</li>
<li><a id="about_index" href="docs/index_about.html#about"> About </a></li>
</ul>
<!-- Page content -->
<div class="content">
<header>
<h1>ProscriptLS</h1>
<hr>
</header>
<!-- The index.html file is handled specially: it is intended to be accessed from the
root of the proscriptls project where all of the other index*.html files are intended to be
accessed from the proscriptls/docs directory.
There is an index.html file generated in proscriptls/doc - it is copied to proscriptls by the Makefile.
-->
<div class="indexed body" id="home">
<div class="indexed" id="prolog-for-the-web">
<h2>Prolog for the Web</h2>
<p>The ProscriptLS language is a version of Prolog that runs in web browsers.
It aspires to be a superset of ISO Prolog that is a complete alternative to
Javascript for implementing web sites.
(This site is implemented using ProscriptLS instead of Javascript.)
</p>
<p>It supports interaction with the HTML Document Object Model (DOM) through builtin predicates.
There is a full source-level Prolog debugger based on the Byrd Box Model
available through an in-client command-line ProscriptLS interpreter.
</p>
<p>
The implementation uses a runtime engine that interprets byte codes.
This engine is implemented in Javascript and is
a version of the Warren Abstract Machine (WAM).
</p>
<p>
The ProscriptLS SDK associated with each release contains all of the files needed to develop a ProscriptLS web site.
</p>
</div>
<div class="indexed" id="running-proscriptls">
<h3>Running ProscriptLS</h3>
ProscriptLS is started by the proscriptls_init function (implemented in the proscriptls.js library).
This function is typically invoked once per load of the web page in an onload handler for the 'body'
element:
<pre class="html"><code>
<body onload=
"proscriptls_init ();">
Body stuff
</body>
</code></pre>
</div>
<div class="indexed" id="compiling-proscriptls">
<h3>Compiling ProscriptLS programs in the web client</h3>
The proscriptls_init function supports compilation of ProscriptLS programs in the client
using the 'script' tag with the 'type' attribute of 'text/prolog'
or using the ProscriptLS 'consult/1' predicate.
<h4>Compilation Examples</h4>
<ul>
<li>The 'script' tag with the source being a file specified using the
'src' attribute:
<br>
<pre class="html"><code>
<script type="text/prolog"
src="my_program.pl">
</script>
</code></pre>
</li>
<li>
The 'script' tag with the source as the text content of the 'script' element:
<pre class="html"><code>
<script type="text/prolog">
my_program :-
some_code.
</script>
</code></pre>
</li>
<li>
Consulting a source file using the proscriptls function:
<pre class="html"><code>
<body onLoad= "proscriptls( '\'wam_compiler:consult\'([my_program])');">
More HTML
</body>
</code></pre>
</li>
</ul>
</div>
<div class="indexed" id="basic-example">
<h3>Basic Example</h3>
The following HTML source is a basic example showing the use of a ProscriptLS program to create
a 'click me' button that when clicked displays a 'Hello World' alert dialog.
<pre class="html"><code>
<html lang="en">
<head>
<title>ProscriptLS Basic</title>
</head>
<body onload="proscriptls_init ();">
<div>
<h2>ProscriptLS Basic</h2>
<p>
The button displays an alert
dialog containing
'Hello World'
</p>
<div id="basic"></div>
</div>
<script type="text/javascript"
src="../dist/proscriptls.js">
</script>
<script type="text/prolog">
:- initialization(setup_button).
setup_button :-
dom_element_attribute_value(E, id, basic),
create_dom_element('BUTTON', Button),
create_dom_text_node("Click Me", NewContent),
append_dom_node_child(Button, NewContent),
dom_object_method(Button,
addEventListener(click,
alert('Hello World!'))),
append_dom_node_child(E, Button).
</script>
</body>
</html>
</code></pre>
The ':- initialization(setup_button).' statement in the Prolog source is a Prolog compiler
directive that causes the wam_compiler to evaluate 'setup_button' after completing the compilation
of the Prolog source in that 'script' element.
</div>
</div>
<footer>
<hr>
<table style="width:100%">
<tr>
<td>Version 1.5.9, June 2020.</td>
<td style="text-align:right">Powered by ProscriptLS Prolog - Logic at Your Service.</td>
</tr>
</table>
</footer>
</div>
<!-- proscriptls interpreter
<script src="terminal/proscriptls_interpreter_terminal.js" type="text/javascript"></script>
<div id="proscriptinterpreter">
</div>
-->
<script type="text/prolog" src="docs/index.pl"></script>
</body>
</html>