Skip to content

Commit 89b3f11

Browse files
committed
Bug fix for Reduction.
Previously, reduction was comparing a state number against an automaton index, which are not the same units. This meant it was thinking that some rules had applied, and some had not ... when it was the other way around.
1 parent dcf0966 commit 89b3f11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wyrw/core/Reduction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public int step(int from, int activation) {
4141
AbstractActivation a = state.activation(activation);
4242
int target = a.apply(automaton);
4343
int to;
44-
if (target != Automaton.K_VOID && from != target) {
44+
if (target != Automaton.K_VOID && a.target() != target) {
4545
// Rule application produced an updated automaton
4646
automaton.minimise();
4747
automaton.compact(0);

0 commit comments

Comments
 (0)