1919number of states in the automata
2020"""
2121function num_states (aut:: SpotAutomata )
22- return convert (Int64, Spot. num_states (aut. a))
22+ return convert (Int64, Spot. num_states (aut. a[] ))
2323end
2424
2525"""
2626 get_init_state_number(aut::SpotAutomata)
2727number of the initial state in the automata (0-indexed!!)
2828"""
2929function get_init_state_number (aut:: SpotAutomata )
30- return convert (Int64, Spot. get_init_state_number (aut. a) + 1 )
30+ return convert (Int64, Spot. get_init_state_number (aut. a[] ) + 1 )
3131end
3232
3333"""
3434 num_edges(aut::SpotAutomata)
3535number of edges in the automata
3636"""
3737function num_edges (aut:: SpotAutomata )
38- return convert (Int64, Spot. num_edges (aut. a))
38+ return convert (Int64, Spot. num_edges (aut. a[] ))
3939end
4040
4141"""
4242 atomic_propositions(aut::SpotAutomata)
4343return a list of atomic propositions used in the automata, as Symbols
4444"""
4545function atomic_propositions (aut:: SpotAutomata )
46- aps = Spot. atomic_propositions (aut. a)
46+ aps = Spot. atomic_propositions (aut. a[] )
4747 return @. Symbol (SpotFormula (copy (aps)))
4848end
4949
6565returns true if the automata is deterministic
6666"""
6767function is_deterministic (aut:: SpotAutomata )
68- return Spot. is_deterministic (aut. a)
68+ return Spot. is_deterministic (aut. a[] )
6969end
7070
7171"""
7272 edges(aut::SpotAutomata)
7373returns a list of edges as pairs (src, dest)
7474"""
7575function get_edges (aut:: SpotAutomata )
76- cpp_edges = Spot. get_edges (aut. a)
76+ cpp_edges = Spot. get_edges (aut. a[] )
7777 edge_list = Vector{Int64}[convert .(Int64, copy .(c)) .+ 1 for c in copy .(cpp_edges)]
7878 return Tuple{Int64,Int64}[tuple (c... ) for c in edge_list]
7979end
@@ -86,7 +86,7 @@ See spot.split_edges documentation for more information.
8686This is inspired from https://spot.lrde.epita.fr/tut24.html
8787"""
8888function get_labels (aut:: SpotAutomata )
89- cpp_labs = Spot. get_labels (aut. a)
89+ cpp_labs = Spot. get_labels (aut. a[] )
9090 return @. SpotFormula (copy (cpp_labs))
9191end
9292
@@ -119,7 +119,7 @@ Return a Rabin acceptance condition as a list of pairs (Fin, Inf)
119119where Fin is a set of states to be visited finitely often and Inf inifinitely often
120120"""
121121function get_rabin_acceptance (aut:: SpotAutomata )
122- fin_inf_sets_cpp = Spot. get_rabin_acceptance (aut. a)
122+ fin_inf_sets_cpp = Spot. get_rabin_acceptance (aut. a[] )
123123 fin_inf_sets = Tuple{Set{Int64}, Set{Int64}}[]
124124 for c in fin_inf_sets_cpp
125125 state_inf_set = Set {Int64} ()
@@ -146,7 +146,7 @@ function plot_automata(aut::SpotAutomata)
146146 dotfile = joinpath (path, " graph.dot" )
147147 open (dotfile, " w" ) do f
148148 redirect_stdout (f) do
149- Spot. print_dot (aut. a)
149+ Spot. print_dot (aut. a[] )
150150 end
151151 end
152152 xdotfile = joinpath (path, " graph.xdot" )
0 commit comments