Commit e853f9c0 authored by Tobias MEGGENDORFER's avatar Tobias MEGGENDORFER
Browse files

Small adaptions

parent 2d6dcd33
......@@ -15,8 +15,13 @@ import java.util.Set;
import java.util.stream.Collectors;
import owl.automaton.algorithm.SccDecomposition;
public class RunGraphSccSolver {
public final class RunGraphSccSolver {
private RunGraphSccSolver() {}
public static List<RunGraph.State> solve(RunGraph graph) {
// TODO This is a bit messy, to obtain minimal lasso probably should run a dijkstra on the graph and for each encountered accepting
// state run a BFS searching for a loop back to itself in lockstep
Set<RunGraph.State> acceptingStates = graph.states().stream().filter(RunGraph.State::accepting).collect(Collectors.toSet());
List<Set<RunGraph.State>> sccs = SccDecomposition.of(graph.initialStates(), graph::successors).sccsWithoutTransient()
.stream()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment