-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery.html
84 lines (66 loc) · 3.38 KB
/
gallery.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
<!DOCTYPE html>
<meta charset="UTF-8">
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Lato:400,900" rel="stylesheet">
<link rel="stylesheet" href="src/style.css">
</head>
<body>
<div class="column gallery-column">
<h1>λ-term gallery</h1>
<p><b><a href="visualiser.html">λ-term visualiser</a></b></p>
<p>Graph display powerered by <a href="http://js.cytoscape.org/">Cytoscape.js</a></p>
The underlying algorithms behind the term generators can be found <a href="Generator.hs">here</a> (in Haskell!).
<h2>λ term generators</h2>
n <input type="text" class="number-box" id="n"> k <input type="text" class="number-box" id="k">
<input type="radio" id="pure" name="fragment" value="pure">
<label for="pure">Pure</label>
<input type="radio" id="linear" name="fragment" value="linear">
<label for="pure">Linear</label>
<input type="radio" id="planar" checked name="fragment" value="planar">
<label for="pure">Planar</label>
<p>You might need to be patient for larger values of n and k while the maps are drawn. For n > 10 be
prepared to
wait a while, or until the universe collapses!</p>
<p>For larger terms, you may wish to disable map generation to speed up the process a bit.</p>
<h3 id="filtering-options">Filtering options</h3>
Crossings <input type="text" class="number-box" id="crossings-box">
Abstractions <input type="text" class="number-box" id="abstractions-box">
Applications <input type="text" class="number-box" id="applications-box">
Variables <input type="text" class="number-box" id="variables-box">
β-redexes<input type="text" class="number-box" id="betas-box">
Sort <select id="sort">
<option value=0>Default</value>
<option value=1>Crossings: High-Low</value>
<option value=2>Crossings: Low-High</value>
<option value=3>Beta-redexes: High-Low</value>
<option value=4>Beta-redexes: Low-High</value>
</select>
<h3>Generation options</h3>
<p>Write out terms<input type="checkbox" id="write" checked onclick="toggleWrite()"> Draw maps
(costly)<input type="checkbox" id="draw" checked onclick="toggleDraw()"> Use de Bruijn
notation<input type="checkbox" id="de-bruijn" onclick="toggleDeBruijn()"></p>
<p>Show crossings<input type="checkbox" id="crossings" checked onclick="toggleCrossings()"> Show
β-reductions<input type="checkbox" id="beta" checked onclick="toggleBeta()"></p>
<button type="button" id="generate-btn" onclick='generateButton()'>Generate terms!</button>
<h3 id="error" style="color:red"></h3>
<b>
<p id="number-of-terms"></p>
</b>
<b>
<p id="help"></p>
</b>
<p id="church-room"></p>
<p id="normalisation-studio"></p>
</div>
<script src="src/definition.js"></script>
<script src="src/parser.js"></script>
<script src="src/cytoscape.min.js"></script>
<script src="src/graph.js"></script>
<script src="src/html.js"></script>
<script src="src/sharedFunctions.js"></script>
<script src="src/galleryFunctions.js"></script>
<script src="src/evaluator.js"></script>
<script src="src/generator.js"></script>
</body>
</html>