-
Notifications
You must be signed in to change notification settings - Fork 0
/
Automaton.html
123 lines (111 loc) · 4.38 KB
/
Automaton.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
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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">
<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>
<link href="./js/vis/vis-network.min.css" rel="stylesheet" type="text/css" />
</head>
<body onload="init();">
<div class="container">
<div class="row">
<h3 class="text-center">Automaton</h3>
</div>
<div class="row">
<div class="col-md-6">
<div id="show-message"></div>
<div id="automaton">
<input id="automaton-alphabet" class="form-control" value="" placeholder="alphabet"/>
<input id="automaton-word" class="form-control" value="" placeholder="word to try"/>
<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="send-automaton-dfa" type="button" class="btn btn-primary btn-block">Evaluate</button>
<button id="load-example-dfa" type="button" class="btn btn-info btn-block">Example</button>
</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="send-automaton-nfa" type="button" class="btn btn-primary btn-block">Evaluate</button>
<button id="load-example-nfa" type="button" class="btn btn-info btn-block">Example</button>
</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="send-automaton-nfae" type="button" class="btn btn-primary btn-block">Evaluate</button>
<button id="load-example-nfae" type="button" class="btn btn-info btn-block">Example</button>
<button id="convert-nfae-dfa" type="button" class="btn btn-warning btn-block">Convert to DFA</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div id="mynetwork"></div>
</div>
</div>
</div>
<div id="node-popUp">
<span id="node-operation">node</span> <br>
<table style="margin:auto;">
<tr>
<td>id</td><td><input id="node-id" value="new value" /></td>
</tr>
<tr>
<td>label</td><td><input id="node-label" value="new value" /></td>
</tr>
</table>
<input type="button" value="save" id="node-saveButton" />
<input type="button" value="cancel" id="node-cancelButton" />
</div>
<div id="edge-popUp">
<span id="edge-operation">edge</span> <br>
<table style="margin:auto;">
<tr>
<td>label</td><td><input id="edge-label" value="new value" /></td>
</tr>
<tr style="display: none;">
<td>arrows</td><td><input id="edge-arrows" value="to" /></td>
</tr>
</table>
<input type="button" value="save" id="edge-saveButton" />
<input type="button" value="cancel" id="edge-cancelButton" />
</div>
<br />
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script type="text/javascript" src="./js/visManipulation.js"></script>
</body>
</html>