-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
266 lines (255 loc) · 12.5 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
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Automaton | Kevin Estevez</title>
<link rel="stylesheet" type="text/css" href="./css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./bootflat/css/bootflat.min.css">
<link rel="stylesheet" type="text/css" href="./css/automatonGUI.css">
<link href="./js/vis/vis-network.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./js/jQuery_v3_1_1.js"></script>
<script type="text/javascript" src="./dist/bundle.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/vis/vis.js"></script>
</head>
<body onload="init();">
<div class="container">
<div class="row">
<h3 class="text-center">Automaton</h3>
<hr/>
</div>
<div class="row">
<div class="col-md-3 col-xs-12">
<div id="show-message"></div>
<div id="automaton">
<input id="automaton-name" class="form-control" value="" placeholder="name or description"/>
<input id="automaton-alphabet" class="form-control" value="" placeholder="alphabet"/>
<input id="automaton-word" class="form-control" value="" placeholder="word to try"/>
<input id="regex-automaton" class="form-control" value="" placeholder="regex to try"/>
<button id="clear-canvas" type="button" class="btn btn-danger btn-block">Clear</button>
<div class="panel-group panel-group-lists collapse in" id="accordion2" style="">
<div class="panel">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion2" href="#collapseFour" class="collapsed">
DFA
</a>
</h4>
</div>
<div id="collapseFour" class="panel-collapse collapse" style="height: 0px;">
<div class="panel-body">
<button id="save-dfa" type="button" class="btn btn-success btn-block">Save</button>
<button id="send-automaton-dfa" type="button" class="btn btn-primary btn-block">Evaluate</button>
<button id="convert-dfa-re" type="button" class="btn btn-warning btn-block">Convert to Regex</button>
<button id="minimize-dfa" type="button" class="btn btn-warning btn-block">Minimize</button>
<div id="dfa-automatons" class="row list-group"></div>
</div>
</div>
</div>
<div class="panel">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion2" href="#collapseFive" class="collapsed">
NFA
</a>
</h4>
</div>
<div id="collapseFive" class="panel-collapse collapse" style="height: 0px;">
<div class="panel-body">
<button id="save-nfa" type="button" class="btn btn-success btn-block">Save</button>
<button id="send-automaton-nfa" type="button" class="btn btn-primary btn-block">Evaluate</button>
<button id="convert-nfa-dfa" type="button" class="btn btn-warning btn-block">Convert to DFA</button>
<div id="nfa-automatons" class="row list-group"></div>
</div>
</div>
</div>
<div class="panel">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion2" href="#collapseSix" class="collapsed">
NFA-e
</a>
</h4>
</div>
<div id="collapseSix" class="panel-collapse collapse">
<div class="panel-body">
<button id="save-nfae" type="button" class="btn btn-success btn-block">Save</button>
<button id="send-automaton-nfae" type="button" class="btn btn-primary btn-block">Evaluate</button>
<button id="convert-nfae-dfa" type="button" class="btn btn-warning btn-block">Convert to DFA</button>
<div id="nfae-automatons" class="row list-group"></div>
</div>
</div>
</div>
<div class="panel">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion2" href="#collapseSeven" class="collapsed">
Regex
</a>
</h4>
</div>
<div id="collapseSeven" class="panel-collapse collapse">
<div class="panel-body">
<button id="save-regex" type="button" class="btn btn-success btn-block">Save</button>
<button id="convert-regex-nfae" type="button" class="btn btn-warning btn-block">Convert to NFA-E</button>
<div id="basic-regexes" class="row list-group"></div>
</div>
</div>
</div>
<div class="panel">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion2" href="#collapseEight" class="collapsed">
Set Operations
</a>
</h4>
</div>
<div id="collapseEight" class="panel-collapse collapse">
<div class="panel-body">
<a id="union-dfa" href="#dfa-operation-modal" class="btn btn-warning btn-block model-invok">Union</a>
<a id="intersection-dfa" href="#dfa-operation-modal" class="btn btn-warning btn-block model-invok">Intersection</a>
<a id="difference-dfa" href="#dfa-operation-modal" class="btn btn-warning btn-block model-invok">Difference</a>
<a id="complement-dfa" href="#dfa-operation-modal" class="btn btn-warning btn-block model-invok">Complement</a>
</div>
</div>
</div>
<div class="panel">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion2" href="#collapseNine" class="collapsed">
PDA
</a>
</h4>
</div>
<div id="collapseNine" class="panel-collapse collapse">
<div class="panel-body">
<button id="save-pda" type="button" class="btn btn-success btn-block">Save</button>
<button id="send-automaton-pda" type="button" class="btn btn-primary btn-block">Evaluate</button>
<button id="convert-to-grammar" class="btn btn-warning btn-block">Convert to Grammar</button>
<div id="show-transitions"></div>
<div id="pda-automatons" class="row list-group"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-9 col-xs-12">
<div class="panel">
<ul id="myTab1" class="nav nav-tabs nav-justified">
<li class="active"><a href="#graph" data-toggle="tab">Graph</a></li>
<li class=""><a href="#grammar-inputs" data-toggle="tab">Grammar</a></li>
</ul>
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="graph">
<div id="mynetwork"></div>
</div>
<div class="tab-pane fade" id="grammar-inputs">
<input id="new-production" type="text" class="form-control" value="" placeholder="producion"/>
<input id="new-produce" type="text" class="form-control" value="" placeholder="produce"/>
<button id="add-production" class="btn btn-primary btn-block">Add</button>
<button id="convert-to-pda" class="btn btn-warning btn-block">Convert to PDA</button>
<button id="update-json-grammar" class="btn btn-success btn-block">Update</button>
<div class="row center-block">
<textarea id="show-grammar" class="col-md-6 col-xs-12"></textarea>
<textarea id="json-grammar" class="col-md-6 col-xs-12"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<hr/>
<div id="content-panel-sbs" class="row"></div>
<div id="modals-container" class="row">
<div id="dfa-operation-modal" class="modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 id="dfa-operation-title" class="modal-title">Union</h4>
</div>
<div class="modal-body">
<div class="selecter multiple" tabindex="0">
<div id="selecter-dfa0" class="selecter-options"></div>
<div id="selecter-dfa1" class="selecter-options"></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success generate-operation" data-dismiss="modal" value="save" id="Generate-union">Generate</button>
<button type="button" class="btn btn-default modal-cancel" data-dismiss="modal" value="cancel">Close</button>
</div>
</div>
</div>
</div>
<div id="node-popUp" class="modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 id="node-operation" class="modal-title">Node</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-6">
<label>type</label>
<input id="node-id" class="form-control" placeholder="start/end" type="text">
</div>
<div class="col-xs-6">
<label>State Name</label>
<input id="node-label" class="form-control" placeholder="name" type="text">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" value="save" id="node-saveButton">Send</button>
<button type="button" class="btn btn-default" data-dismiss="modal" value="cancel" id="node-cancelButton">Close</button>
</div>
</div>
</div>
</div>
<div id="edge-popUp" class="modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 id="edge-operation" class="modal-title">Edge</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12">
<label>Label</label>
<input id="edge-label" class="form-control" placeholder="label" type="text">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" value="save" id="edge-saveButton">Send</button>
<button type="button" class="btn btn-default" data-dismiss="modal" value="cancel" id="edge-cancelButton">Close</button>
</div>
</div>
</div>
</div>
<div id="telakreiste-modal" class="modal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header"></div>
<div class="modal-body">
<div class="row">
<img class="img-responsive img-thumbnail center-block" src="./img/telakreistewey.jpg">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" value="save" id="confirm-stepByStep">OK</button>
<button type="button" class="btn btn-default modal-cancel" data-dismiss="modal" value="cancel" id="telakreiste-cancelButton">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script type="text/javascript" src="./js/visManipulation.js"></script>
<script type="text/javascript" src="./js/persistent.js"></script>
<script type="text/javascript" src="./js/evaluatorInterface.js"></script>
<script type="text/javascript" src="./js/converterInterace.js"></script>
<script type="text/javascript" src="./js/setOperationsInterface.js"></script>
</body>
</html>