-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finish DFA minimization module in VisFormalLAnguage
- Loading branch information
1 parent
a0cbb74
commit 51c8215
Showing
15 changed files
with
363 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
137 changes: 137 additions & 0 deletions
137
AV/VisFormalLang/Minimization/AutomataFiles/stminDFAE2.jff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--Created with JFLAP 7.1.--><structure> | ||
<type>fa</type> | ||
<automaton> | ||
<!--The list of states.--> | ||
<state id="0" name="q0"> | ||
<x>60.0</x> | ||
<y>95.0</y> | ||
<initial/> | ||
</state> | ||
<state id="1" name="q1"> | ||
<x>355.0</x> | ||
<y>112.0</y> | ||
</state> | ||
<state id="2" name="q2"> | ||
<x>485.0</x> | ||
<y>16.0</y> | ||
<final/> | ||
</state> | ||
<state id="3" name="q3"> | ||
<x>142.0</x> | ||
<y>376.0</y> | ||
</state> | ||
<state id="4" name="q4"> | ||
<x>192.0</x> | ||
<y>190.0</y> | ||
<final/> | ||
</state> | ||
<state id="5" name="q5"> | ||
<x>434.0</x> | ||
<y>279.0</y> | ||
</state> | ||
<state id="6" name="q6"> | ||
<x>571.0</x> | ||
<y>317.0</y> | ||
<final/> | ||
</state> | ||
<state id="7" name="q7"> | ||
<x>154.0</x> | ||
<y>14.0</y> | ||
</state> | ||
<state id="8" name="q8"> | ||
<x>362.0</x> | ||
<y>5.0</y> | ||
</state> | ||
<!--The list of transitions.--> | ||
<transition> | ||
<from>1</from> | ||
<to>5</to> | ||
<read>a</read> | ||
</transition> | ||
<transition> | ||
<from>5</from> | ||
<to>5</to> | ||
<read>a</read> | ||
</transition> | ||
<transition> | ||
<from>4</from> | ||
<to>1</to> | ||
<read>a</read> | ||
</transition> | ||
<transition> | ||
<from>3</from> | ||
<to>0</to> | ||
<read>b</read> | ||
</transition> | ||
<transition> | ||
<from>8</from> | ||
<to>1</to> | ||
<read>b</read> | ||
</transition> | ||
<transition> | ||
<from>6</from> | ||
<to>2</to> | ||
<read>b</read> | ||
</transition> | ||
<transition> | ||
<from>7</from> | ||
<to>0</to> | ||
<read>b</read> | ||
</transition> | ||
<transition> | ||
<from>3</from> | ||
<to>6</to> | ||
<read>a</read> | ||
</transition> | ||
<transition> | ||
<from>0</from> | ||
<to>7</to> | ||
<read>a</read> | ||
</transition> | ||
<transition> | ||
<from>2</from> | ||
<to>0</to> | ||
<read>a</read> | ||
</transition> | ||
<transition> | ||
<from>2</from> | ||
<to>3</to> | ||
<read>b</read> | ||
</transition> | ||
<transition> | ||
<from>0</from> | ||
<to>4</to> | ||
<read>b</read> | ||
</transition> | ||
<transition> | ||
<from>5</from> | ||
<to>0</to> | ||
<read>b</read> | ||
</transition> | ||
<transition> | ||
<from>4</from> | ||
<to>3</to> | ||
<read>b</read> | ||
</transition> | ||
<transition> | ||
<from>7</from> | ||
<to>8</to> | ||
<read>a</read> | ||
</transition> | ||
<transition> | ||
<from>8</from> | ||
<to>7</to> | ||
<read>a</read> | ||
</transition> | ||
<transition> | ||
<from>6</from> | ||
<to>5</to> | ||
<read>a</read> | ||
</transition> | ||
<transition> | ||
<from>1</from> | ||
<to>2</to> | ||
<read>b</read> | ||
</transition> | ||
</automaton> | ||
</structure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#Minimization1CON { | ||
height: 1000px; | ||
width: 1000px;} | ||
|
||
.jsavcontrols { | ||
display: unset !important; | ||
} | ||
|
||
.jsavnode.jsavtreenode { | ||
width: auto; | ||
height: auto; | ||
min-width: 0; | ||
max-width: 500px; | ||
min-height: 0; | ||
max-height: 500px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
document.write('<script src="../../../AV/Development/formal_language/fa/Automaton.js"></script>'); | ||
document.write('<script src="../../../AV/Development/formal_language/fa/FA.js"></script>'); | ||
document.write('<script src="../../../AV/Development/formal_language/fa/Minimizer.js"></script>'); | ||
document.write('<script src="../../../AV/FLA/resources/underscore-min.js"></script>'); | ||
document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../AV/Development/formal_language/css/FA.css\" />"); | ||
|
||
|
||
$(document).ready(function() { | ||
"use strict"; | ||
|
||
var av_name = "Minimization1CON"; | ||
var av = new JSAV(av_name); | ||
var interpret = ODSA.UTILS.loadConfig({av_name: av_name}).interpreter; | ||
var url = interpret("fa1"); | ||
var DFA = new av.ds.fa({width: 500, height: 250, left: 10}); | ||
FiniteAutomaton.prototype.loadFAFromJFLAPFile.call(DFA,url); | ||
var tree = new av.ds.tree($.extend({width: '450px', height: 340, editable: true, left: 500 + (340 / 3), top: 0})); | ||
var minimizer = new Minimizer(); | ||
av.displayInit(); | ||
var newGraphDimensions = { | ||
top: 275, | ||
left: 10, | ||
width: 950, | ||
height: 500}; | ||
var minimizedDFA = minimizer.minimizeDFA(av, DFA,tree, newGraphDimensions); | ||
minimizedDFA.disableDragging(); | ||
DFA.disableDragging(); | ||
av.recorded(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"translations": { | ||
"en": { | ||
"fa1": "../../../AV/VisFormalLang/Minimization/AutomataFiles/stminDFA1.jff" | ||
} | ||
}, | ||
"code": | ||
{ | ||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#Minimization2CON { | ||
height: 1000px; | ||
width: 1100px;} | ||
|
||
.jsavcontrols { | ||
display: unset !important; | ||
} | ||
|
||
.jsavnode.jsavtreenode { | ||
width: auto; | ||
height: auto; | ||
min-width: 0; | ||
max-width: 500px; | ||
min-height: 0; | ||
max-height: 500px; | ||
} |
Oops, something went wrong.