File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
aalpy/learning_algs/general_passive Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -375,6 +375,20 @@ def node_naming(node: GsmNode):
375375 file_ext = 'dot'
376376 graph .write (path = str (path ) + "." + file_ext , prog = engine , format = format )
377377
378+ def make_input_complete (self ) -> List [Tuple ['GsmNode' , Any , Any ]]:
379+ all_nodes = self .get_all_nodes ()
380+ inputs = {in_sym for node in all_nodes for in_sym in node .transitions }
381+ missing_trans = []
382+ for node in all_nodes :
383+ for in_sym in inputs :
384+ transitions = node .transitions [in_sym ]
385+ if len (transitions ) == 0 :
386+ out_sym = node .prefix_access_pair [1 ]
387+ missing_trans .append ((node , in_sym , out_sym ))
388+ t_info = TransitionInfo (node , 1 , None , None )
389+ transitions [out_sym ] = t_info
390+ return missing_trans
391+
378392 def add_trace (self , trace : IOTrace ):
379393 curr_node : GsmNode = self
380394 for in_sym , out_sym in trace :
You can’t perform that action at this time.
0 commit comments