diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-02-22 14:32:07 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-02-22 14:32:07 +0100 |
commit | 5aa3a8d691c7a0a4b7eda3546b61281bb8638932 (patch) | |
tree | 3b320f47714f6c0df2bebba6e4a3c7c09da6afb9 /lib/automata.py | |
parent | 74c43f1af8c222256a37f65288e68e9a0fef4886 (diff) |
add ptalog to dfa benchmark generation
Diffstat (limited to 'lib/automata.py')
-rwxr-xr-x | lib/automata.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/automata.py b/lib/automata.py index 37b52e1..7db1ebf 100755 --- a/lib/automata.py +++ b/lib/automata.py @@ -411,6 +411,9 @@ class PTA: self.transitions.append(new_transition) orig_state.add_outgoing_transition(new_transition) + def get_transition_id(self, transition: Transition) -> int: + return self.transitions.index(transition) + def dfs(self, depth: int = 10, orig_state: str = 'UNINITIALIZED', **kwargs): """ Return a generator object for depth-first search starting at orig_state. |