Skip to content

Commit

Permalink
minimization bug solved. correct elimination os inaccessible and usel…
Browse files Browse the repository at this point in the history
…ess states.
  • Loading branch information
davidbuzatto committed Sep 29, 2023
1 parent f49dd4a commit 1a245fa
Show file tree
Hide file tree
Showing 22 changed files with 486 additions and 1,795 deletions.
13 changes: 2 additions & 11 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
Regular operations in FA -> organize in one menu like the rearrange algorithms
Union - OK
Concatenation - OK
Kleene Star - OK
Complement - OK
Intersection - OK, but buggy

Rework state natural order (use label?)

Highlight inacessible states
Highlight nondeterminisms
Highlight inacessible states (properties panel)
Highlight nondeterminisms (properties panel)

Regular Expressions

Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<maven.compiler.target>18</maven.compiler.target>
<exec.mainClass>br.com.davidbuzatto.yaas.YAAS</exec.mainClass>
<production>false</production>
<debugAlgorithms>false</debugAlgorithms>
</properties>
<dependencies>
<dependency>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/br/com/davidbuzatto/yaas/gui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import br.com.davidbuzatto.yaas.gui.fa.examples.FAExamples;
import br.com.davidbuzatto.yaas.gui.fa.examples.FAExamplesForMinimizationTest;
import br.com.davidbuzatto.yaas.gui.fa.FAInternalFrame;
import br.com.davidbuzatto.yaas.gui.fa.examples.FAExamplesForRemoveUselessAndInaccessibleStates;
import br.com.davidbuzatto.yaas.util.ApplicationConstants;
import br.com.davidbuzatto.yaas.util.ApplicationPreferences;
import br.com.davidbuzatto.yaas.util.CharacterConstants;
Expand Down Expand Up @@ -55,7 +56,7 @@ private void customInit() {
menuMinimizationTest.setVisible( false );
setExtendedState( MAXIMIZED_BOTH );
} else {
createFAInternalFrame( FAExamplesForMinimizationTest.createDFAForMinimizationTest02(), true, true );
createFAInternalFrame( FAExamples.createDFAEndsWith00(), true, true );
}

}
Expand Down
1 change: 0 additions & 1 deletion src/main/java/br/com/davidbuzatto/yaas/gui/fa/FA.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ public Map<FAState, Map<Character, List<FAState>>> getDelta() {
}
li.add( t.getTargetState() );
}

}

}
Expand Down
24 changes: 20 additions & 4 deletions src/main/java/br/com/davidbuzatto/yaas/gui/fa/FAInternalFrame.form
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@
<Component class="javax.swing.JButton" name="btnAddAllMissingTransitionsDFA">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/pencil_go.png"/>
<Image iconType="3" name="/transitionAddAll.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Add All Missing Transitions (Alt+Shift+T)"/>
<Property name="focusable" type="boolean" value="false"/>
Expand All @@ -515,6 +515,22 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddAllMissingTransitionsDFAActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="btnRemoveInaccessibleAndUselessStates">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/stateRemoveUI.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Remove Inaccessible and Useless States (Alt+Shift+DELETE)"/>
<Property name="focusable" type="boolean" value="false"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnRemoveInaccessibleAndUselessStatesActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="sep03">
</Component>
<Component class="javax.swing.JButton" name="btnGenerateEquivalentDFA">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
Expand Down Expand Up @@ -581,7 +597,7 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnShowTransitionControlsActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="sep03">
<Component class="javax.swing.JToolBar$Separator" name="sep04">
</Component>
<Component class="javax.swing.JToggleButton" name="btnShowGrid">
<Properties>
Expand All @@ -608,7 +624,7 @@
<Property name="verticalTextPosition" type="int" value="3"/>
</Properties>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="sep04">
<Component class="javax.swing.JToolBar$Separator" name="sep05">
</Component>
<Component class="javax.swing.JButton" name="btnRearrangeStates">
<Properties>
Expand All @@ -624,7 +640,7 @@
<EventHandler event="mouseReleased" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="btnRearrangeStatesMouseReleased"/>
</Events>
</Component>
<Component class="javax.swing.JToolBar$Separator" name="sep05">
<Component class="javax.swing.JToolBar$Separator" name="sep06">
</Component>
<Component class="javax.swing.JButton" name="btnZoomIn">
<Properties>
Expand Down
Loading

0 comments on commit 1a245fa

Please sign in to comment.