def has_empty_language(model, trivial=False):
'''
Checks if the language associated with the model is empty. It verifies if
there are any self-reachable final states of the model which are also
reachable from some initial state.
Parameters
----------
model : Model
A finite system model.
trivial: boolean
Specify if self-loops are allowed in the definition of self-reachability.
By default, self-loops are not allowed.
Returns
-------
empty : boolean
True if the language is empty.
See Also
--------
networkx.networkx.algorithms.components.strongly_connected.strongly_connected_components
self_reachable_final_states
product
Note
----
This function is intended to be used on product automata.
'''
return len(self_reachable_final_states(model, trivial)) == 0
评论列表
文章目录