-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDFA.mli
49 lines (38 loc) · 1.51 KB
/
DFA.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
(***************************************************************)
(* Copyright 2014 Pierre Hyvernat. All rights reserved. *)
(* This file is distributed under the terms of the *)
(* GNU General Public License, described in file COPYING. *)
(***************************************************************)
open Common
module type DFAType = sig
type symbol
type atomic_state
type state
type dfa
val from_matrix : (state * (symbol * state) list) list ->
state ->
state list -> dfa
val get_states : dfa -> state list
val get_symbols : dfa -> symbol list
val get_init : dfa -> state
val is_accepting : dfa -> state -> bool
val next : dfa -> state -> symbol -> state
val print : ?show_labels:bool -> dfa -> unit
val accepts : dfa -> symbol list -> bool
val reachable : dfa -> dfa
val make_total : ?alphabet:symbol list -> dfa -> dfa
val collapse: dfa -> dfa
val minimize : dfa -> dfa
val complement : ?alphabet:symbol list -> dfa -> dfa
val union : dfa -> dfa -> dfa
val intersection : dfa -> dfa -> dfa
exception Found of symbol list
val is_empty : ?counterexample:bool -> dfa -> bool
val subset : ?counterexample:bool -> dfa -> dfa -> bool
val equal : ?counterexample:bool -> dfa -> dfa -> bool
end
module Make (Symbol:OType) (State:OType)
: DFAType
with type symbol = Symbol.t
and type atomic_state = State.t
and type state = GeneralizedState(State).t